How to get incident number in catalog client script using alert message

rgv123
Tera Contributor

Hello Guys,

I have a doubt.

 

I have created a record producer to record customer information.

when they submit it i have to pop-up a message saying that this is your incident number.

i did use catalog client script to print alert message but i am not able to retrieve incident number from incident table.

can anyone help me please. 

5 REPLIES 5

Sharique Azim
Mega Sage

i think you might not be able to use alerts pop ups here, but you can simppy manipulate the scripts to show the record number which is generated.

in the script just when you insert the record with your scripts:

 

//untested

 

gs.addInfoMessage("the record created is "+current.number);

 

 

or create another reference field for your source record producer and you can also use an onload script with condition:

if(g_form.getValue('i_record_producer','sys_id of the record producer'){

 

alert("The incident number is "+g_form.getValue('number'));

 

}

 

 

 

 

 

 

 

 

 

 

Kamal17
Kilo Sage

I agree with Shariq that your incident number gets generated only after submission of your record producer. So number value might not be available inside the script section of record producer when you try current.number.

Moreover, you can refer the community article. It might be helpful.

 

-Regards,

Udhay

rgv123
Tera Contributor

thank you guys i got it

 

please close the forum by making answers correct