How to Redirect on other record producer on change of client script.

rmaroti
Tera Contributor

Hello All,

 

When we select value in reference variable on record producer then it will redirect to another record producer with same selected value in previous record producer. to the redirect record producer.

3 REPLIES 3

Chandresh Tiwa2
Mega Guru

Hi rmaroti,

 

If I understood the requirement correctly, when a reference value is selected in first record producer, you want to open another record producer in a new tab with same value field in reference field as in first record producer. Is this correct?

 

Regards,

Chandresh 

Mark Manders
Mega Patron

What exactly is your process? Somebody is creating a record and you want them to create a different record? Why not create an order guide then?

I assume you want this after submitting the record? Just set a redirect on the record producer script to the URL of the other record producer.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

bradleydebono
Mega Guru

Good day,

 

There are probably better user experiences than redirecting them from one record producer to another. However you know your instance better than I do. To redirect on an onChange client script you can use the code below. Remember to set it to run in the Service Portal or on All UI types.

function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue == '') {
        return;
    }
    var redirectURL = '<your new record producer URL';
    top.window.location = redirectURL;