- So you want to avoid using a roll up summary field in Salesforce? Hmmmm.
I’m not sure this is a good idea, but this is somthing you could do in Skuid. But it will take a few steps.
You need to get that SUM value into a model somehow. Just because it is shown in the column summary of a table doesn’t mean its accessible to use the way we need. You can create a third model that replicates the contract model - but aggregates on PrincipalAmmount and generates a single value. Or you can use Javascript to loop through all the rows of the contract model and add together the sum. (look for plenty of examples of this on the community).
Once you have your value the "UpdateRow" action will be used to transfer that value into the field on your Account object. You can bind that to a button or to some other page interaction.
Hopefully that helps you out.
Hi @“Rob Hatch”
Thank you so much for your suggestion.
1.What you mention 2nd point we won’t update table, if we are update values we can use "UpdateRow " action, but we are using salesforce standard page for update values.
2.What type of action will help to transfer that value into the field on your Account object? when PrincipalAmmount value changed i want to run the action?
Thanks & Regards
Guna
Hi @gunaskuid,
If i understand correctly your issue, skuid will not be much help
What Rob proposed is a row an action to update field on account: sumOfPrincipalAmount__c and that requires to do it manually via a button/row action
If I understood you want anytime that the value is changed or added on the object: Contract for field PrincipalAmount__c to rollup the sum on the account on field sumOfPrincipalAmount__c
For that you need to do it in Salesforce. If there’s a master-detail relationship between account and contract, you can simply create a rollup field to do so, and it will recalculate auto any time it’s changed on any related contract
If you do not have a master-detail relationship between those 2 objects but have a lookup relationship between them, you will need to install an APP to do so or do it via Apex Code
If you chosoe an app , I recommend this one free app that is amazing called: Declarative Lookup Rollup Summary (DLRS) and that will allow you to do this pretty simply
If not there is also i think an app called rollup helper on appexchange, but may no longer be free , Have not used it for a very long time (i use only DLRS)
Hope it helps!
Hi @Dave
Thanks you so much for suggestion.
1.There is a lookup relationship between both objects.I actually wrote trigger for update value,but right now we have lots of triggers and process builders on contract,because of that few functions we are getting too many SOQL 101 issue,so I’m trying to do through skuid.i’m few days back starting working skuid,so I don’t know exactly this scenario possible or not in skuid?
In skuid upto roll-up value I will get, after that how can I update ui-field value into account field when we changed contract amount values in Salesforce?
Is there way to solve this through skuid?
Thanks &Regards
Guna
If wherever you change contract amount value is on a skuid page, you need to do the following example
Create an Aggregate model of Contracts object with proper conditions and add Sum Aggregation for field PrincipalAmount__c
On that page Skuid Save Button add an action before save to update the row in Account model
in Field choose the account field sumOfPrincipalAmount__c, on Field value source choose the Aggregate model created above, choose the Sum aggregation field created above
Save Account
That should work very simply, and you can adapt it to your scenario.
Hi @Dave
Nice one,good idea, but here we are not updating contract field on Skuidpage, we are using standard Salesforce page for updating contract fields,only display purpose we created contract model table on skuid page table have no save option.based on condition we are displaing records.
There is no save button how can I call action based on table principal amount changed or aggregate values changed?
Thanks & Regards
Guna
Guna - Skuid is a client side framework, and does not have the ability to listen to data events and take actions unless those actions occur on the Skuid page itself. It looks like you want a server side process so that Whenever the values are updated - the roll up value is stored on the parent record. I think the Core SFDC features will be best suited for this. The answers Dave and I have been offering will only work if the user is interacting with the data on a Skuid page.