function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
DeekDeek 

Error while creating a custom object

Hi There,

 

I am creating a custom object with data type as Auto-Number with the below parameters primarily. It throws error at Starting Number field as "Error: Invalid number"

 

Display Format-->APN - {00000000}{DD}{MM}{YYYY}

Starting Number-->APN - {12345678}{12}{12}{2012}

 

Please help me to resolve this. What is the invalid number in "Starting Number"?

Best Answer chosen by Admin (Salesforce Developers) 
Sonam_SFDCSonam_SFDC

Please remove APN - from the starting number, just keep 12345678 - it will automatically take APN - when creating the auto number as it is already specified in the format.

All Answers

Sonam_SFDCSonam_SFDC

Heya,

 

Please remove the curly braces from the Starting number and keep it as : 12345678  and you should be able to save the record.

 

For the DD MM YY Variables, these are auto populated as per the creation date of the record so you would not be able to give a start point to these variables.

 

For more info, read : https://ap1.salesforce.com/setup/ui/whatisdisplayformat.jsp

 

Hope this helps!

DeekDeek

Hi Sonam,

 

I just added APN - 12345678 in "Starting number" but still its throwing same error-->Error: Invalid number

 

Below is the changed description:

 

Display Format-->APN - {00000000}{DD}{MM}{YYYY}

Starting Number-->APN - 12345678

 

Please help.

Sonam_SFDCSonam_SFDC

Please remove APN - from the starting number, just keep 12345678 - it will automatically take APN - when creating the auto number as it is already specified in the format.

This was selected as the best answer
souvik9086souvik9086

Just give any number in the starting number. Please don't use APN or anything like that there.

 

If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.

Thanks

DeekDeek

Thanks Souvik  and Sonam. That perfectly worked. Cheers!