Skip to Content

update where Sdk Javascript


I just would like to know, How I can convert this cap node js expression (update where) into SDK Javascript?

                        city: dataCity,
                        country: dataCountry
                        id: id,
                        postcode: dataPostcode

Thank you very much

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on 2 days ago


    We explain it in details in our documentation about update requests.

    It would be something like:

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Artem

      Thank you very much for reply, I tried but I received the error: Error: value.utc is not a function

      const sdkTest = require('./odata-client/api-service-3').Test;
    = dataCity dataCountry; = dataID;
      sdkTest.postcode= dataPostcode;
        destinationName: 'DEST'
         console.log('Error:', err.message);

      Any help.


  • Posted on 19 hours ago

    Hi Artem Kovalov

    I can not able to update when my entity has 2 primary keys. I got error 417 and the log report that the url is not completed.

    PATCH api/Test(id='20200529' HTTP/1.1" 400 64 58

     const sdTest = sdkTests.builder()
                        .country(dataCountry) // PrimaryKey
                        .id(dataID)  // PrimaryKey
      const responseOne = sdkTests.requestBuilder().update(sdTest)
                        .execute({ destinationName: 'DEST' })
                        .catch(err => {
                            console.log('Error One:', err.message);
                            console.log('Cause:', err.rootCause.message);
                            console.log('Root cause:', err.rootCause.message);

    Any help


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.