Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MS Dynamics NAV: Updating data #77

Open
KDGundermann opened this issue Oct 9, 2017 · 0 comments
Open

MS Dynamics NAV: Updating data #77

KDGundermann opened this issue Oct 9, 2017 · 0 comments

Comments

@KDGundermann
Copy link
Contributor

When updating an object in MS Dynamics NAV you will receive an error message:

    HTTP/1.1 400 Bad request
    <m:message xml:lang="en-US">
        An error occurred while processing this request.
    </m:message>

ruby_odata inserts an __metadata attribute in the class:

    # Fill metadata 
    meta_id = entry.xpath("./atom:id", @ds_namespaces)[0].content 
    klass.send :__metadata=, { :uri => meta_id } 

When updating the object, this __metadata will be included in the JSON document, but the NAV server does not accept this unknown value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant