web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How do i get name from DirPartyTable

(0) ShareShare
ReportReport
Posted on by 916

Hi,

why i can't get name from dirPartyTable using this job ,is there an error ? please help me to fix that 

static void GenerateName(Args _args)
{
str res;
DirPartyTable dirPartyTable;
VendPackingSlipTrans vendPackingSlipTrans;
PurchTable purchTable;
VendTable vendTable;

select firstOnly dirPartyTable
where
dirPartyTable.RecId ==vendTable.Party &&
purchTable.OrderAccount == vendTable.AccountNum &&
purchTable.PurchId == "000002" ;
//purchTable.PurchId == VendPackingSlipTrans.OrigPurchId;

if (dirPartyTable)
{
info("done !");
res = dirPartyTable.Name;
}

info(strFmt("job says name's == %1", res));
}

*This post is locked for comments

I have the same question (0)
  • Sohaib Cheema Profile Picture
    49,438 User Group Leader on at

    you are not using any joins in your code with multiple tables

  • Verified answer
    5400 Profile Picture
    7,162 on at
    can you use below code and check.
    static void GenerateName(Args _args) { str res; DirPartyTable dirPartyTable; VendPackingSlipTrans vendPackingSlipTrans; PurchTable purchTable; VendTable vendTable; select purchTable where purchTable.PurchId == '000002' join vendTable where vendTable.AccountNum == purchTable.OrderAccount join dirPartyTable where dirPartyTable.RecId == vendTable.Party ; if (dirPartyTable) { info("done !"); res = dirPartyTable.Name; } info(strFmt("job says name's == %1", res)); }
  • ALAhmed Profile Picture
    916 on at

    @Bhaskar Roy  thank you for reply is't work

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans