Hello ByD experts,
I will start by telling you my use case:
- I want to do a background job on Sales Order to check Start Date and End Date and under certain conditions I need to send an email.
- So I created my own custom BO to do the Mass Data run on it. And I need to populate "automatically" my new BO with the Sales order' data.
My Problem:
In order to do this, I did a query on SalesOrder DateTime in a Before-Save Event. It returns all the Sales Order I want and the creation of my instances is well down.
However, after I looped all the SalesOrder, only the last instance has been created with data. All the others instances of my new BO are empty.
My Question:
Does somebody know why all the data is empty? What did I do wrong? I cannot find out what to do in order to make sure not only the last loop populate my instances.
Here is my query code:
And here is the OWL of my custom BO, only the last row has been filed according to Sales Orders:
Thank you all for your attention!
Best regards.
Jacques-Antoine