Hello everyone,
I am implementing a plugin which get triggered on delete event from Order Line entity. In my scenario, i created relationships between Order Lines and Product entities and between Order Line and Warehouse entities.
Once i delete the record, i would like to retrieve the value of both lookup fields from the Order Line record. One lookup field points to the Product related, and the other lookup field points to the warehouse related.
Once i get these both entity references, i update the value for a third-part entity Product Inventory based on the value of these both entity references.
The plugin is Async Post
public void Run()
{
Entity deletedSalesOrderProduct = service.Retrieve(Att.SalesOrderDetail.logicalName, entityReference.Id, Att.SalesOrderDetail.columns);
/* Other functionality */
}
By any reason, i cannot access to the record and i have the error "The requested record was not found or you do not have sufficent permissions to view it "
Thanks in advance!
Kind regards.