build description filed will the name of a user selected from the form

Bret Smith
Giga Guru

How do It covert 

contact_person (Reference using sys_user)

after selecting the user, the contact_person variable has the sys_id
How do I load the name of the user and not the sys_id into the description field of the record I am trying to create 

 

 

 if (producer.request_reason == 'Update existing'){
    current.short_description = producer.request_reason+' Dashboard/Report';
    current.description = 'Title of existing dashboard/report: '+producer.update_title_of_dashboard+
'; Subject Matter Expert Name:  '+producer.contact_person;
}
1 ACCEPTED SOLUTION

swathisarang98
Giga Sage
Giga Sage

Hi @Bret Smith ,

 

You can just dot walk like producer.contact_person.name;

 

 

 if (producer.request_reason == 'Update existing'){
    current.short_description = producer.request_reason+' Dashboard/Report';
    current.description = 'Title of existing dashboard/report: '+producer.update_title_of_dashboard+
'; Subject Matter Expert Name:  '+producer.contact_person.name;
}

 

 

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang

View solution in original post

2 REPLIES 2

SAI VENKATESH
Tera Sage
Tera Sage

Hi @Bret Smith 

 

You can write before insert or update business rule and Tried in my pdi and it is working FIne and change the values based upon your requirement

 

(function executeRule(current, previous /*null when async*/) {

	// Add your code here
	var caller_id=current.caller_id.getDisplayValue();
	gs.addInfoMessage("caller_id");
	current.setValue('short_description',caller_id);

})(current, previous);

 

 

Thanks and Regards

Sai Venkatesh

 

swathisarang98
Giga Sage
Giga Sage

Hi @Bret Smith ,

 

You can just dot walk like producer.contact_person.name;

 

 

 if (producer.request_reason == 'Update existing'){
    current.short_description = producer.request_reason+' Dashboard/Report';
    current.description = 'Title of existing dashboard/report: '+producer.update_title_of_dashboard+
'; Subject Matter Expert Name:  '+producer.contact_person.name;
}

 

 

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang