Visual Builder

Get Involved. Join the Conversation.

Topic

    vijay.kekane
    Patch to custom Object created in SaaS failAnswered
    Topic posted October 23, 2019 by vijay.kekane Red Ribbon: 250+ Points, last edited October 23, 2019, tagged Business Objects, Custom Code, REST, SaaS Integration 
    29 Views, 8 Comments
    Title:
    Patch to custom Object created in SaaS fail
    Summary:
    Patch operation fail
    Content:

    Hi There,

    We have custom object created in financial cloud. This object's row need to be updated when data changes in VBCS screen. I am getting error "[VB (ERROR), /vb/helpers/rest]: The response specifies content type application/json, but unable to parse response as JSON. Reading response as text SyntaxError: Unexpected token I in JSON at position 0".

    Patch operation work good from postman so patch is allowed and I have valid response. Same patch operation also work when setting up REST endpoint in VBCS. However it does not work when update screen is used to update actual row.

    I have created new data Type based on REST endpoint to get response from REST operation. I am not sure reason for above error.

    Version:
    19.3.1.2
    Code Snippet:

    Best Comment

    Shay Shmeltzer

    Did you create your REST endpoint using the ADF Describe of the REST service? (define service using spec rather by endpoint)?

    Have you created the end point based on the request structure of your PATCH end point?

    See if this helps:

    Working with REST POST and Other Operations in Visual Builder

    Comment

     

    • Shay Shmeltzer

      Did you create your REST endpoint using the ADF Describe of the REST service? (define service using spec rather by endpoint)?

      Have you created the end point based on the request structure of your PATCH end point?

      See if this helps:

      Working with REST POST and Other Operations in Visual Builder

      • vijay.kekane

        Hi Shay,

        Thanks for response.

        1) I created REST endpoint using "Define by Endpoint" and not using description (or Define by Specification). 

        2) Not sure about second question.  During creation of REST service, PATCH operation was tested in VBCS with sample payload. After successful test, copied request, response to REST endpoint. Also created new data type based on REST endpoint, then created variables based on data type.

        I checked link you sent but, it did not resolve my issue. Also created SR 3-21364257681 for same and it has application zip file. 

        Thanks,

        Vijay