Saturday, 24 December 2022

Get Pegging reference number (ReqTransSettled.RefId) in Planned Production order in D365 F&O

Hi All,

I was facing a lot of problem to find pegging records in planned production order in D365 F&O, after struggling a lot I found a solution so here I am with you..👇

public display InventTransRefId cplRefID()

{

    ReqTrans reqTrans,reqTransSettled;

    ReqTransCov reqTransCov;

   

    select reqTrans

    where reqTrans.RefId == this.RefId

    && ReqTrans.RefType == this.RefType

    && reqTrans.PlanVersion == this.PlanVersion

    join reqTransCov

    where reqTransCov.ReceiptRecId == reqTrans.RecId

    join reqTransSettled

    where reqTransSettled.RecId == reqTransCov.IssueRecId;

    

    if (reqTrans.RefId != '')

    {

        return reqTransSettled.RefId;

    }

}


Many Thanks, Atul Kumar  

Import General journal from excel in D365 F&O

 Hi Guys, Import General journal from excel in D365 F&O Code:  using System.IO; using OfficeOpenXml; using OfficeOpenXml.ExcelPackage; u...