Pre-Populate Change request field value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2023 06:57 AM
Hello all,
I have created a URL type field on the change task form.
So, once the link is clicked by the user, it will redirect to new Normal Change request form.
Here, I want to populate a Select box field value with Yes, on change request form once it is opened.
Can someone tell me how can I achieve this?
REgards,
Pallavi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2023 08:26 AM
Hello Samaksh and Atul,
I am aware of on load and on change client scripts.
In my question I have clearly mentioned like, when a user clicks the link on the change TASK form, then a new change REQUEST form will be opened and in that change REQUEST form, I want to pre- populate a select box value to Yes
So please help
Regards,
Pallavi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2024 07:21 PM
I would create the new change record as part of the UI action the user is clicking on and use a template to pre-populate the fields you need set, get the sys_id of the record you just created and then navigate to that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2024 08:17 PM
Hi @Pallavi65
I would suggest create a ui action with related link type when the use click on it populate check box, If you use URL type field you can create a view of change request it would won't effect when user opens direct normal change instead of click on url.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2024 02:58 AM
Hi @Pallavi65
As per your Requirement, I tried in my PDI, by giving the URL as i mentioned below
"/change_request.do?sys_id=-1&sysparm_view=Demo_task&sysparm_domain=null&sysparm_domain_scope=null&sysparm_nostack=yes"
In Short :
- Created a view named "Demo_task".
- Modified the URL to which i mentioned above.
- Added the URL to a field of type URL in the Change Task form. (i Gave the Link as Default value for the URL field and made it Readonly, Now the link is Clickable but not Editable)
- Clicking the URL redirects to the New Normal Change Request form.
- Wrote an OnLoad Client Script for the "Demo_task" view.
- The script sets the "Flag" checkbox to true on load. ("Flag" is a custom created Checkbox)
I attached the Screen shots below. Please check.
If it helps you, do Mark it as helpful and accept the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2024 10:21 AM
I guess you can try with on load client script to populate Select box field.
Regards,
Nikhil Bajaj