Praman — AI-First SAP UI5 Test Automation Platform - v1.0.1
    Preparing search index...

    Function updateEntity

    • Updates an existing entity via HTTP PATCH.

      Type Parameters

      • TData = unknown

      Parameters

      • page: ODataHttpPage

        Playwright Page with request API.

      • serviceUrl: string

        OData service root URL.

      • entitySet: string

        Name of the entity set.

      • key: string

        Entity key including parentheses, e.g. "('123')".

      • data: unknown

        Partial entity data to update.

      • Optionaloptions: ODataHttpOptions

        HTTP options including required CSRF token.

      Returns Promise<ODataHttpResult<TData>>

      The updated entity with HTTP status and optional ETag.

      ODataError with ERR_ODATA_CSRF if CSRF token is missing.

      ODataError with ERR_ODATA_REQUEST_FAILED on HTTP error.

      const result = await updateEntity(page, '/sap/opu/odata/sap/SVC/', 'Products', "('123')", {
      Price: 50,
      }, { csrfToken: token });