Producer Object

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2014 09:01 AM
I want to associate data in a user defined table to my record producers and then access that data, via the record producer sys_id, from the record producer script. Is there a way to access the record producer's sys_id from that script so I don't have to hard code it?
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2014 07:06 PM
I don't think the record producer sys_id is available from the producer object.
The only thing I can think of as an alternative to hardcoding the sys_id would be to add a string variable and then hide it and populate the sysid with a client script. It'd be easier just to hardcode it, but if you had multiple record producers you could put it all in a variable set and reuse it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2014 07:38 PM
Hi Ronald,
There is a parameter in the URL that has the sysid of the record producer called to create the record. Sadly it appears RP.getParameterValue('sysparam_id') isn't available on the record producer to get the value. You could look at some client side scripting to get the value and put it into a field but ultimately that only achieves the solution that Brad Tilton suggested via a hidden string field.
Cheers,
Cameron

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2014 09:11 AM
I used the combo of these answers. On load, there is a script that pulls the sys_id off the query string and places it into the variable. It is all encapsulated into a variable set and the variable is hidden via ui policy.
Its not perfect and I'm not sure why the producer isn't fully exposed in the producer script but this will have to do.
Thanks,
AA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-28-2014 09:15 AM
Use property. Put the sys_id of record producer in a property and access it from other places. if and when you have to change it, you will just need a property change and not code change.