Assign tag through Business rule

chidanandadhath
Kilo Guru

I want to add tag 'Data Error' in cmdb_ci form through business rule...is it possible?

1 ACCEPTED SOLUTION

Kalaiarasan Pus
Giga Sage

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.

View solution in original post

8 REPLIES 8

Dhananjay Pawar
Kilo Sage

Hi,

Can you elaborate in detail.

Thanks.

updated my question

Chaitanya Redd5
Tera Guru

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

chidanandadhath
Kilo Guru

I want add tag , 'Test Message' on update of record, how to do that?