Client script works partially service operation workspace

Tal5
Giga Guru

Dear Experts,

I would be grateful for your assistance with an issue I am encountering.

I am working with a client script on an incident form where I am supposed to automatically retrieve data such as the phone number and location upon selecting a caller.

On the Service Operation Workspace, while the location is correctly populated when I select a caller, the phone number field remains unfilled.

Has anyone encountered a similar issue, and could you offer guidance on how to resolve it?

Thank you for your support.

 

Best regards,
Tal

1 ACCEPTED SOLUTION

Bhavya11
Kilo Patron

Hi @Tal5 ,

 

why your trying using client script.

you can dot walk to through the caller mobile then bring that to the form so that it will automatically populated if the value present in phone/mobile in user table

 

just an example 

Bhavya11_0-1722491073163.png

then before changing the caller value 

Bhavya11_1-1722491110446.png

after changing it

 

Bhavya11_2-1722491149645.png

 

then in user table these information need to present 

 

Bhavya11_3-1722491206251.png

 

 

Please mark  correct answer and helpful if it's really worthy for you.

 

Thanks,

BK

 

View solution in original post

4 REPLIES 4

Rizwan34
Giga Contributor

 

  • Check Script Logic: Review the script for logical errors or incomplete code.
  • Verify Permissions: Ensure the script has the necessary permissions to access and manipulate the required data.
  • Test in Different Contexts: Test the script in various scenarios to identify specific cases where it fails.
  • Check for Errors: Look for error messages in the browser console or ServiceNow logs that might indicate what’s going wrong.
  • Review Workspace Configuration: Ensure that the workspace settings and configurations are correct and compatible with your script.

 

Bhavya11
Kilo Patron

Hi @Tal5 ,

 

why your trying using client script.

you can dot walk to through the caller mobile then bring that to the form so that it will automatically populated if the value present in phone/mobile in user table

 

just an example 

Bhavya11_0-1722491073163.png

then before changing the caller value 

Bhavya11_1-1722491110446.png

after changing it

 

Bhavya11_2-1722491149645.png

 

then in user table these information need to present 

 

Bhavya11_3-1722491206251.png

 

 

Please mark  correct answer and helpful if it's really worthy for you.

 

Thanks,

BK

 

If you choose to follow this option, consider using a UI Policy to make those dot-walked fields read-only. Otherwise, your users may edit them without realizing that they are changing the data in the User record and not just in the Incident.

Haseeb-Ahmed
ServiceNow Employee
ServiceNow Employee

Hi @Tal5 ,

Can you share your client script code to figure out the issue and the use case you are trying to achieve.

 

Thanks,
Haseeb Ahmed