This is a simple job to create a planned Transfer order througth X++
static void PlannedTransferOrder(Args _args)
{
ReqPo ReqPo;
InventDim inventDim;
InventDim inventDimLocal;
ReqPlan reqPlan;
ReqPlanData reqPlanData;
ReqPlanId reqPlanId = ‘Piano Generale’; //Here you put your preferred ReqPlanId
reqPlanData = ReqPlanData::newReqPlanId(reqPlanId);
ReqPo.clear();
ReqPo.initValue();
ReqPo.initReqPOType(reqPlanData.parmReqPlanVersionRefRecId(),reqPoType::Transfer);
ReqPo.initFromItemId (“440440”); //Here you put your ItemId
ReqPo.Qty = 11; //Here you put your Qty
reqPO.PlanVersion = reqPlanData.parmReqPlanVersionRefRecId();
inventDim.InventLocationId = ‘AllBlank’; //InventDimId must be AllBlank
inventDim.InventSiteId = InventLocation::find(‘AllBlank’).InventSiteId;
inventDimLocal = inventDim::findOrCreate(inventDim);
ReqPlannedOrder::construct().insertFromForm(ReqPo,inventDimLocal, ‘300’, ‘311’ ); //Here you put your Location From and Location To
}