Problem: auto set line level date fields initially...
# suitescript
m
Problem: auto set line level date fields initially as soon as the customer name is selected on SO. Is this possible via workflow? Triggering based on body level field, update line level? What's the alternative? Thanks...
m
This is kind of possible via workflow. But you will be bound by native functionality For example if you have subsidiaries enabled you cannot add line items before selecting a vendor. So there would be no lines to update when vendor is selected. You can trigger the date field on each line when the item field (or any other field ) is set
m
Hmm so basically updating the item first at line level to then trigger other line level fields.
m
Yes. Or quantity or memo etc
I usually just choose any field I’m sure will be filled out
You would need to do a formula for this. Sometimes when you do a join from another record it doesn’t work in formulas
You can also make an integer field on the PO that copies the LT from the supplier onto the PO then use that field in your formula
I would add a set field value action using after field edit trigger The triggering client field is subsidiary Set a new custom body field called lead time based on US lead time on vendor record Put a condition on the action of Subsidiary = US
Copy this action 6 times and change the field source and condition for each subsidiary
Then when you select the vendor then subsidiary it will populate the body field properly when they select the subsidiary
Then use this new body field in your calculation of the expected receipt date
(FYI I don’t think you can populate the expected receipt date with a formula using client triggers as the user is filing in the lines, but you can definitely do it upon save of the record using before submit trigger or after submit and it will work)