Search

Thursday 3 May 2012

Autonumbers Increment In Unit Tests

Autonumbers increment when running a testmethod in unit tests. So we you go back to the real world the next number produced by an auto number field is 1 more than previous.

Surely not you say.

Sorry, but true. So how do you change this. You have to turn off a setting in salesforce, so you will have to raise a Salesforce Case to set a flag to default=off on specified custom objects.

For more information review 
http://success.salesforce.com/ideaView?id=08730000000Br67AAC

No comments:

Post a Comment

Note: only a member of this blog may post a comment.