Create request for quotation using X++ in D365FO

Request for quotation (RFQ) is issued by organization to receive competitive offers from various vendors. In this technical article, you will create request for quotation using X++ in D365FO.

Let’s start!

  • Create a runnable class (job)
  • Paste the code in the job shown below:
    AxPurchRFQCaseTable         axPurchRFQCaseTable;
    AxPurchRFQCaseLine          axPurchRFQCaseLine;
    PurchRFQCaseTable           purchRFQCaseTable;
    PurchRFQCaseLine            purchRFQCaseLine;
    str         RFQCaseId;
    NumberSeq numberSeq;

    numberSeq = NumberSeq::newGetNum(purchParameters::numRefPurchRFQCaseId());
    RFQCaseId = numberSeq.num();
    axPurchRFQCaseTable = new AxPurchRFQCaseTable();

    axPurchRFQCaseLine = new AxPurchRFQCaseLine();
    axPurchRFQCaseLine.parmItemId('PRD000709'); //Replace ItemId as per your system's data
    axPurchRFQCaseLine.parmItemName(InventTable::find('PRD000709').itemName()); //Replace ItemId as per your system's data 
    InventDim                            inventDim;
    inventDim.InventLocationId = InventLocation::find('MW').InventLocationId; //Replace Warehouse as per your system's data 
    inventDim.InventSiteId     = InventLocation::find('MS').InventSiteId; //Replace Site as per your system's data 
    inventDim                  = InventDim::findOrCreate(inventDim);

//Replace Default Dimension Rec Id as per your system's data;
  • Replace the data as per your company’s data
  • Execute the job and see the newly created RFQ.

So, in this way you can create request for quotation using X++ in D365FO. Moreover, if this helps you, please Like, Comment and Share to help other people.

If you found any ambiguity or a better solution, please feel free to ask.

Website: Click here

Blog: Click here

YouTube: Click here

GitHub: Click here

Facebook: Click here

Don’t give up. Normally it is the last key on the ring which opens the door. – Paulo Coelho

The post Create request for quotation using x++ in D365FO appeared first on NevoiTech Blog.