I retrieved the Date(trandate) from the Sales Orde...
# suiteflow
a
I retrieved the Date(trandate) from the Sales Order to pass it to the invoice. E.g. Date on SO is 01.03.2022 which will appear also on the invoice when created. I do it via Set Field Value. The thing is it doesn't automatically update the posting period. It still shows January 2021. How can I evaluate the Posting period with the Date field on the invoice?
k
This sounds like a bad idea to set via workflow. Can you elaborate on the use case?
a
On the Sales Order I have customized an [Issue Date] and [Custom Due Date] field. E.g. today 1/31/22 the Sales Order will have 3 dates: • [Date] - can be the 15th of March, because it's the date of the event/service provided. So revenue will be recognized in March • [Issue Date] - Can be sent weeks in advance, this case 1/31/22 • [Due Date] - Fixed date (based on contract), e.g. 5 days before date of event - 3/10/22 When approved the invoice generated should have the same [Date] and [Due Date] from the Sales Order approved. The [Issue Date] must return always today's date. If approved and sent by AR in 2 days, the [Issue Date] must the 2/2/22. And now the problem: The posting period isn't updated accordingly to the [Date] field. Posting period should be March in any case, but shows January for today or February for tomorrow. If I click on the [Date] field and choose the exact same date, an event gets triggered and the posting period is updated automatically to March. But with the WF it unfortunately doesn't trigger this event. Hope it's clear..
@KevinJ of Kansas
k
How are you doing the set field value?
Is it a before record load?
a
This one is triggered on Entry
@KevinJ of Kansas I tried with Before Record Load, but the same result. Posting period is February instead of March
k
Is it a scheduled or during create?
a
@KevinJ of Kansas during create
k
What happens if you change your trigger to be "after field edit" and have something that the user must enter on the invoice as the trigger?
a
@KevinJ of Kansas We would like to automate the invoicing process in future, so it would be nice to have it triggered in the creation. Perhaps SuiteScript will do?
k
SuiteScript is probably the preferred method for doing this - because then you can actually look up the right period and set it