Praman — Agent-First SAP UI5 Test Automation Plugin - v1.2.0
    Preparing search index...

    Function deleteEntity

    • Ai

      Deletes an entity via HTTP DELETE.

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

      • Optionaloptions: ODataHttpOptions

        HTTP options including required CSRF token.

      Returns Promise<void>

      ui5.odata.deleteEntity

      Remove an OData entity by sending a DELETE request to the service.

      On success, the entity is deleted and the HTTP response status is 2xx.

      Uses Playwright's request API to DELETE the entity. Requires a CSRF token. No response body is returned on successful deletion.

      sap.ui.model.odata.v2.ODataModel — HTTP-level entity deletion

      Delete business entities (e.g., cancel draft documents, remove test data).

      ODataError with ERR_ODATA_CSRF if CSRF token is missing.

      ODataError with ERR_ODATA_REQUEST_FAILED on HTTP error.

      await deleteEntity(page, '/sap/opu/odata/sap/SVC/', 'Products', "('123')", {
      csrfToken: token,
      });