Hello Team,
I have a requirement where i need to create a SysODataActionAttribute in a data entity inventtransferorderheaderentity and use that SysODataActionAttribute to cancel the transfer order shipment, I checked we already have it for ship and receive, so i took reference from that and created one for cancellation of transfer order, Sharing the code of triger and also the code of InventTransferOrderEntityMapbelow
Code in inventransferorderheaderentity : -
[SysODataActionAttribute('CancelShipment_CAP', true)]
public void CancelShipment_CAP()
{
InventTransferOrderEntityMap inventTransferOrderEntityMap;
InventTransferOrderEntityMap.CancelShipment_CAP();
}
Code in InventTransferOrderEntityMap : -
[ExtensionOf(mapstr(InventTransferOrderEntityMap))]
internal final class InventTransferOrderEntityMap_CAP_Extension
{
public void CancelShipment_CAP()
{
ttsbegin;
InventTransferMultiShipCancel inventTransferMultiShipCancel = InventTransferMultiShipCancel::construct();
inventTransferMultiShipCancel.runUpdate(this.createInventTransferParmTable());
ttscommit;
}
}
After writing this code i am trying to test it using postman to check if my transfer order is getting cancelled or not, I also checked with debugging the values are passing correclty but after that it is throwing an exception of update has been cancelled.
If any one has done the transfer order shipment cancellation through odata then please help me on this, Waiting for a positive response on the same.
Thanks
Piyush Sharma