Hi all,
I need some help.
I would like to call a class after a custom entity is done with the import of all records.
The methods I found so far like mapEntityToDataSource are executed per record during import.
This is not an option since I want to call my class only once when the last record has been imported and the entity is "done".
What I want to achieve is an entity connected excel that creates purchase orders.
The excel only contains purchase lines, no header data.
If I for example have 10 purchase lines in the excel and press publish I want the entity to insert the lines in a custom temp table.
When all 10 lines have bin imported I want to trigger a class that generates the PO header and adds the lines to the header.
Next time the user publishes a bunch of lines from the excel a new PO header will be generated and the lines will be added there.
Possible ways i can think of solving this would be
1. find a method that is called in the end of entity execution
2. If there's a message id or similar in the Odata call that i can get hold of.
3. Some how can get the number of lines contained in the entity batch.
All help is appreciated.
BR
Oliver