DeleteBlock(BlockName)

Deletes the block from the container.

Parameters

BlockName. Specifies the name of the block to be deleted. This parameter accepts a string value.

Examples

MyC = CRM.GetBlock("CompanySummaryBlock");
userLevel = CRM.GetContextInfo("User","User_Per_Admin");
if (userLevel > 1)
{
MyC.DeleteBlock("AddressBoxShort");
}
CRM.AddContent(MyC.Execute());
Response.Write(CRM.GetPage());

Deletes the AddressBoxShort block for non-administrators.

The AddressBoxShort block is one of the blocks in the CompanySummaryBlock container that has been set up in the <My Profile> | Administration | Customization | Company | Blocks area of Sage CRM.