Hi,
i tried below job. but sales order xml file is not created. Anyone help me to solve this problem..
static void TestCreateSalesOrderXML(Args _args)
{
Query querySalesTable = new Query();
AifConstraintList aifConstraintList = new AifConstraintList();
AifConstraint aifConstraint = new AifConstraint();
AifActionId actionId;
AifEndpointList endPointList;
QueryBuildDataSource qbdsCust, qbdsSales;
QueryBuildRange qbrCust, qbrSales;
;
qbdsCust = querySalesTable.addDataSource(tablenum(CustTable));
qbrCust= qbdsCust.addRange(fieldnum(CustTable, AccountNum));
qbrCust.value(strfmt('!= %1', queryValue("")));
qbdsSales = qbdsCust.addDataSource(tablenum(CustTable));
qbdsSales.relations(false);
qbdsSales.joinMode(joinMode::InnerJoin);
qbdsSales.addLink(fieldnum(CustTable, AccountNum), fieldnum(SalesTable, CustAccount));
aifConstraint.parmType(AifConstraintType::NoConstraint);
aifConstraintList.addConstraint(aifConstraint);
actionId = AifSendService::getDefaultSendAction(classnum(BBB_WIT_AxdSalesOrderService), AifSendActionType::SendByQuery);
if (actionId)
{
endPointList = AifSendService::getEligibleEndpoints(actionId, aifConstraintList);
if(endpointList.getEndpointCount()>0)
AifSendService::submitFromQuery(actionId,endPointList,querySalesTable,AifSendMode::Async);
}
new AifOutboundProcessingService().run();
new AifGatewaySendService().run();
}
Thanks In Advance.....
Regards,
Saravanaa