REST – Delete Example


Syntax: SDK.REST.deleteRecord(id, type, successCallback, errorCallback)

Name Type Description
id String A String representing the GUID value for the record to delete.
type String The Schema Name of the Entity type record to delete.For an Account record, use “Account”
successCallback Function The function that will be passed through and be called by a successful response.
Nothing will be returned to this function.
errorCallback Function The function that will be passed through and be called by a failed response.
This function must accept an Error object as a parameter.

Task: Delete an Existing Account using AccountId.

Solution: Add the below Script in “new_sdkOperations” Webresource and click Ok.

Please do check REST – Retrieve Example for Initial Setup

function deleteAccount() {
    if (confirm("Do you want to delete this account record?")) {
        alert("You chose to delete the account record.");
            "{312B24BA-7CC1-E311-AAEF-D89D67790688}", //Add Existing Account GUID
            function() {
                alert("The account was deleted.");

function errorHandler(error) {

Add OnLoad event in Account Form, Library: new_sdkOperations &function deleteAccount. Save and Publish

REST - Delete Webresource


REST - Delete Output

Please provide your valuable comments on this article.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.