Skip to main content

Time limit exceeded error when changing lookup field into Master detail

 When changing a Lookup field into Master-detail, The conversion process can time out in the UI. You will see 'Time limit exceeded'. This is because all setup operations done on the UI has time limit of 2 minutes. For some organization where we have a lot of data on Child records, This operation runs more than 2 mins and error out.

Reason :

As part of the field conversion, There are a lot of activities/checks to be done internally. One of them, is to recreate the sharing/access to the child object.  In our scenario, The Organization has a lot of sharing entries created on the child objects. Since the child records access should be controlled by Parent, The conversion usually deletes all the previous sharing entries created on the Child object. This can take more time depends on how big the sharing table is in the organization.


To use either Change Set or Metadata API to deploy the field type's change, since the operation will run in asynchronously.

Hope this helps. Thanks for reading this.

Cheers :)