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

  • AX 2012 r3 Profile Picture
    2,426 on at
    RE: Exist Join Query

    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.

  • B K Sharma Profile Picture
    737 on at
    RE: Exist Join Query

    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

  • Verified answer
    AX 2012 r3 Profile Picture
    2,426 on at
    RE: Exist Join Query

    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.

  • AX 2012 r3 Profile Picture
    2,426 on at
    RE: Exist Join Query

    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.

  • Chaitanya Golla Profile Picture
    17,225 on at
    RE: Exist Join Query

    Hi,

    Could you explain about your business requirement.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 48

#3
shanawaz davood basha Profile Picture

shanawaz davood basha 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans