Redirect to External URL in Business rule

chrisn_
Mega Guru

I am attempting to redirect to an external url after a user submits a record and a particular field is filled with a unique value. I need to take that unique value, plug it on the end of a static url and then redirect to it. example is 

https://iwantmystuff/service/{unique value}. I believe what I need to do is define the url using something like

var url = gs.generateURL  and then gs.setRedirect(url); but I am not utilizing this correctly as I am commenting out most of the code due to the // in the first line. I am obviously making a rookie error I don't realize. Can someone please help me craft this correct? The unique value is coming from a scoped application that is open to global scripts so this should be accessible. Do I also need to do a separate call for that unique value's value? To those who stop by, thank you very much for your time!

1 ACCEPTED SOLUTION

DScroggins
Kilo Sage

Hello please try the following:

var mainURL = 'https://iwantmystuff/service/';

var urlFinal = mainURL + current.FIELD_NAME.toString(); //Replace with your form field

gs.setRedirect(urlFinal);

 

--David

View solution in original post

12 REPLIES 12

DScroggins
Kilo Sage

Hello please try the following:

var mainURL = 'https://iwantmystuff/service/';

var urlFinal = mainURL + current.FIELD_NAME.toString(); //Replace with your form field

gs.setRedirect(urlFinal);

 

--David

Hello David,

You have no idea how much this example has helped me understand where I was going wrong with previous threads. Thank you very much for your time. You are a scholar and a gentleman!

You are very welcome! I'm happy that I could help you. 🙂

Hi David,

Please help me too..

I have a catalog item called "reactivate employee account". So to reactivate any deactivated users we will use this catalog item.

As you can see below, the name of the account to be reactivated should be the person whom we want reactivate their profile again(all the deactivated users).

So here as per the below business rule only the users who are having admin role are able to see this list on form. And this rule is global.

But from this I want to exclude this item. So, anyone should be able to see the list not only admins.(only for this item).

What Can I do?

Please Suggest.

Thank you,

Priya.