I need to be able to generate salesforce object (cases) Id's, so i can create links for my robot assistant :-).
I believe you can use the API , but this option is out of reach for me :-(
So, Reading about salesforce objects, it seems to be
of the format.
3 Digits (Object) / 12 Digits (Record) / (Optional) 3 Digits (Error Correction)
our cases number range from 1500 upwards,
here some examples. 1716=50060000003FS87
1717 = 50060000003FSJt
1718 = 50060000003FTFD
1800=50060000003Fkcw
2000-50060000003GIRK
so, for case 2000
500 60000003GIRK (object type) (case number)
I've tried decoding/encoding both an integer '2000' and the string '2000' with base64 and base62 , and nothing comes up.
It this some kind of hash? are these ID's not directly related to the case number? i.e are the generated.
Is it some kind of one way hash?
I just want to say, I'd like the ID, for say case 10000, and to generate the correct ID to take me there! :-)
Any ideas would be a great help.
As per @superfell's comment, Id's in Salesforce are generated from an internal sequence number. While you could guess at what the next ID will be, your could never be certain that some other process is also creating records at the same time.
Also, you have no way of getting Salesforce to accept Ids that you generate externally. I.e. only Salesforce can assign a new record Id.
The APIs are the standard way of creating new records in an integration.
The post What are Salesforce ID's composed of? might be useful.
If you have an external system for generating Ids you could use them as the external Id in a custom field. If opens up options for referencing that record without knowing the Salesforce assigned Id.