+ Start a Discussion
Mike @ G2Mike @ G2 

Random System Generated Case IDs

Hi All,


Wondering if anyone can help me with this:


How do i assign system generated Case numbers that do not only include number? for example i currently have cases that get assigned a case number automatically in a {0000000} format, is there a way to assign either random numbers, or random letters or prefferable a combination of the both?






No you cannot do that as this field (CaseNumber) is not writable.

After going through your query I tried to update it with another value in a trigger on case and got the following error:-


Compile Error: Field is not writeable: Case.CaseNumber



Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.


Mike @ G2Mike @ G2

thanks for looking into it,


if random cannot be achieved, is there a way to make the automatically generated case ID a bit less sequential than numbers in order.


The automatically generated Case IDs are being communicated to our customers via auto response to email to case, i m really looking for a way to make numbers a bit more personalised, so that a customer cannot (or at least make it difficult for them) change the Case ID by a few numbers when they answer us, which could ultimately lead to my agents replying to the wrong customer about a case that is not linked to that particular customer..


i tried imputing a value of {0000}{MM} which kind of worked but not really, can you think of any other option i could use?

Mike @ G2Mike @ G2

anyone ? :D


Well it is not exposed by salesforce, hence manipulation is not possible.


You may create custom formula field which generates Random number for the case and can use the field to all your email templates...