Remove Secterr Field from Secondary Entity

By | October 11, 2011

Sage CRM provides a really a nice and simple interface to delete its objects like screens, lists, blocks, fields etc. In this blog I will try and put forward some steps that you need to follow in case an entity needs to be moved from Primary entity to secondary. In case we need to remove a field from an entity then here is what we do

1) Go to administration > Customization > Entity > Field
2) Click on the hyperlink
3) Click on the Deleted and Confirm Deleted Button
4) Do the Metadata Refresh; to do the same please navigate to Administration -> System -> Metadata.
5) Select the Refresh All and click on the Execute Refresh button.

But when we are moving an entity from a Primary to secondary it leaves behind the SecTerr fields in the entity. The presence of this field will not have any effect on the data or functionality as the new records in the secondary entity will have null values. But since the SecTerr is not just another field there are some extra steps that you will have to follow if you need to get rid of it.
1) Log on to SQL Server
2) Select SageCRM Database Name
3) Click on the New Query button
4) Use following query to remove field from Table
alter table drop column

Remove Field from Custom_Edits Table:-

1) Please follow #1,#2 and #3 steps.
2) Use following query to remove field.
Update Custom_Edits set ColP_Deleted=1 where colp_Entity=’‘ and colp_colName=’

3) Do the Metadata Refresh; to do the same please navigate to Administration -> System -> Metadata.
4) Select the Refresh All and click on the Execute Refresh button.
5) Log off from the CRM system.
6) Run the IISRESET command
7) Login to the Sage CRM system

If you find this content useful, please drop us an email at crm@greytrix.com.