- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 02:02 PM
Hello,
This is primarily for educational purposes.
Currently the following code populated the sys_id in the description. How do I it to display the ritm number instead of sys_id? Thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 04:09 PM
@Keang ,Thanks for marking my answer as helpful. If it helped you in any way please accept the solution so that it will be beneficial to the future readers with the same query
Regards,
Swathi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 02:28 PM
Hi, your post mentions client script but you are referencing the current object in your code and this is not available client side.
In a client script g_form.getUniqueValue() will return the sys_id of the current open form\record
GlideForm | ServiceNow Developers
Can you update this post to clarify your requirement?
and why you want to update the description to be the same as the records 'number'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 03:57 PM
Hello @Tony Chatfield1
I apologize, Tony, for the lack of clarity in my question. I'm still in the process of learning JavaScript, so sometimes my inquiries might not come across clearly. However, I'm eager to absorb knowledge from you and the community's feedback.
Thank you for sharing the article link; it's incredibly helpful. I plan to dedicate time to reading it thoroughly to enhance my understanding.
Moving forward, my next question is for educational purposes. For instance, if the description field contains the sys_id of an old RITM, could I utilize a catalog client script to query information such as the number, created date, and creator? I understand that this information can be filtered from the list view, but I'm keen on learning how to achieve it through client scripting.
For example:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 04:21 PM - edited 03-21-2024 04:22 PM
Hi, normally if you want to look up data for a related record from client side best practice would be to use GlideAjax.
GlideAjax | ServiceNow Developers
It is possible to use GlideRecord from client side, just not recommended as it may cause performance issues.
GlideRecord | ServiceNow Developers
The core question is context and how\why the record sys_id is in the forms description field?
Also, normally a RITM record would be created at same time as the sc_request record, normally as part of the request creation process and so would share the creator\creation time and it's number would be visible to a fulfiller via related records list on sc_request form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 06:55 PM
The system has undergone numerous shifts in support analysts due to retirements, departures, and various other factors. This has contributed to the data being less than pristine.
As a newcomer to the company, I've been tasked with the responsibility of cleaning up this data. However, my understanding of the system is still limited. I heavily depend on the supportive ServiceNow community to guide me through challenges and enhance my knowledge.
While there may be instances where my questions are unclear or lack coherence, I am dedicated to learning from the valuable feedback provided by the community, much like the education you have graciously offered me. Thank you