setLabelOf() does not work on an RITM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
38m ago
I've been working on some form changes, and I've realised that while you can manipulate the label of a field within a catalog form using the setLabelOf(), the same onLoad script would not work on the RITM, and this is my experience currently.
Could you please validate if I'm missing something here - I have a field in a catalog form called 'directorships'. The label of the field is 'Mention the Directorships', and I'm using an onLoad client script to change the label of this field to 'Hello. This is the directorships label.' Whilst the latter label is displayed as expected on the portal, the submitted RITM still shows the old label.
@Ankur Bawiskar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
27m ago
then it means it's not working in backend view i.e. on RITM form
you might have to use DOM manipulation for this
Note: DOM manipulation is not recommended
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
13m ago
Hi @Akshay Bhaskar ,
Please check below links,
https://www.servicenow.com/community/developer-forum/setlabelof-not-working/m-p/1791751
Please mark my answer correct and helpful if this works for you
Thanks and Regards,
Sarthak
