Pre-Populate Change request field value

Pallavi65
Tera Contributor

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

9 REPLIES 9

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

 

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.

SK Chand Basha
Giga Sage

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. 

rathan_now
Tera Contributor

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.

 

Nikhil Bajaj9
Giga Sage

I guess you can try with on load client script to populate Select box field.

Please appreciate my efforts, help and support extended to you by clicking on – “Accept as Solution”; button under my answer. It will motivate me to help others as well.
Regards,
Nikhil Bajaj