- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 06:02 AM
Hi Experts,
I have a field called Type which references to the catalog item on my custom table. The requirement is to set the catalog item being used while submitting a request to this field.
In the record producer, I am using the below code but I end up creating a lot of properties if I follow the below method.
Looking for alternate and best approach.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 06:10 AM - edited 02-11-2024 06:10 AM
Didn'y get what you mean by 'The requirement is to set the catalog item being used while submitting a request to this field.'
Can you attach a screenshot of how your form looks like when you are submitting the request?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 06:14 AM - edited 02-11-2024 06:16 AM
It is not necessary to do it in the producer script.
There is a table called sc_item_produced_record which contains the relationship between produced records and record producers.
You could create an after insert business rule on that table that is executed when the produced record is for your table which "writes back the information" (record producer id) into your table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 06:10 AM - edited 02-11-2024 06:10 AM
Didn'y get what you mean by 'The requirement is to set the catalog item being used while submitting a request to this field.'
Can you attach a screenshot of how your form looks like when you are submitting the request?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 06:14 AM - edited 02-11-2024 06:16 AM
It is not necessary to do it in the producer script.
There is a table called sc_item_produced_record which contains the relationship between produced records and record producers.
You could create an after insert business rule on that table that is executed when the produced record is for your table which "writes back the information" (record producer id) into your table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2024 06:24 AM
Hello @SM16,
I can give you an alternate option to achieve the same requirement.
- Create Variable set - Create a field and update the default value as javascript:current.cat_item
- In RP script: current.type = producer.<field name created in variable set>;
You don't need to create multiple properties.
Thanks,
Abdul Fathah
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Abdul Fathah
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.