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)

Exist Join Query

(0) ShareShare
ReportReport
Posted on by 2,426

Good Morning,

i am using this join Query then i am getting data.

But i need is to use Exists join.

update_recordset ISPLSalesRegisterGSTReportTmp
setting gstinnumber = taxRegsistartionNumbers_IN.RegistrationNumber
join Name,RecId from dirPartyTable
join party,RecId,Location from dirPartyLocation where dirPartyLocation.Party == dirPartyTable.RecId && dirPartyLocation.IsPrimary == NoYes::Yes
join RecId from logisticsLocation where logisticsLocation.RecId == dirPartyLocation.location && logisticsLocation.ispostaladdress == NoYes::Yes
join RecId,GSTIN from taxInformation_IN where taxInformation_IN.RegistrationLocation == logisticsLocation.RecId && taxInformation_IN.IsPrimary == NoYes::Yes
join RecId,RegistrationNumber from taxRegsistartionNumbers_IN where taxRegsistartionNumbers_IN.RecId == taxInformation_IN.GSTIN
exists join custTable
where custTable.Party == dirPartyTable.RecId
&& custTable.AccountNum == ISPLSalesRegisterGSTReportTmp.InvoiceAccount;

Relation is as follows

i inserted all invoices then their Order accounts will also be inserted

 1)ISPLSalesRegisterGSTReportTmp.InvoiceAccount == custTable.AccountNum

2)custTable.Party  == dirPartyLocation.Party &&  dirPartyLocation.IsPrimary == NoYes::Yes

3)logisticsLocation.RecId == dirPartyLocation.location && logisticsLocation.ispostaladdress == NoYes::Yes

4)taxInformation_IN where taxInformation_IN.RegistrationLocation == logisticsLocation.RecId && taxInformation_IN.IsPrimary == NoYes::Yes

 5)taxRegsistartionNumbers_IN where taxRegsistartionNumbers_IN.RecId == taxInformation_IN.GSTIN

in taxRegsistartionNumbers_IN  Registration number field i need

 

How can i achieve this.

Please help me .

Regards.

Have a great day.

*This post is locked for comments

I have the same question (0)
  • Chaitanya Golla Profile Picture
    17,225 on at

    Hi,

    Could you explain about your business requirement.

  • AX 2012 r3 Profile Picture
    2,426 on at

    Hi,

    Chaitanya

    i am going to fetch Customer Master GSTIN Number which is located in Customer --> Address --> Tax Information Tab

    So,i have Customer Number ISPLSalesRegisterGSTReportTmp.InvoiceAccount

    i am joining link.

    This GSTIN Number is present in table taxRegsistartionNumbers_IN.RegistrationNumber

    So,this was the requirement .

    Regards.

    Have a great day.

  • Verified answer
    AX 2012 r3 Profile Picture
    2,426 on at

    I have done this.

    This is the Query

    This Link Helped Me

    http://www.microsoftdynamicsax365.com/update_recordset-gstin-number/

     

    This might help some one in future.

    Regards.

    Have a great day.

  • B K Sharma Profile Picture
    737 on at

    Hi,

    If your are looking for Sales Order - Customer gstin number than you can use this code

    _SalesOrderInvoiceTmp.CustomerGSTRegNum        = TaxInformation_IN::find(salesLine_IN.CustomerTaxInformation).getTaxRegistrationNumbersTable(TaxType_IN::GST).RegistrationNumber;

    Thanks

  • AX 2012 r3 Profile Picture
    2,426 on at

    Hi Sharma,

    I am Updating At a time.

    yes i am also taking from sales order only.

    Inserted Customer numbers and Updating their GSTIN Numbers.

    Regards.

    Have a great day.

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