Check if order guide or not in catalog client script

Renu9
Tera Contributor

Hi All,

i am having a variable in variable set which is in order guide and also in the catalog items which are in rule base

The variable is a dropdown with 2 choices (choice A, choice B)

If the request is raised from catalog item then only choice A should be visible 

if the request is raised from order guide then both choices should appear

how to check if the request is raised from order guide or from stand alone catalog item in catalog client script

is there any method to check for order guide

pl guide

 

1 ACCEPTED SOLUTION

Sujatha V M
Kilo Patron
Kilo Patron

@Renu9 Did you check using the below syntax?

 

function onLoad() {
    var isOrderGuide = g_service_catalog.isOrderGuide();
    if(isOrderGuide) {
        g_form.addInfoMessage("We're part of an order guide!"); //You can hide the variables accordingly using the syntax
    } else {
        g_form.addInfoMessage("We are not a part of an order guide."); //You can hide the variables accordingly using the syntax
    }
}

 

Please mark this as helpful and accept it as a solution if this resolves your query.

Thanks,

Sujatha V.M.

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.

View solution in original post

1 REPLY 1

Sujatha V M
Kilo Patron
Kilo Patron

@Renu9 Did you check using the below syntax?

 

function onLoad() {
    var isOrderGuide = g_service_catalog.isOrderGuide();
    if(isOrderGuide) {
        g_form.addInfoMessage("We're part of an order guide!"); //You can hide the variables accordingly using the syntax
    } else {
        g_form.addInfoMessage("We are not a part of an order guide."); //You can hide the variables accordingly using the syntax
    }
}

 

Please mark this as helpful and accept it as a solution if this resolves your query.

Thanks,

Sujatha V.M.

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.