You need to sign in to do that
Don't have an account?
Vinu Varghese
Adding to Rollup Summary value
How to get the next SlNo after the following query. Suppose the following query returns value 0 and I wanted to added 1 to the SlNo to find the next SlNo. How can I achieve this. What is the best way to do this. Please note that Serial_Number_Counter__c is defined as a Rollup summary.
List<AggregateResult> SlNo = [Select Name, max(Serial_Number_Counter__c) from Deposit__c group by name];
Thanks
List<AggregateResult> SlNo = [Select Name, max(Serial_Number_Counter__c) from Deposit__c group by name];
Thanks
In case if you want to add 1 to all the records then you will have to iterate over the list of aggregate result a simple example of iterating over list of aggregate results is below you can modify it as per your scenario:
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.
Thanks.