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
|