Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

Calling "Create as" from (OData)-Webservice

Posted on by Microsoft Employee

Hi all,

our Customer/ Contact management start with a contact. As we are planning to feed Navision with some data from our website we want to use webservices.

I'm able to create a contact through the fitting webservice - I added a page with the needed fields, published this page as Webservice and call it from the website. Works fine. 

Also when I published the CustomerService as Webservice I was able to create a Customer and the vis-a-vis contact was created. 

As our numbering is tailored to the contact numbers - I have to create the contact first and than the customer. Through the client I have a menu item "create as". Is this default, or added by our partner? How can I call this function through a webservice... Or do I have to call the customer serivce and create the customer "by hand" through the webservice. And how do I establish the link between both?

Thanks in advance

Bernhard

*This post is locked for comments

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Calling "Create as" from (OData)-Webservice

    Yea, it would be very simple job and your partner should be able to do it immediately.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Calling "Create as" from (OData)-Webservice

    Hi Vishal,

    thanks again. Ok will contact my systempartner. Either will we be provided a dev-license or they have to implement this feature for us/ me.

    Thanks a lot and have a good time :-)

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Calling "Create as" from (OData)-Webservice

    Hi,

    Actually, you would require development license to copy the related code (Function) from Table and paste it to Page.

    Yes, It is very simple to copy this particular function and put it in page.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Calling "Create as" from (OData)-Webservice

    Hi Vishal,

    thanks a lot for your very quick reply. Yes it helps. Now I have to see how to implement it in a page. As I understood we dont have a developer license so I can not create codeunits. May I asked you to give me a hint how do it within a page. I currently got my first expericence with FinSQL and understood how to create a page with fields from a table.

    I think it will not be a problem of understanding as I worked previous a lot with (own) webservices on .NET basis and would assume that I'm quite familiar with concepts :-)

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Calling "Create as" from (OData)-Webservice

    "Create as Customer" is standard function.  

    You would find following function in Contact Table, which is actually creating the Customer.

    CreateCustomer(CustomerTemplate : Code[10])

    You can copy this function in Codeunit / Page and publish this as Web Service. In this way, you would be able to call this function and create the Customer.

    You need to pass the default value for CustomerTemplate in the function.

    Hope this helps.

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans