Delivery address

mrandria
Giga Contributor

Hi everyone,

I have 2 issues with the delivery address in the request form

1- the delivery address if filled if only the following fields are filled : Street, City, State/province, Zip/Postal code et Country in cmn_location table

2 - the field is the requested_for location by default, if I change the value to another location for example, when the item is to be shipped to another address but not the requested_for's location. Then the system doesn't keep it and when I open the record the field is blank.

Could you help me to deal with this 2 issues. Thanks a lot

Regards,

MR

6 REPLIES 6

Ivano B
ServiceNow Employee
ServiceNow Employee

Hi Miora



Ok i have some answer for you.



About your first issue. The location field is populated using a specific client script named.


'set location' available on the table named 'sc_cart'.


This script is used to load the actual location of the user but set the field with that specific format.


So probably you can try to work on that one to make the format consistent.



About the location. You need to create something specific to populate the field.


Let me explain.


First of all every time you create something in the cart a default record for your user is created in the table named 'sc_cart'


There UI script named 'CartCheckoutFunctionsV2' that is responsible to update this record every time you change an info such us requested for or shipping


location.



As visible in this example my cart is populated with the information available on the checkout form.


DEFAULT___ServiceNow_Service_Management.png



Now you need to create a business rule that will use the info contained into the Delivery address field to update the field on the requested item.


Unfortunately the code available on 'CartCheckoutFunctionsV2' takes info about the location and not the sys_id.



Please try and let me know.



I hope this will help/answer and if it does please mark it


Cheers



R0b0


mrandria
Giga Contributor

Thank you for your help 🙂 I will try it


As I am not really good with code, would   you please suggest me some hints for the business rule I have to script?


Regards,



MR