Source Request UI Action in Procurement

Rajarshi1
Tera Expert

I installed the "Procurement" plugin in our ServiceNow instance and was trying to understand the overall flow. I came across two UI action named "Source Request" which are of same name and the conditions provided for both the cases are same. Can anyone please help why two UI actions are there OOTB with same name? Also what is the condition for the "sourceable" field to become true? 

 

 

find_real_file.png

 

find_real_file.png

Any leads would be of great help.

 

Thanks!

1 ACCEPTED SOLUTION

rammohanraomadd
Kilo Guru

Hi,

 

There is a difference in the condition:

For Onclick "openPopUp()" : current.parent.sys_class_name == "sc_request" && !current.parent.sourced && !current.isNewRecord() && (gs.getSession().getProperty('user_agent_browser') == 'ie' && gs.getSession().getProperty('user_agent_version') < 10)

 

For onclick "openSourceRequestPage()" : current.parent.sys_class_name == "sc_request" && !current.parent.sourced && !current.isNewRecord() && !(gs.getSession().getProperty('user_agent_browser') == 'ie' && gs.getSession().getProperty('user_agent_version') < 10)//! has been given in the condition

 

Condition for sourceable field to be true is when the catalog item related to the current request contains model then the "Sourceable" field be checked. Please find the below BR for reference:

 

Can request be sourced

 

Please let me know for any queries.

 

Regards,

Ram M

View solution in original post

5 REPLIES 5

rammohanraomadd
Kilo Guru

Hi,

 

There is a difference in the condition:

For Onclick "openPopUp()" : current.parent.sys_class_name == "sc_request" && !current.parent.sourced && !current.isNewRecord() && (gs.getSession().getProperty('user_agent_browser') == 'ie' && gs.getSession().getProperty('user_agent_version') < 10)

 

For onclick "openSourceRequestPage()" : current.parent.sys_class_name == "sc_request" && !current.parent.sourced && !current.isNewRecord() && !(gs.getSession().getProperty('user_agent_browser') == 'ie' && gs.getSession().getProperty('user_agent_version') < 10)//! has been given in the condition

 

Condition for sourceable field to be true is when the catalog item related to the current request contains model then the "Sourceable" field be checked. Please find the below BR for reference:

 

Can request be sourced

 

Please let me know for any queries.

 

Regards,

Ram M

Hi Ram,

 

Thanks for the input.

 

Now I understood based on what conditions sourceable field is getting checked.

 

But it will of great help if you kindly elaborate the difference between the conditions of the ui action mentioned above.

 

 

Thanks!

Hi Rajarshi,

 

Please find the below statements:

 

For openPopUp() below conditions to be matched

1. Parent Field to be updated with Request (sc_request)
2. Sourced Field on Request Table should be false
3. It should not be a new record
4. Browser is IE
5. Browser Version should be below IE10


For openSourceRequestPage() below conditions to be matched

1. Parent Field to be updated with Request (sc_request)
2. Sourced Field on Request Table should be false
3. It should not be a new record
4&5. Browser should be other than IE or if the browser is IE then the IE Version should be above IE9

 

Hope this helps.

 

Regards,

Ram M

 

 

 

Hi Ram,

 

It is indeed of great help.

 

Can you also help me to understand the difference between $source_request and source_request.

 

 

Thanks!