RE: Sublist values cleared after pageInit Client Script
Hello!!
I am trying to inizialize a Purchase Order created from a Sales Order with Special Order.
I prepared a Client Script with pageInit function.
The body fields are initialized without any problem.
When I initialize the items from “Item” sublist, something strange happens. In particular, I am trying to set the rate field by taking values from a custom field that was inherited from Sales Order. The value is correctly initialized (i see it from the log) but it is cleared immediately afterwards. Obviously I tried the triggers like fireSlavingSync with no effects.
I also tried to use lineInit or sublistChanged entry points without any luck.
Has anybody experienced something like that? Does anybody know what is clearing the values?
Thanks in advance!
UPDATE.
I solved by setting not only the field “rate” but also the field “origrate”. Somebody suggested to set the price level to custom (price=-1) but this had not effect on the problem.
TonyShiva
I am trying the same in JE. I couldn’t set the value for the account sublist field but can set the value for the Amount field. Also couldn’t commit the line. whatever changes made are only applying to the first line. (can set body fields though)
The script,