Same form property name but difference BO type


Author
Message
Chan
Chan
Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)Advanced StrataFrame User (731 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Just would like top share my experience which cause error in my application and spent me quite long time to troubleshoot it.



Make sure we are not using same property name in form to declare difference type of BO (even in difference webpage) because it would cause error "Unable to convert BOType1 to BOType2".



Scenario:

1. Declared property Leave for namespaceA.LeavesBO in FormA.

2. Declared property Leave for namespaceB.LeavesBO in FormB.

3. Run formA and then FormB. The error mentioned would occured.



It is because SF's webpage would use property name as key to store BO instance at session. When run FormB as scenario above, SF found "Leave" from session and use it directly. However, it is not actually the correct BO instance needed.



I am not sure it is by design or bug. However, would like to share with all.



Thank you
Govinda Berrio
Govinda Berrio
StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)StrataFrame User (240 reputation)
Group: StrataFrame Users
Posts: 94, Visits: 481
Yes, I notice this too when using the same property name for BOs in different ApplicationBasePages. I'm going to assume that this is by design, but it would be useful to configure that if we need it to be different from the default. So by default the session key would be the BO property name, but maybe they could add an Attribute (like [BOSessionKeyAttribute("Leave01")] ).



GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search