"Source request" UI action in Procurement process

bhargavakandlak
Kilo Explorer

Hi,

I installed procurement plugin and when I click on "source request" UI action   present on catalog task it is redirecting to a page which is asking for some details. Code of UI action is below

function openSourceRequestPage() {

  var gr = new GlideRecord("sc_task");

      gr.get(g_form.getUniqueValue());

  var url = new GlideURL('$source_request.do');

  url.addParam('sysparm_stack', 'sc_task.do?sys_id='+gr.sys_id);

  url.addParam('sysparm_req_sysid', gr.parent);

  url.addParam('sysparm_sc_task',gr.sys_id);

  url.addParam('sysparm_nostack', 'true');

  window.location.href = url.getURL();

}

What is glide URL? What will '$source_request.do' do. I tried to remove "$" and verified that it is redirecting to "source_request" page, but '$source_request.do' is redirecting to a page which I am not able to find in UI pages.

I want to edit the content in '$source_request.do' page. Is there anyone who worked on this?

Thanks,

Bhargava

8 REPLIES 8

Julian Hoch
ServiceNow Employee
ServiceNow Employee

GlideURL is documented here: https://developer.servicenow.com/app.do#!/api_doc?v=helsinki&id=r_GURL-GlideURL_S


The page itself is a UI Page "source_request", but modifying that will be quite complicated and is not generally advised. If you change that page, you might run into trouble after an upgrade.


Hi Julian,



Thanks for the reply.



The content in "source_request" Ui page and the page which I see when I click on "Source Request" UI action is different.



var url = new GlideURL('$source_request.do'); and var url = new GlideURL('source_request.do'); are rendering different pages.



Can you please guide me the difference between   '$source_request.do' and 'source_request.do'?



Thanks,


Bhargava


I've taken another look at the UI actions - looks like in Helsinki a browser switch was introduced, and IE will see another version ($). I don't think you can edit the IE version.


In my case to request Purchase Order, we have a different template to fill. Now is there any way I can achieve using OOB functionality?



My thoughts:


1. Create required field (template) on Purchase order form.


2. On click of "Source Request" UI action, redirect to new Purchase order form.


3. Populate Request number on Purchanse order form



Please provide your inputs for implementing my thoughts.