Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Web Services return created Key

Posted on by Microsoft Employee

 hi

i managed to create sales order successfully with Web Services over GP10. 
I specified no Key so the document number is automatically populated with
the next available order number.

What I need now is to get that created document number to update some relationated
entities in my application. I found nowhere in the sdk how to get return
values from created entities.

thanks in advance

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Re: Re: Re: Web Services return created Key
    i have been reading about miscroutines methods, i can achieve what i want with RollBackSopNumber() method. now i'm having a very different nasty problem. calling econnect within a crm 3 callout is not possible becasuse crm3 is runs over 1.1 framework and the econnect 10 are not compatible. :p
  • sandipdjadhav Profile Picture
    sandipdjadhav 18,265 on at
    Re: Re: Re: Web Services return created Key

    Yes it will update Next Number. and if transaction fail it will block that transaction No. I see your point , given method will create Sales Transaction and again your WebService will create New Sales Transaction No . So you will not get current Transaction No.

    Instead of using webSrevice Auto No why not use given method for Transaction No?

    Thanks

    Sandip 

     

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    Re: Re: Web Services return created Key
    this method is gonna update the next number as well?... what about if the transaction fails?
  • sandipdjadhav Profile Picture
    sandipdjadhav 18,265 on at
    Re: Web Services return created Key

    eConnect having "GetSopNumber" schema, You can use that one to find Next SOP Number. Once you got that No you can use it for your external Document...

    Here may be following code will help you..

    private string GenerateNumber()

    {

    string SOPNo = "";

    try

    {

    GetSopNumber myNextSopNoObj =
    new GetSopNumber();

    SOPNo = myNextSopNoObj.GetNextSopNumber(2,

    "STDORD", YourConnectionString);return SOPNo;

    }

    catch (Exception exp) // The eConnectException class will catch any business logic releated errors from eConnect.

    {

    thisXDocument.UI.Alert(exp.ToString());

    return SOPNo;

    }

    }

     

    Thanks

    Sandip

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