Hi,
We're trying to implement a specific process using ByDesign and Cloud Applications Studio. What we're aiming for is that whenever a SalesOrder is created with a certain flag on it (custom extension field), an OutboundDelivery with the same items and quantity should trigger right away.
Currently an OutboundDeliveryRequest is automatically created, but I could not find a way to release this request and start the actual delivery.
I tried this code on the BeforeSave event of the SalesOrder:
foreach(var item in this.Item) { item.CheckProductAvailabilityAndConfirm(); item.FinishFulfilmentProcessing(); item.ReleaseToExecute();
}
And this on the BeforeSave event of the OutboundDeliveryRequest:
foreach(var schedule_line in this.Item.ItemScheduleLine) { schedule_line.RequestDeliveryExecution(true, true, empty_UUID, false, true, false);
}
The only thing I achieved is making a SiteLogisticsRequest appear with the status Released, but no OutboundDelivery in sight.
Does anyone know how to do this?
Thanks a lot,