- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2020 09:28 PM
I want to add tag 'Data Error' in cmdb_ci form through business rule...is it possible?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2020 10:09 PM
Change the sys_id of the label as per your need.
var addLabelGR = new GlideRecord('label_entry');
addLabelGR.initialize();
addLabelGR.label = '4336c042dbd6485046a579a58c9619dd'; //change the sys id of the label you want.
addLabelGR.table = 'tablename';
addLabelGR.table_key = 'sys ID of record';
addLabelGR.insert();
You can get the sys id of the label from label table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2020 09:58 PM
Hi,
Can you elaborate in detail.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2020 10:08 PM
updated my question

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2020 09:58 PM
Hi Chidanandadhatri,
If you want your error to be displayed on top of the form below piece of will do so.
gs.addErrorMessage('type your message here');
If you want to add error message to be displayed below the specified field, use the below piece of code.
current.field_name.setError('type your message here');
Kindly mark my answer as Correct and Helpful based on the Impact.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-15-2020 10:01 PM
I want add tag , 'Test Message' on update of record, how to do that?