Hi all could some one please suggest what is the b...
# suitescript
c
Hi all could some one please suggest what is the best event to update inventory location on sales order line? My requirement is I have to default inventory location from body location on line init. But observed till item select we can't add inventory location and some script is getting values from backend (Ajax call) and replacing it. When I tried to update value on item field change when backend takes time to get inventory location it is failing to add inventory location.any suggestions?
s
Have you tried postSourcing entry point on a client script?
c
Hi @Sandii yes tried that too.. inventory location has dependent field inventory subsidiary which will be sourced on selecting inventory location. So this keeps in infinite loop.
s
You should be able to avoid an infinite loop by making sure the postsourcing only triggering when
context.fieldId
is whatever you need it to be.
c
Thank you Sandii. Tried that way . But one more issue is this inventory location field change is triggering one server side script and getting html to replace inventory subsidiary and location again which is setting to blank againm