This topic contains 4 replies, has 0 voices, and was last updated by Duncan 7 years, 10 months ago.
-
AuthorPosts
-
December 9, 2016 at 10:48 am #10335
DuncanHi,
We’d like to have the Invoice Numbers based on the Sales Order numbers they are created from. We created a event-based workflow for Invoices (On Create) updating Invoice Number field:
Code:
Invoice Number=XX-{createdfrom}
When we bill a Sales Order, we still see the autogenerated number in the newly created invoice. We changed the Workflow to test with a static value to make sure formula is not the culprit:Code:
Invoice Number=AB-123123
Still nothing.I changed “On Create” to “Before Submit” to eliminate the possibility that the auto-number generator runs after our workflow, but that did not help either.
What are we missing? TIA.
This is a cached copy. Click here to see the original post. -
December 9, 2016 at 11:21 am #10336
MikeBucklaewI think it would have to be “After Submit” and you’ll need to check the “Allow Override” box in “Set Up Auto-Generated Numbers”. You will have to watch out for duplicate invoice numbers if a sales order requires multiple invoices ever. Full disclosure – I haven’t tried this.
-
January 4, 2017 at 2:41 pm #10337
DuncanOriginally posted by MikeBucklaew
View Post
I think it would have to be “After Submit” and you’ll need to check the “Allow Override” box in “Set Up Auto-Generated Numbers”. You will have to watch out for duplicate invoice numbers if a sales order requires multiple invoices ever. Full disclosure – I haven’t tried this.
Thanks for the answer. If we do it this way, it sounds like it will change the invoice number after saving the invoice. We would rather see the invoice number in the text box before submitting since there could be duplicates like you said, and put “B” at the end before submitting it.
-
January 5, 2017 at 5:38 am #10338
Olivier Gagnon NCHmm, that is a little odd. My only thought would be to experiment with a client-side script instead of a workflow, see if that solves it. I would also tend to think it’s a timing thing, but then you moving the trigger to before submit should have solved the problem, I would have imagined. So, not sure.
-
January 9, 2017 at 7:17 am #10339
DuncanI am happy to report that we were able to do this with the help of Netsuite support just using Workflows. The field to be updated is Ref No. Formula is ‘XX-‘||{createdfrom.tranid}
Also we had to put a trigger condition “CreatedFrom is not Empty” so that this would only trigger for the invoices created from Sales Orders.
-
AuthorPosts
You must be logged in to reply to this topic.