0

i want to auto increment on when a new record is created using triggers. i have customer object and customer_serial_No field whenever a customer is created customer_Serial_No is incremented

0

As suggested try to use Auto number field to auto-increment as this can be taken care of by the system. If you still need to have trigger use the customer_serial_no to increment it each time based on the highest value, make sure to create a custom index for this field as it will lead to SOQL error when the data size increases.

Regards, Bharath

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.