You need to sign in to do that
Don't have an account?
kumar 420
sequence number field on contact object than i want to update the sequnce number of this fields
hello,
i am new in salesforce so please help
i have two standard object Account(parent) and Contact(child) .so i wanna create a custom field 'sequence number' on Contact .
suppose my Account(parent) Object have 5 Contact(child) the 'sequence number' record is 1,2,3,4,5 Than i will update the 3 'sequence number' in update 5 than new 'sequence number' is 1,2,5,4,3
this is done help by 'Apex Trigger'.
help my and example with code
i am new in salesforce so please help
i have two standard object Account(parent) and Contact(child) .so i wanna create a custom field 'sequence number' on Contact .
suppose my Account(parent) Object have 5 Contact(child) the 'sequence number' record is 1,2,3,4,5 Than i will update the 3 'sequence number' in update 5 than new 'sequence number' is 1,2,5,4,3
this is done help by 'Apex Trigger'.
help my and example with code
Greetings to you!
Please try the below code, I have tested in my org and it is working fine. Kindly modify the code as per your requirement.
I have created a custom field on the Contact object with the API name Sequence_Number__c
Create a class to prevent recursive trigger:
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.
Thanks and Regards,
Khan Anas
this is work when we update sequnce number and after i will insert the new record in this contact object
i have sequnce number 1 2 3 4 5 and i will update the 3 hence 5 than the sequnce is 1 2 5 4 3 only chage that 3 and 5 and not chage another sequnce number
please give me answer
thanks