Service Catalog - Order Guide - Hide "Shipping Address" "Special Instructions"

davide_fais
Tera Expert

Hi All,

How can I hide field "Shipping Address" "Special Instructions" in Service Catalog Order Guide?

I've attached the screenshot for details.

Thanks

Best Regards

Davide

1 ACCEPTED SOLUTION

shloke04
Kilo Patron

Hi,



1) You don't need any script for this, you can simply navigate to the Module "Maintain Cart Layout" under Service Catalog Application Menu as shown below:



find_real_file.png



2) Select "Cart Preview Screen(two Step)"   as shown above in the screen shot.



3) Open the form and then Navigate to the "Components" Tab as shown below and uncheck the fields "Shipping Address and Special Instructions" and click on Update button to remove it from the Page.



find_real_file.png



Result:



When the above checkboxes was selected the fields were displayed on the form as shown below:



find_real_file.png



Now if I uncheck the fields as shown below the same gets removed from the Page also. Please refer the screen shots below:



find_real_file.png



find_real_file.png



"Shipping Address and Special Instructions" are now removed from the page.



Hope this helps.Mark the answer as correct/helpful based on impact.



Regards,


Shloke


Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

View solution in original post

13 REPLIES 13

Nitin_NOW
Tera Guru

Hello Davide



You can write a UI policy to hide these fields on your order guide


Hope this link helps you. Creating a UI Policy - ServiceNow Wiki



Regards!


Hi Nitin,



No, these aren't variables of order guide but are fields out of the box in the Checkout UI Page.


So I can use ui policy


ajitchandragiri
Giga Expert

you can do that by Cart layout. Go to maintain cart layouts. Target type: browser screen, cart preview screen(two step). In widget macros, remove the special instructions macro and modify the sc_cart_view_requested_for. you will have to make a copy of this and comment out the shipping address part and add this copy of macro to widget macro and remove the default one. you will figure it out. refer https://docs.servicenow.com/bundle/istanbul-it-service-management/page/product/service-catalog-manag...



find_real_file.png


Jim60
Tera Expert

You could use an onLoad client script in your catalog item...



function onLoad() {


  //check for Order Guide


  var getIsGuide = function(){


  var value = false;


  if (window){


  var item = $("current_item");


  var guide = $("sysparm_guide");


  value = (item && guide && item.value != guide.value);


  }


  else {


  value = g_service_catalog.isOrderGuide();


  }


  return value;


  };


  var isGuide = getIsGuide();


  if (isGuide){


  //hide the requestor info and it's container until patch comes out to fix alignment issues in portal


  g_form.setDisplay('requester_info', false);


  g_form.setDisplay('location', false);


  }


}