setting reference field value

_bhishek
Tera Guru

Hi All,

I have a small query .

I have one configuration item field for RITM and TASK both which is referencing to cmdb_ci table .For one catalog item i want to display one configuration item .

I tried run script in workflow with below 

task.cmdb_ci="Automated Regulation";

Also i tried with Insert update BR with setting valuse of cmdb ci field to same value on RITM table .

But value is not being displayed .Please suggest me what am i missing here .Or suggest any other way to achieve this .

Thanks .

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

For SC Task you can use this

task.setDisplayValue("cmdb_ci","Automated Regulation");

For RITM Record you can use Run Script activity in your workflow

current.setDisplayValue("cmdb_ci","Automated Regulation");

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

6 REPLIES 6

_bhishek
Tera Guru

Hi Ankur,stark,

Thanks for your response .

I was using these methods earlier .But  cmdb _ci field is not being populated with this value .When I checked the list view of sc_req_item table ,I can see cmdb_ci field is updated with this value but in form view this value is not visible .In form view cmdb_ci field is blank.

Please suggest me what could be the issue .

Thanks .

Hi,

it means some client script or UI policy is clearing that field on form.

please check that once.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader