How to get incident number in catalog client script using alert message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2018 01:48 AM
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.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2018 02:15 AM
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'));
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2018 02:20 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2018 03:46 AM
thank you guys i got it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2018 04:23 AM
please close the forum by making answers correct