This project is read-only.

Retrieving Global Optionset value


I am trying to copy a Global Optionset value from one entity record to a linked record (N:1).
Both entities have the same option set in their form and after retrieving the Optionset value via an XML request (#p3[3]) from the father record (in my case it's Account), I have set the value of the Optionset in the updated linked record, to - #p3[3].code
The plugin is Synchronous and is triggered post update.

And then I get this error:
No property or field 'code' exists in type 'Object'



aminekouddane wrote Nov 21, 2016 at 1:24 PM

Hi avsrot,

Please try '#p3[3].Code' instead of '#p3[3].code' and try again (it's case sensitive)


avsrot wrote Nov 21, 2016 at 2:24 PM

I tried that too.
Same error message :(

aminekouddane wrote Nov 22, 2016 at 1:01 PM


To debug the problem, you can create an Abort Message action
Condition : true
Message : #p3[3] or #p3[3].GetType() and see what's the object here.

avsrot wrote Nov 22, 2016 at 5:15 PM

I found the bug :)
My XML attribute was wrong (although I see no logic there).
I was trying to use a self defined attribute ( instead of using the #Id attribute. All of this seemed to mess it up.
Once I changed the XML to receive the same Optionset using #Id - everything works well!

Thanx anyway :)