Hi All,
Need to send the multiple records in the single file using outbound(file system adapter) in ax 2012.
Below is the job i have written, still it is not working. Can you help out in this.
static void Job131(Args _args)
{
QueryRun queryRun;
CustTable custTable;
AxdSendContext axdSendContext = AxdSendContext::construct();
AifEntityKey aifEntityKey = AifEntityKey::construct();
AifConstraintList aifConstraintList = new AifConstraintList();
AifConstraint aifConstraint = new AifConstraint();
AifEndpointList endpointList;
AifActionId actionId;
Query query;
QueryBuildDataSource qbds;
aifConstraint.parmType(AifConstraintType::NoConstraint);
aifConstraintList.addConstraint(aifConstraint)
query = new Query(queryStr(AxdCustomer));
actionId = AifSendService::getDefaultSendAction(classnum(CustCustomerService), AifSendActionType::SendByQuery);
endpointList = AifSendService::getEligibleEndpoints(actionId, aifConstraintList);
AifSendService::SubmitFromQuery(actionId,endpointList,query,AifSendMode::Async);
}
HI All,
I got the solution, below is the job generated the multiple records in single file.
static void GenerateMutiplerecords(Args _args)
{
CustTable custTable;
AxdSendContext axdSendContext = AxdSendContext::construct();
AifEntityKey aifEntityKey = AifEntityKey::construct();
AifConstraintList aifConstraintList = new AifConstraintList();
AifConstraint aifConstraint = new AifConstraint();
AifEndpointList endpointList;
AifActionId actionId;
Query query;
QueryBuildDataSource qbds;
query = new Query(queryStr(AxdCustomer));
AxdSend::removeChildDs(query);
actionId = AifSendService::getDefaultSendAction(classnum(CustCustomerService), AifSendActionType::SendByQuery);
aifConstraint.parmType(AifConstraintType::NoConstraint);
aifConstraintList.addConstraint(aifConstraint) ;
endpointList = AifSendService::getEligibleEndpoints(actionId, aifConstraintList);
AifSendService::SubmitFromQuery(actionId,endpointList,query,AifSendMode::Async);
}
Invalid endpoint list I am getting this error message when I try the same code…
You probably haven’t created any endpoint for the service.