on 02-28-2012 6:40 PM
Hi!
I have an extension definition field defined as type 'object reference', that I would very much like to set to a default value for in a script.
I can set other extension definition field default values easily enough in the script, but when I try to update any of the three fields associated with the object reference field (i.e.xxx_OBJECT_ID, xxx_CLASS_ID, xxx_OBJECT_NAME) the script throws a null exception...
So my question is does anyone know how to do this? ...or am I just making a schoolboy scripting error ...or is it impossible to do this in scripting?
Many thanks!
Stuart
Mudit - thank you!
I was over complicating it but it works perfectly now.
Best regards,
Stuart
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Since your field is an object reference one, in order to set a default value you first have to locate the home instance of the object , obtain the object reference of the default value you want to set and then use set() to set the default value of your extension field.
Regards
Mudit Saini
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.