Search This Blog

Tuesday, February 12, 2013

AX2012 Send Service Framework


we can use the send service framework when wewant to send outbound messages. The following job is used send documents containing SalesOrders to an outbound port that endpoint configured for this document.


When you run this job you will get the senddocument dialog where we have to select the outbound port for the specified document.When you click on OK in dialog , the record will be inserted in the AifOutboundProcessingQueue table.

we should create the find operations for the service, by default AXSend service framework method sendMultipleDocuments will use find method.



static void Krishh_AxdSendframework(Args _args)
{
    AxdSend axdSend = new AxdSend();

    AifConstraintList aifConstraintList = new AifConstraintList();

    AifConstraint aifConstraint = new AifConstraint();

    aifConstraint.parmType(AifConstraintType::NoConstraint);

    aifConstraintList.addConstraint(aifConstraint);

    axdSend.sendMultipleDocuments(classNum(SalesSalesOrder),
    classNum(SalesSalesOrderService), AifSendMode::Async,  aifConstraintList);
    info("succeeded");
}

1 comment:

  1. What is the difference to AifSendService or where to use bether that Method?

    ReplyDelete

Thanks for visiting my blog,
I will reply for your comment within 48 hours.

Thanks,
krishna.