You need to sign in to do that
Don't have an account?
wsmith
Using RecordId in a unit test
Is it legal or not to hard code a RecordId in a unit test (i.e. instead of querying the RecordType by name at runtime). To me is seems a bad practice since the RecordId may be different on Prduction then the Sandbox.
If I deploy the sandbox to production and later create a new sandbox from production, will the recordid of the same objects (by name) be the same on Production and the Sandboxes?
In practice I have seen hard coded Record IDs in Sandbox unit test that seems to be deployable to Production.
If I deploy the sandbox to production and later create a new sandbox from production, will the recordid of the same objects (by name) be the same on Production and the Sandboxes?
In practice I have seen hard coded Record IDs in Sandbox unit test that seems to be deployable to Production.
Hope it helps, Steve.