How to set value for field type Phone Number (E164) from user mobile phone field?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2024 10:41 PM
Hello
I have a requirement that assigned to user in work order task form should get populate in project task record.
On that we want to populate a assigned to users mobile phone on phone field of project task record.
But the issue is the phone field is the type of Phone Number (E164) and Mobile phone value coming from sys_user is type of Phone number.
I have created a business rule:
if (current.assigned_to != "") {
var initiatedfrom = current.work_order.initiated_from;
var projectTask = new GlideRecord('pm_project_task');
projectTask.addQuery('sys_id', initiatedfrom);
projectTask.query();
if (projectTask.next()) {
var mobilePhone = assigned_to.mobile_phone;
projectTask.u_vendor_contact = assigned_to.name;
projectTask.u_vendor_email = assigned_to.email;
projectTask.u_technician_name = assigned_to.name;
projectTask.u_phone =assigned_to.mobile_phone.toString();
projectTask.u_email = assigned_to.email;
projectTask.update();
}
}

0 REPLIES 0