- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2022 09:10 AM
Hello
I am able to view the value for a filed in list view , but when I open the form, the value gets cleared. I have deactivated all the backend policies, but its still not working.
The value is being populated via REST API POST method, using postman
Please advice!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 03:24 AM - edited 10-28-2022 03:30 AM
If the issue is happening only on form then most probably there is any client script or UI policy doing this. Since you can see the name and link for a reference field in the list, it is convincing that record do exist (I beleive clicking on the item name from list view would be opening the catalog item). For troubleshooting purpose I would suggest follow below Procedures:
1. Open the RITM in the middle pan of the servicenow home page and then click on the gear icon available at top right, go to the Developer section and enable the Javascript Log and field watcher. You will see servicenow debugger has open at the bottom of the page
2. Now reload the RITM form and right click on the field on which you are having this issue. I beleive you see this issue in Item field, so right click on that and select Watch field. If watcher gets set then it shows a bug icon next to the field
3. Now reload the form, wait for the form to complete the load and then go to the Field Watcher section of the debugger and see if you see any clent script name or UI policy showing value change from 039c516237b1300054b6a3549dbe5dfc to (empty)
if you see anything like that then you have found your cultpril.
Let me know if you find anything.
I Hope this helps.
Please mark this helpful if this helps and Accept the solution if this solves your issue.
Regards,
Kamlesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 03:16 AM
Hello,
1) This error is generally seen when you try to update the value in reference field (Configuration item in your case)which doesn't exist in the referenced table(configuration item table).
Check if the value you are trying to update actually exists in your CMDB
2) Check the scripts which is setting value of a reference field
While setting the value of reference through client script, we should set both value and display value like the below:-
g_form.setValue('u_field_reference', value, displayValue) ;
3) Check the sys_id of the record you are selecting is there any hypen in the sysid.
Please mark my ansawer as correct based on Impact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 03:24 AM - edited 10-28-2022 03:30 AM
If the issue is happening only on form then most probably there is any client script or UI policy doing this. Since you can see the name and link for a reference field in the list, it is convincing that record do exist (I beleive clicking on the item name from list view would be opening the catalog item). For troubleshooting purpose I would suggest follow below Procedures:
1. Open the RITM in the middle pan of the servicenow home page and then click on the gear icon available at top right, go to the Developer section and enable the Javascript Log and field watcher. You will see servicenow debugger has open at the bottom of the page
2. Now reload the RITM form and right click on the field on which you are having this issue. I beleive you see this issue in Item field, so right click on that and select Watch field. If watcher gets set then it shows a bug icon next to the field
3. Now reload the form, wait for the form to complete the load and then go to the Field Watcher section of the debugger and see if you see any clent script name or UI policy showing value change from 039c516237b1300054b6a3549dbe5dfc to (empty)
if you see anything like that then you have found your cultpril.
Let me know if you find anything.
I Hope this helps.
Please mark this helpful if this helps and Accept the solution if this solves your issue.
Regards,
Kamlesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 04:03 AM
Hi Kamlesh
Yes , when in list view I click the item, it opens the particular record. I will check on your solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2022 04:30 AM
Thank you Kamlesh
This worked. I found a catalog client script clearing this value of the RITM form.