Comments on: Adding Fields to the Service Catalog Checkout Screen https://servicenowguru.com/system-ui/adding-fields-service-catalog-checkout-screen/ ServiceNow Consulting Scripting Administration Development Tue, 28 May 2024 20:44:33 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Vinoth Kumar https://servicenowguru.com/system-ui/adding-fields-service-catalog-checkout-screen/#comment-7801 Tue, 09 Jan 2018 13:52:32 +0000 https://servicenowguru.wpengine.com/?p=2635#comment-7801 I am still having an intermittent issue, has any one faced this issue even after adding addLoadEvent(sendHintsToCart); to your client script?

]]>
By: Vinoth Kumar https://servicenowguru.com/system-ui/adding-fields-service-catalog-checkout-screen/#comment-7800 Thu, 04 Jan 2018 20:06:01 +0000 https://servicenowguru.wpengine.com/?p=2635#comment-7800 Hi Michael,

I tried your solution that the cart value newly added additional fields are not working for non admin users.

Can you please explain me, the use of first two lines in the below script, since you have mentioned that it will work while clicking on order now button, for my case, it has to work, when I click on “Check out” Button.

Can you help me on this

var sub = $(‘sysverb_insert’);
sub.observe(‘click’, sendHintsToCart);

function sendHintsToCart(){
var fieldSeparator = ‘^’; //Cannot be ‘:’ or ‘=’
var nameValSeparator = ‘IS’; //Cannot be ‘:’ or ‘=’
var newField = gel(‘sc_cart.requested_for.location’);
var newField1 = gel(‘sc_cart.requested_for.phone’);
var newField2 = gel(‘sc_cart.requested_for.pod’);

var checkoutValues = ‘u_requester_location’ + nameValSeparator + newField.value + fieldSeparator + ‘u_requester_phone’ + nameValSeparator + newField1.value + fieldSeparator + ‘u_requester_pod’ + nameValSeparator + newField2.value;

var ajax = new GlideAjax(‘CartUtilityAjax’);
ajax.addParam(‘sysparm_name’,’setCartItemHints’);
ajax.addParam(‘sysparm_uid’, g_user.userID);
ajax.addParam(‘sysparm_popval’, checkoutValues);
ajax.getXML();
}

]]>
By: Sherard Pulmano https://servicenowguru.com/system-ui/adding-fields-service-catalog-checkout-screen/#comment-7799 Tue, 08 Mar 2016 16:34:02 +0000 https://servicenowguru.wpengine.com/?p=2635#comment-7799 Does the new Fuji/Geneva cart layout process break this?

I am not changing anything with the new cart layout process but adding this solution into it. I get as far as executing the setCartValue client script. However, no data is being passed to Request. I have triple checked everything, so I am wondering if the new cart process is conflicting or something is still not right in my setup.

How would I do this with the new cart layout process in Fuji and Geneva?

]]>
By: Syaharruddin Md Salih https://servicenowguru.com/system-ui/adding-fields-service-catalog-checkout-screen/#comment-7798 Wed, 06 Jan 2016 17:46:15 +0000 https://servicenowguru.wpengine.com/?p=2635#comment-7798 In reply to Tim Alman.

I know this is an old post but it’s still relevant and we’re on Eureka.

Tim,
I have the same problem as you and here’s what I did to fix it.

On the Client Script section of the UI Page: servicecatalog_checkout_one, add the following line at the end:
addLoadEvent(sendHintsToCart);

Essentially I’m updating the cart as soon as the checkout page loads. I’m also adding onChange event calling the same function for each of the variables.

This is a proactive approach rather than reactive i.e. waiting for click. The cart is being deleted after submission so it’s probably a timing issue. We’re trying to update the cart while it’s being deleted.

]]>
By: David Silva https://servicenowguru.com/system-ui/adding-fields-service-catalog-checkout-screen/#comment-7797 Tue, 17 Feb 2015 04:02:52 +0000 https://servicenowguru.wpengine.com/?p=2635#comment-7797 In reply to Michael Brown.

Thanks a lot Michael, I was dealing with this the whole weekend, works great!

]]>
By: Ger McNamara https://servicenowguru.com/system-ui/adding-fields-service-catalog-checkout-screen/#comment-7796 Tue, 27 Jan 2015 09:57:42 +0000 https://servicenowguru.wpengine.com/?p=2635#comment-7796 Hi guys,
I created a free text field with ‘ui_input_field’.
We are using the field so the requester can enter the name of a new user (its free text as the new user would not be on the system yet so we cant look it up)
However, I find that when a name contains an apostrophe the screen just hangs. for example. John O’Brien.
Has anyone else seen this?

]]>
By: Tim Alman https://servicenowguru.com/system-ui/adding-fields-service-catalog-checkout-screen/#comment-7795 Fri, 19 Sep 2014 22:04:02 +0000 https://servicenowguru.wpengine.com/?p=2635#comment-7795 In reply to Tim Alman.

Ok, I think I’ve found a pattern. One of the added fields is a choice list. It seems if I visit the field on the checkout screen, then this works, but if I don’t visit the field (tab to it or click on it), then this breaks. I don’t have the “none” value turned on for the choice list because I don’t want the order to be submitted with a choice being made.

]]>
By: Tim Alman https://servicenowguru.com/system-ui/adding-fields-service-catalog-checkout-screen/#comment-7794 Mon, 15 Sep 2014 15:31:53 +0000 https://servicenowguru.wpengine.com/?p=2635#comment-7794 In reply to Tim Alman.

In a sampling of 20 requests, 8 times the variables did not copy from the checkout screen to the request.

]]>
By: Tim Alman https://servicenowguru.com/system-ui/adding-fields-service-catalog-checkout-screen/#comment-7793 Fri, 12 Sep 2014 14:52:54 +0000 https://servicenowguru.wpengine.com/?p=2635#comment-7793 In reply to Josh B.

I’m having an intermittent issue with this code. I’ve created the AJAX solution since we are using the high security and I’ve added the cart_item.addQuery(‘active’, ‘true); to the ajax. We are also on Eureka, if that makes a difference.

I added gs.logs to the ajax as part of my debugging and found that the uid and popVal are being filled in. I’m not always getting a log statement from in the query before setting the cart_item.hints. So it seems like it’s not always getting the cart_item.

Have you seen this happen before? Is there anything else I should check out in the system?

]]>
By: Mark Stanger https://servicenowguru.com/system-ui/adding-fields-service-catalog-checkout-screen/#comment-7792 Wed, 26 Mar 2014 23:13:28 +0000 https://servicenowguru.wpengine.com/?p=2635#comment-7792 In reply to Michel.

Thanks for the info Michel! I look forward to seeing your solution once you’ve completed it.

]]>