Posts

Showing posts from January, 2024

RDP Report In D365Fo X++

 RDP Report In D365Fo X++ Contract Class: [DataContractAttribute,SysOperationContractProcessingAttribute(classStr(CBLPODetailUIBuilder))] public class CblPurchDetailPrintContract { List PONumber; Str VendName; InvoicedUnInvoiced InvoicedUnInvoiced; TransDate frmdate; TransDate todate; NoYes checkFlag; [ DataMemberAttribute('Check'), SysOperationLabelAttribute(literalStr("Report On Date")), SysOperationControlVisibilityAttribute(true), SysOperationDisplayOrderAttribute('1') ] public NoYes parmCheck(NoYes _CheckFlag = checkFlag) { checkFlag = _CheckFlag; return checkFlag; } [DataMemberAttribute('fromDate'),SysOperationLabelAttribute(literalStr("From Date"))] public TransDate parmFromDate(TransDate _FromDate = frmdate) { frmdate = _Fr...

X++ Query to Get RFQ From Purchase in D365fo X++

  Get RFQ From Purchase in D365fo X++ Query to get RFQ From MSPO: public str Get_MSPO(str RePOID) { PURCHLINE PURCHLINE; PurchRFQLine PurchRFQLine; PurchRFQCaseLine PurchRFQCaseLine; SELECT REQPOID, PURCHID FROM PURCHLINE where PURCHLINE.REQPOID == RePOID JOIN RFQId from PurchRFQLine where PURCHLINE.PURCHID == PurchRFQLine.PURCHID JOIN RFQCASEID from PurchRFQCaseLine where PurchRFQCaseLine.RECID ==                               PurchRFQLine.RFQCaseLineRefRecId; str RFQ = PurchRFQCaseLine.RFQCASEID; return RFQ; } Query to get RFQ From PR: public str Get_RFQFromPR(str PR) { PURCHLINE PURCHLINE; PURCHREQTABLE PURCHREQTABLE; PURCHREQLINE PURCHREQLINE; PURCHRFQCASETABLE PURCHRFQCASETA...

SQL Query to Get RFQ From Purchase in D365fo X++

SQL Query to Get RFQ From Purchase in D365fo X++ SQL Query to get RFQ From MSPO: SELECT PURCHLINE.REQPOID,PurchRFQLine.RFQId,PurchRFQCaseLine.RFQCASEID,PURCHLINE.PURCHID FROM PURCHLINE JOIN PurchRFQLine ON PURCHLINE.PURCHID = PurchRFQLine.PURCHID JOIN PurchRFQCaseLine ON PurchRFQCaseLine.RECID = PurchRFQLine.RFQCaseLineRefRecId where PURCHLINE.REQPOID = 'MSPO-000024' SQL Query to get RFQ From PR: SELECT PURCHLINE.purchid, PURCHREQTABLE.PURCHREQID, PURCHRFQCASETABLE.RFQCASEID FROM PURCHREQTABLE JOIN PURCHREQLINE ON PURCHREQTABLE.RECID = PURCHREQLINE.PURCHREQTABLE Left JOIN PURCHRFQCASETABLE on PURCHRFQCASETABLE.RFQCASEID = PURCHREQLINE.PURCHRFQCASEID join PURCHLINE on PURCHLINE.purchreqid = PURCHREQTABLE.PURCHREQID WHERE PURCHREQTABLE.PURCHREQID = '000016'

How to get workers current position, department and manger in X++

  How to get workers current position, department and manger in X++ In Dynamics 365 F&O, we have HcmWorkerHelper class which gives much information about worker such as department, primary position, current legal entity and so on. The code to get worker’s current position. This gives current worker record. HcmWorkerRecId hcmWorkerRecId = HcmWorker::userId2Worker(curUserId()); HcmPositionRecId hcmPositionRecId = HcmWorkerHelper::getPrimaryPosition(hcmWorkerRecId); positionDetail = hcmPositionDetail::findByPosition(HcmPosition::find(HcmWorkerHelper::getPrimaryPosition(hcmWorker.RecId)).RecId); The code to get current worker manager. HcmWorker currentWorker = HcmWorker::find(HcmWorkerLookup::currentWorker()); HcmWorker currentWorkerManager = HcmWorkerHelper::getManagerForWorker(currentWorker.RecId); The code to get current worker department. HcmWorker currentWorker = HcmWorker::find(HcmWorkerLookup::currentWorker()); OMOperatingUnit department = HcmWorkerHe...

Get PO From Batch In d365fo X++

 Get PO From Batch In d365fo X++ public container Get_PO(str BatchId)     {         InventTransOrigin       InventTransOrigin;         InventTrans             InventTrans;         inventDim               inventDim;         container               con;         select ReferenceId, InventTransId         FROM InventTransOrigin         JOIN InventTrans         WHERE InventTrans.InventTransOrigin == InventTransOrigin.RecId         JOIN inventDim         WHERE InventTrans.INVENTDIMID == inventDim.inventDimId         && inventDim.INVENTBATCHID == BatchId         && InventTransOrigin.ReferenceCate...

Calculation of tax on purchase amount in d365fo x++

 Calculation of tax on purchase amount in d365fo x++ public real GetTaxForPO (purchline   _PurchLine)  {             TaxOnItem                       TaxOnItem;             TaxGroupData                    TaxGroupData, TaxGroupData_1;             real                            TaxAmount = 0, TaxAmount_1 = 0;             TaxValue                        TaxValue = 0, TaxValue_1 = 0;             ;           if(_PurchLine.TaxItemGroup && _PurchLine.TaxGroup && _PurchLine.LineAmount != 0)             {   ...

How to get workflow submitted user ID and Datetime in D365 Finance & Operations x++

  How to get workflow submitted userID and Datetime in D365 Finance & Operations x++ In this post I'll be sharing a job to get purchase order workflow submitted userID and datetime. Change the logic according to your requirement. class WorkflowUserDatetime {          /// <summary>     /// Runs the class with the specified arguments.     /// </summary>     /// <param name = "_args">The specified arguments.</param>     public static void main(Args _args)     {         WorkflowTrackingTable workflowTrackingTable;         WorkflowTrackingStatusTable workflowTrackingStatusTable;         WorkflowTrackingCommentTable    workflowTrackingCommentTable;         PurchTable  purchTable = PurchTable::find('POV002357'); // Change the table name         select firstFast RecId, User,C...

Renew SSL Certificate in D365fo in x++

Image
 Renew SSL Certificate in D365fo in x++ Reference Link: https://ax.docentric.com/expired-certificates-renewal-in-d365fo/