Good afternoon :slightly_smiling_face:! Has anyone...
# suitescript
n
Good afternoon 🙂! Has anyone found an entry point for a client script to run, when each item is added (estimate record, item sub list) from an Item group? I'm trying to run a calculation between 2 field values as they are added. It seems that that this isn't possible.
l
Client script/sublist changed entry point?
n
I setup up logs on all entries and from what i see. Those entry points don't trigger till after all items have been added. It would be shame to trigger/run a loop after the event, instead of when they are added.
m
@netsuiteapplepie I've wondered about this in the past and haven't yet found a good solution - I think what you're suggesting about looping through everything between the
Item Group
line and the next
End of Group
line after an
Item Group
is added is probably (unfortunately) the best approach if you can get that to work.
n
Thanks @MTNathan, I kinda figured as much, as it would work against the default functionality. It would be nice if a custom item line field, would calculate a formula dymamical when the line is edited. If memory serves me correctly, the validation/defaulting will not calculate till after the line is saved/commited. I recall limitations on to what you can use for a formula as well. Maybe its changed since I've tried. I'll check it out again. Thanks for the suggestion @Lincecum. I appreciate the responses.
k
Wouldn’t fieldchanged work when you use the item field as the changed field. This worked for me in the past when calculating a custom gross profit
n
@karlenigma Unfortunately no. Item groups don't trigger a field change on the initial add. All items under an item group, are just dumped in sourcing from the item record data. When interaction occurs with an item line after the group is added, absolutely.