Scripting Help- How to Auto Populated Reference Variables in a Catalog Item from a UI Action

Su522
Kilo Sage

I have a UI Action and an onLoad Catalog Client Script that needs to auto-populate variables from a record to the Catalog Item form.

This is working but I can't seem to get the code right for the Reference fields to Account and Ticket #

 

How it should work:

From a saved record, click the UI Action that directs to the Catalog Item (I have this working) > the Catalog Item needs to be auto-populated with the following fields from the record:

Account name

Ticket #

 

Can someone please help by providing examples of how I can get this to work?

 

Any help is greatly appreciated!!

Thank you,

Susam

1 ACCEPTED SOLUTION

@ssellmeyer 

You can use the above logic if it is in service portal but for the native UI, you can make use of the below function:

function getParmVal(name){
    var url = document.URL.parseQuery();
    if(url[name]){
        return decodeURI(url[name]);
    }
    else{
        return "";
    }
}

(=tested)

 

Thanks,
Murthy

View solution in original post

5 REPLIES 5

ssellmeyer
Tera Guru

Any help on this please?