Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

How to get vendor contact info

Posted on by 2,420

Good morning,

I am trying to import vendor contact info (it might be primary or non primary)

if vendor contact info is already there(whether it is primary or non primary) then update with new data or insert.

i want that record to update old contact info with new contact info

// For primary i can use this

logisticsElectronicAddress = LogisticsElectronicAddress::findRecId(DirPartyTable::findRec(vendtable.Party).PrimaryContactPhone,true);

so with this i can get primary contact.

If that existing  contact is not primary  instead i have non primary contact i am able to get this in this way 

LogisticsElectronicAddress    lla ;
select forUpdate firstOnly lla
where lla.Location == DirPartyLocation::findOrCreate(vendtable.Party, 0).Location
          && lla.Type == LogisticsElectronicAddressMethodType::Phone;


I want to know am i doing correct or are there any methods ?

please provide any alternate solution.

Regards.

Have a great day.

  • Martin Dráb Profile Picture
    Martin Dráb 228,501 Most Valuable Professional on at
    RE: How to get vendor contact info

    I was merely trying to increase your chances to get an answer next time. The choice is yours.

  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,420 on at
    RE: How to get vendor contact info

    Dear martin,

    I mentioned clearly in my post that i am viewing for different method.

    You can see my scenario.Please read my post once again.Is that not clear enough to explain the scenario.

    Regards.

  • Martin Dráb Profile Picture
    Martin Dráb 228,501 Most Valuable Professional on at
    RE: How to get vendor contact info

    Not every user as the answer for you… You must wait for the right person.

    Also the question "are there any methods?" sounds quite generic and I would think you're looking for different approaches to the problem, not just for a method wrapping the select statement (which can be found by cross-references). Next time, try providing more details instead of repeatedly posting "Experts please reply". Nobody can help you if nobody understands what you want.

  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,420 on at
    RE: How to get vendor contact info

    Dear martin,

    I agree what you said.

    But how come 218 views for this question.

    I am not spamming.if any one doesnot reply then only i am asking again.

    Regards.

  • Martin Dráb Profile Picture
    Martin Dráb 228,501 Most Valuable Professional on at
    RE: How to get vendor contact info

    People were sleeping, for example. When you asked, it was 6 am in London and 1 am in New York. Or they have other things to do on Saturday morning. You shouldn't get crazy when you don't get reply immediately; waiting to Monday, for instance, would be reasonable.

    This is a community forum, where people answer questions for free when (and if) they have time. If you need support with response time 4 hours, you'll have to pay a huge amount of money to some company.

    Please stop spamming the forum with "Experts please reply". It doesn't help anything.

  • Verified answer
    AX 2012 r3 Profile Picture
    AX 2012 r3 2,420 on at
    RE: How to get vendor contact info

    What happened to community no one is replying to post.

    I found out solution for this.

    This piece of code might help some one

    lla = LogisticsElectronicAddress::findByLocationAndType(DirPartyLocation::findOrCreate(vendtable.Party, 0).Location,LogisticsElectronicAddressMethodType::Phone,true);


    Experts please provide some replies some one is seeking for your help.

  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,420 on at
    RE: How to get vendor contact info

    Experts please reply

  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,420 on at
    RE: How to get vendor contact info

    Experts please reply.

  • AX 2012 r3 Profile Picture
    AX 2012 r3 2,420 on at
    RE: How to get vendor contact info

    Experts please reply

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans