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 NAV (Archived)

Calling "Create as" from (OData)-Webservice

(0) ShareShare
ReportReport
Posted on by

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

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    "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.

  • Community Member Profile Picture
    on at

    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 :-)

  • Suggested answer
    Community Member Profile Picture
    on at

    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
    on at

    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
    on at

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

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 NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans