How to get the sys_id on the catalog script include

Abigail
Tera Expert

I have a record producer that creates a new Major Incident, but I also need to create an outage from that incident

What I need is the sys_id from that incident because I'm using a script include to create the outage.

My issue is that I'm receiving the sys_id from the record producer and not from the new incident record.

Any ideas?

This is the line of code

ga.addParam('val_number_value', g_form.getUniqueValue());
1 ACCEPTED SOLUTION

Najmuddin Mohd
Mega Sage

Hello @Abigail ,

I will tell you another approach.

There is a table 'sc_item_produced_record'. From the application navigator, type sc_item_produced_record.LIST

 

You can check all the records created using record producer.

Ex: Producer: Test (Record Producer Name) 
       Task: Record created.

 

NajmuddinMohd_0-1739298887653.png

 

Now, write a Business rule on sc_item_produced_record table with the following condition,
Producer | is | <Your record producer which creates major incident>

in the script,

Create an Outage and associate it with Incident whose reference you can get from this record populated in the Task field.  (current.task.sys_id)

 

 

If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.

View solution in original post

4 REPLIES 4

Najmuddin Mohd
Mega Sage

Hello @Abigail ,

I will tell you another approach.

There is a table 'sc_item_produced_record'. From the application navigator, type sc_item_produced_record.LIST

 

You can check all the records created using record producer.

Ex: Producer: Test (Record Producer Name) 
       Task: Record created.

 

NajmuddinMohd_0-1739298887653.png

 

Now, write a Business rule on sc_item_produced_record table with the following condition,
Producer | is | <Your record producer which creates major incident>

in the script,

Create an Outage and associate it with Incident whose reference you can get from this record populated in the Task field.  (current.task.sys_id)

 

 

If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.

Hello i need to access to certain information, and i cannot access from that table

Hello @Abigail 

TASK field refers to the Incident object, and from that you can all the information of the incident.

task.sys_id - SysId of the Incident
task.short_description - Short description of the Incident.

Can you tell me is any other information that you are looking for ?


If the above information helps you, Kindly mark it as helpful and Accept the solution,
Regards,
Najmuddin.

Hello @Najmuddin Mohdit's a new field that was not showing in the conditions.

But I was able to resolve it using the business rule.

Thanks for the help!