Alfasith AX

Alfasith AX
اللَّهُمَّ انْفَعْنِي بِمَا عَلَّمْتَنِي، وَعَلِّمْنِي مَا يَنْفَعُنِي، وَزِدْنِي عِلْمًا

Saturday, October 4, 2014

Code to check document is attached in AX

Hi,

static void AlfasithCheckAttacheddocu(Args _args)
{
    PurchTable             PurchTable; //Table your concern
    DocuRef                 DocuRef;
    ;
    select purchTable where purchTable.PurchId == "112255"; // Table your concern
    select DocuRef where DocuRef.RefTableId == PurchTable.TableId
                    &&  DocuRef.RefRecId == PurchTable.RecId;
   
    info(DocuRef.Name);
    pause;
}

Regards,

No comments:

Post a Comment

Get a table ID in SQL - D365

Hi select ID from SysTableIdView where  SysTableIdView .Name = 'CustTable' Regards,