Loading...

Power Pages – Delete Operation using WebAPI

Power Pages – Delete Operation using WebAPI
Delete Operation: The DELETE method deletes an existing record by its ID. The record ID is included in the URL, and the response indicates whether the deletion was successful. Use DELETE to remove a record based on its ID. To delete an existing record, you can use the DELETE method. Below is a sample code snippet to delete a contact record by its ID. Delete Operation Using JQuery: $(document).ready(function() {$(‘#deleteButton’).click(function() {const contactId = ‘your-contact-id-here’; }); Delete Record (DELETE) function deleteContactRecord(contactId) {$.ajax({type: “DELETE”,url: /_api/contacts(${contactId}),headers: {“Accept”: “application/json”,“OData-MaxVersion”: “4.0”,“OData-Version”: “4.0”},success: function () {console.log(“Record Deleted”);},error: function (xhr) {console.error(“Error Deleting Record: “, xhr.responseText);}});} Web Template: Delete Record (DELETE) Scenario: Delete a Contact Record Using Web Template <script> function deleteContact(contactId) { […]

Published on:

Learn more
Invent CRM
Invent CRM

Surya's MS CRM Blog

Share post:

Related posts

Microsoft Power Pages: The authentication key for your portal will expire

I saw the below Notification today, while I was working on the Portal requirements. Notification:The authentication key for your portal will e...

3 days ago

Power Pages Fundamentals #20: Step-by-Step Guide to Create Dataverse Records in Power Pages: Quick Read Series

In Power Pages to create records and store them in dataverse , we can use power of WebAPI and use it inside liquid in web template. I will exp...

10 days ago

How to Create Reusable Custom Component using Web Template in Power Pages

In this blog, we’ll show you how to create a reusable, dynamic review card component in Power Pages using custom web templates. This allows yo...

15 days ago

Power Pages Actions in Visual Studio Code

Two years ago I posted about the features within Visual Studio Code to create assets in Power Pages. Since that time the team at Microsoft has...

19 days ago

Step-by-Step Guide for Using Power Fx in Power Pages (Preview)

In this blog, we’ll explore how to use Power Fx within Power Pages to build dynamic, interactive web applications. We’ll walk through key feat...

24 days ago

Working with Power Pages Web API

Introduction Microsoft Power Pages, previously known as Power Apps Portals, allows organizations to create external-facing websites that secur...

1 month ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy