You need to sign in to do that
Don't have an account?
Phuc Nguyen 18
Auto increment custom alpha numeric field
Hello ALl,
trying to determine if I cna create an alpha numeric field via a formula or if it need sot be done in apex.
So what I am looking at is if the record type is 'Site' then the field needs to be 'S_(postalcode value on record)_incremented number
ex. S_14547_1
Next record with type site and postal code 45447 woueld be
S_45447_2
Thanks,
P
trying to determine if I cna create an alpha numeric field via a formula or if it need sot be done in apex.
So what I am looking at is if the record type is 'Site' then the field needs to be 'S_(postalcode value on record)_incremented number
ex. S_14547_1
Next record with type site and postal code 45447 woueld be
S_45447_2
Thanks,
P
I think this could be done using a trigger before insert that could update the value and then add the record to a list and then insert them.
Let me know if it helps.
Regards,
Anutej
All Answers
I think this could be done using a trigger before insert that could update the value and then add the record to a list and then insert them.
Let me know if it helps.
Regards,
Anutej
You could create an auto-number field and then a formula field that concatenates "S_(postalcode value on record)_" with the auto-number field value.
So parent A with NAme test has 2 child records and their values should be test_1 and test_2
Parent B with name tester has 3 child records so the child record names would tester_1 tester _2 Tester_3
If it were to be a simple increase in the record serial value as mentioned by other community members you could use an auto number but as you have stated you would like to have a serial number for child records I think you will have to create a trigger for this implementation.
I hope this helps.