none
How do I determine DestinationPartyID when I only know the party name? RRS feed

  • Question

  •  

    I am working with EDI batching and have successfully batched my 850 transactions to my destination party.  All worked well on my development server but when I deployed to my test server I found a glaring problem.  In my orchestration I set the EDI.DestinationPartyId to the party in question and all works well on my developement machine.  On my test machine the EDI.DestinationPartyId for the party in question is different (of course).  The only way that I found what the party id is was by looking in the BizTalkMgmtDB database and finding my party. 

     

    Now I know there HAS to be a better way to do this but, frankly, I am stumped. 

     

    Knowing the party name, how can I determine the party id?  I believe that the party id is very necessary to the whole batching process. 

     

    I am contemplating reading the value from the BisTalkMgmtDB directly in my orchestration code but I would hope there was some easier way to get at it.  If I do have to read it directly from the database I think I need to know what server the database is residing on.  I had planned on pulling that out of the registry unless, again, there is a better way to do it.

     

     

    Any help would be greatly appreciated.

     

    Regards,

    Thursday, May 8, 2008 8:20 PM

Answers

  • You can use PAM API to do it. Below is function which you can use to get partyId from PartyName:

     

    Class Name: Partner

     

    Method:

    public static int GetPartyIdForPartyName(string PartyName)

     

     

    Thanks,

    Bhola

    Friday, May 9, 2008 5:56 PM

All replies

  • Hi,

     

    Sorry i can't provide a solution, but i have been in exactly the same situation here.

     

    This was a proof-of-concept project, so i added a C# class with a method called GetPartyID that queried the management database, it's not  good solution, but it worked. I remember asking around at the time (this was when BizTalk Server 2006 R2 was in beta), and no one suggested a better alternative.

     

    Please post if you hit on a better solution for this.

     

    Regards,

     

    Alan

     

    Friday, May 9, 2008 5:17 PM
  • You can use PAM API to do it. Below is function which you can use to get partyId from PartyName:

     

    Class Name: Partner

     

    Method:

    public static int GetPartyIdForPartyName(string PartyName)

     

     

    Thanks,

    Bhola

    Friday, May 9, 2008 5:56 PM
  • Well that's a whole lot easier than my way!  Thanks Bhola, that did it for me.  I knew there had to be an easier way to do it.

     

     

    Regards,

     

    Mirko.

     

     Bhola Meena[MSFT] wrote:

    You can use PAM API to do it. Below is function which you can use to get partyId from PartyName:

     

    Class Name: Partner

     

    Method:

    public static int GetPartyIdForPartyName(string PartyName)

     

     

    Thanks,

    Bhola

    Friday, May 9, 2008 7:53 PM