Same form property name but difference BO type


Author
Message
Chan
Chan
Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 reputation)Advanced StrataFrame User (701 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
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