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)

Vendor Email LookUp?

(0) ShareShare
ReportReport
Posted on by 2,172

Hello All,

In my Customized transaction form. I have two grid fields in Line of the form, In which i select vendor(lookup) in the first grid field. In the second grid field i want to show Email address as lookup with respect to the selected vendor in the first grid field. How to achieve this?

*This post is locked for comments

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

    by supposing that your issue is to find query for lookup, below you may use for inspiration

    VendTable               VendTable;
        DirPartyContactInfoView DirPartyContactInfoView;
        
        VendTable = VendTable::find('SMCVend1');//your current vendor 
        
        while select DirPartyContactInfoView
            where DirPartyContactInfoView.Type == LogisticsElectronicAddressMethodType::Email
            && DirPartyContactInfoView.Party == VendTable.Party
        {
            info(strFmt('Email: %1    Description: %2',DirPartyContactInfoView.Locator,DirPartyContactInfoView.LocationName));
        }


     You may mention, if you have a specific question.

  • Suggested answer
    Iulian Cordobin Profile Picture
    8,201 on at

    You already have the Email address display method in the VendTable table. So, in your grid just use this display method.

  • Brandon Wiese Profile Picture
    17,788 on at

    The primary e-mail address of the vendor could be displayed, but what if there are multiple e-mail addresses available?  It sounded like the original poster might want to be able to select among them?

  • Suggested answer
    Iulian Cordobin Profile Picture
    8,201 on at

    Hi Brandon,

    Yes, you are right, that could also be one possible case, but in this case we need to know if he has a FK field to the LogisticsElectronicAddress table in its custom transactino table.

    So, if that would be the case (one way to do it) would be just to override the lookupReference method on the field and use the usual SysReferenceTableLookup class.

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