Get Sysid of the Target Record produced by the Record Producer in Catalog Client Script

EZHIL ARASAN1
Tera Contributor

I need to get the Sysid of the Record created by the record producer on Submit in a Catalog Client Script. The record producer is created for a Custom Table.

Is there an OOB way to achieve it?

 

I found a similar post below where it works for the incident table. But for my requirement i need the code for a custom one.

https://www.servicenow.com/community/developer-forum/get-sysid-of-record-producer-in-catalog-client-... 

1 ACCEPTED SOLUTION

That's correct and another reason why we as people who are trying to help others on these forums, shouldn't really reply to someone offering suggestions if we haven't verified them ourselves or at least feel pretty confident in it. This not only affects the current poster, but all future readers.

 

It wasn't appropriate, in my opinion, to use AI to generate suggestions which none of them are correct or useful in this given scenario.

 

For your issue, unfortunately, accessing it prior to submission may not be able to be accomplished.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

View solution in original post

7 REPLIES 7

Hi Mark,

Thanks for the response.

I tried these methods within the record producer itself but its fetching the sysid of the record producer itself but not the target record. I guess these methods work if its written directly on the target record (correct me if i am wrong). 

As you have said, yeah the gel() method didn't work on custom applications.

That's correct and another reason why we as people who are trying to help others on these forums, shouldn't really reply to someone offering suggestions if we haven't verified them ourselves or at least feel pretty confident in it. This not only affects the current poster, but all future readers.

 

It wasn't appropriate, in my opinion, to use AI to generate suggestions which none of them are correct or useful in this given scenario.

 

For your issue, unfortunately, accessing it prior to submission may not be able to be accomplished.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Oscar Lopez
Mega Guru
Mega Guru

When a Record Producer form is submitted in the Portal, there is an OOB table where the target Task/record is mapped againts the record producer, leveragin this table you can tell for example from which record producer an inciet was created and run the process/workflow desired accordingly.

 

The table name is: sc_item_produced_record

 

OscarLopez_0-1743422524899.png