The best solution is to reference objects using names instead of ID. If this cannot be done then, we have to make the IDs same across environments. This can be achieved by following these steps: Change the DEV environment as per your need and IDs Finalize the script Use project configurator and transfer these changes to PROD Copy PROD DB to DEV