Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

how to get store address from LogisticsPostalAddress Table

Posted on by Microsoft Employee

Hi All, 

i have data source table RetailTransactionPaymentTrans,  i want to get state, county, and address fields from LogisticsPostalAddress Table, i'm using this peace of code but still faild...

str storeVale, storeValue2, storeValue3;

container workFlowContainer;

while select logisticsPostalAddress
join logisticsPostalAddress
where retailTransactionTable.LogisticsPostalAddress== logisticsPostalAddress.RecId
join retailTransactionTable
where retailTransactionTable.transactionId== paymentTransTable.transactionId
|| retailTransactionTable.store== paymentTransTable.store
|| retailTransactionTable.terminal== paymentTransTable.terminal

storeVale = postalAddressView.County;
storeValue2 = postalAddressView.Address;
storeValue3 = postalAddressView.State;

workFlowContainer = conIns(workFlowContainer,1, storeVale);
workFlowContainer = conIns(workFlowContainer,2, storeValue2);
workFlowContainer = conIns(workFlowContainer,3, storeValue3);
return workFlowContainer;

... please help me where i miss the logic ?

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to get store address from LogisticsPostalAddress Table

    basically its warehouse location , i'm using storeID

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: how to get store address from LogisticsPostalAddress Table

    How do you want to find a store ?

    Do you know store id or you have payment transaction record \ store record ?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to get store address from LogisticsPostalAddress Table

    store location address

  • Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: how to get store address from LogisticsPostalAddress Table

    Yes you can,

    retailTransactionPaymentTrans.TransactionTable().deliveryAddress().Address;

    However what are you trying to get store address or delivery address ?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: how to get store address from LogisticsPostalAddress Table

    Hi ievgen,

    i tried it but still failed,  can we use built-in methods like :

    salesRemittanceTemp.LocationName=logisticsPostalAddress::findByLocation(CompanyInfo::find().postalAddress() .Location).Address;

  • Suggested answer
    Mea_ Profile Picture
    Mea_ 60,278 on at
    RE: how to get store address from LogisticsPostalAddress Table

    I think you need to rewrite it a bit :


    select logisticsPostalAddressView join retailTransactionTable where retailTransactionTable.LogisticsPostalAddress == logisticsPostalAddressView.RecId && retailTransactionTable.transactionId == paymentTransTable.transactionId && retailTransactionTable.store == paymentTransTable.store && retailTransactionTable.terminal == paymentTransTable.terminal


     

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans