Not Able to Create a Lookup Field Again Once Deleted That Field
Recently, a client asked united states of america to change a relationship from Master Detail to Lookup in their Salesforce environment. They did non want that field to be required to create a record, because the user didn't ever have the information at the time of data entry. As a result, the requirement created problems with data integrity also as causing frustration. This change was of import to our client, but took more than pushing the Change Data Type button while editing a custom field. Making the alter in Salesforce meant planning, precautions and a serial of steps on our function. We wanted to share some tips and all-time practices that we learned. Don't Count on Change Information Type After a data backup, we tried deleting the field to send it to the Recycle Bin where information technology could be recovered. In one case recovered, it would be restored as a Lookup human relationship and the data would exist recovered when the field is restored. Deleting a Column with Dependencies i. Deactivating workflows did not clear dependency on the Workflow. We had to delete the workflows along with whatever field update actions too 2. Lawmaking Dependencies: Any code that may reference the column has to be handled. This was a major headache for our developer as he had to chase downwards and correct code dependencies and failed test scripts. 3. The dependent columns must be completely deleted. They cannot remain in the deleted fields list on the object. We had a few related formula fields that used the column in question. Rather than delete these, we copied the formula text to a certificate and replaced the formula with a hardcoded value 4. Procedure Builder processes need to be deleted equally well. Once more, deactivating them will not clear the dependency. When we performed this change, we had to look 12 hours later deactivating. Thankfully, Salesforce removed this required wait time in the Summer '15 release. However, if there are any pending actions from the process, you must either complete or delete them before you lot tin can delete the process. five. Relationship changes will touch any reports dependent on that cavalcade. You will not be able to edit or run the study afterward the human relationship is changed. This does not prove upward on the list of dependencies simply nosotros encountered this later on everything was dorsum in place. Restoring the Deleted Fields We returned the formula code to the dependent formula columns, but the formulas would not salvage due to errors referencing the column. Since the field is returned with a "del" in the name to identify it equally a deleted column, you should rename the field as soon every bit it is restored. One time the column is restored to its pre–deleted grade, you can restore all the objects you had to delete or modify to clear the dependency. The screenshot shows other changes to accost one time the column is restored. If y'all want the lookup to exist required, brand certain you lot set the cavalcade as required. Also, restore the column dorsum to the page layouts. Exam and Examination Once more Information technology's not a very difficult process to follow, but beware of the dependencies and programme appropriately. At that place may exist other issues that we were fortunate to avert, so be on the lookout man.
If there are any rollup fields, yous won't meet the Modify Information Type push when you edit the field. This makes sense since rollup fields cannot be created when there is no Master Item human relationship nowadays. Likewise, you may not see this button if you accept any other dependencies on the Master Detail Human relationship field. We had no rollup fields, simply could not simply apply the Modify Data Type button to make the change.
Of form, you lot tin can't delete a cavalcade if it has dependencies, and clearing them raises bug.
Once the dependencies were all addressed, we could delete the column and restore it. The adept matter is that none of the data was lost, so restoring the data from our backup was not necessary.
Figure 1 - System Dialog after restoring a deleted field.
Keep a running list of the dependencies, how you addressed each one, and how you tested information technology to confirm that it was corrected. In addition, be sure to test once everything is pushed to product.
radcliffe-brownbusind.blogspot.com
Source: https://www.us.cgi.com/blog/converting-a-master-detail-relationship-to-a-lookup-relationship-in-salesforce
0 Response to "Not Able to Create a Lookup Field Again Once Deleted That Field"
Post a Comment