I need to update incremental code in a custom field on accounts. So that, If user changes the Type from Prospect to customer then no. should be incremented by 1.
For example:
- For account1, it will be C1
- For account2, it will be C2
- For account3, it will be C3
Whenever user changes the type from Prospect to Customer, It will pick the last no. of previous record and then it will increment. Code will be unique for each account as we need to use the same code for integration purpose.
So let's say Account A had its Type changed from Prospect to Customer on the 2nd Of March 2016, then the custom field 'Change Number' (or named however else you like) would be populated with '1'.
Then Account C had its Type changed from Prospect to Customer on the 3rd of March 2016, 'Change Number' field would be populated with '2'.
The 'Change Number' value must be unique. The Account cannot go from 'Customer' to 'Prospect', only from 'Prospect' to 'Customer'.
Is this correct?
– Andy Hitchings Apr 25 '16 at 10:54