Catalog Client Script on target record is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2025 08:55 PM
We have a record producer that users are using to submit requests. Additionally, we are also submitting requests through scripts.
UI Type: All
Applies on Target Record: True
Now, the issue is:
When the request is submitted by an end user via the record producer, the catalog client script works as expected.
However, when the request is created through a script, the catalog client script does not run.
Scenario:
Based on the value of one variable, we need to make another variable visible and mandatory.
We considered using a table-based OnChange client script, but since variables are not available in the 'Field Name'dropdown, it seems this approach won't work.
Can anyone please suggest how we can handle this scenario when the request is submitted through a script?
- Labels:
-
Request Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2025 09:16 PM
Hi @IAmIshan
Could you share sample request screenshots for when it's submitted manually and when it's submitted via script?
Regards,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-12-2025 02:27 AM
Hello There,
I recently had the same issue and was able to resolve this by fixing the script producing the target record. The main issue for me was that the script generated record was not considered as a target record.
When duplicating record inside a record producer script you must create a new record inside the 'sc_item_produced_record' table as follows :
// First we create the record inside the target table
itProducer.initialize();
With this setup your Catalog Client Script and Catalog UI Policy (having Applies on Target Record = True) should trigger properly on the script generated target record.
Hope it helps 😉