Hi,
I am trying to do some check in the post load method of an entity WMSItemArrivalJournalLineV2Entity which is part of composite entity WMSItemArrivalJournalV2Entity. However when I write WMSItemArrivalJournalLineV2Entity test = this; in the post load method. The vaule is blank. This normally works when importing an entity but is failing for composite entity. Can any one please suggest me any other approach. My requirement is as follows:
-
Based on a field value provided I need to do certain validation. If this validation fails then I need to throw an error at the staging
-
After the import process is completed and records are created for the journal I need to invoke Post functionality.
For point 2, I am using postTargetProcess(DMFDefinitionGroupExecution _dmfDefinitionGroupExecution) method in the the entity but it is not getting invoked.
Any pointers would be very helpful.
Thanks in advance
What has postLoad() to do with your requirements? It’s used neither for imports nor validations.
Regarding postTargetProcess(), did you declare it correctly? Could you show it to us? You can also debug the place calling postTargetProcess() to see why it’s not happening (unfortunately I don’t know where it is, without looking into code). I’m pretty sure I used postTargetProcess() with composite entities, therefore it should work.
Thanks for your reply Martin, I need to do processing based on 2 criteria - if the record is successfully processed in staging & also to determine if the record will be successfully processed in staging could you please suggest a standard method which I can extend. I was checking with insert & update. Is this correct?
Does it mean that the problem with postTargetProcess() has been resolved?
What do you mean by “successfully processed in staging”? Also, what exactly is the difference between those two checks? They seem to differ only by the tense (“is proccessed” vs. “will be processed”)?
Hi what I mean to say is I have a composite entity with header & lines, I want to do some processing for the header when all lines are successfullly imported for the header but not being able to understand in which extension method do I need to place my logic