You need to sign in to do that
Don't have an account?
Akis Athanasiadis
Create multiple Records
I have an object named Contract_Renewals__c which is related to Contracts (Master Detail)
Contracts are also related (sipmle lookup) with Contract_Renewals__c.
In contracts I have a checkbox named Renew__c.
What i want is if the Renew__c=True then to create new records of Contract Renewals.
If i have 5 contract renewals, then 5 should be created.
Any help please?
Contracts are also related (sipmle lookup) with Contract_Renewals__c.
In contracts I have a checkbox named Renew__c.
What i want is if the Renew__c=True then to create new records of Contract Renewals.
If i have 5 contract renewals, then 5 should be created.
Any help please?
Greetings to you!
Below is the sample code which I have tested in my org and it is working fine. I am using Account and Contact objects to create multiple contacts if a checkbox is checked on Account. If there are 5 Contacts associated with Account then it will create 5 more Contacts on that Account. Kindly modify the code as per your requirement.
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
Regards,
Khan Anas
So what i want is among the 5 records of contract renewals, if i have 3 records without this checkbox checked, then i create one record with the summary of the amount of those records and 2 records from the other two that had the checkbox checked
I have done this.For some reason i get an error on the [select count()] line that is why i have commented this out.
Maybe that is why when i check renew in contracts and I save, no records are created. can u please help me?
SELECT count() FROM Contract_Renewal__c WHERE Contract__c=:c.Id]