Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8028655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:11:43+00:00 2026-06-05T00:11:43+00:00

Setup I have a Master-Detail relationship, and on the master, I sum up a

  • 0

Setup

I have a Master-Detail relationship, and on the master, I sum up a field from the Detail object.

Question:

I need to allow the user to check a box on the master object which will add the sum by 1 or decrement by 1. How do I do this?

Here’s what I’ve tried:

  1. In an after update trigger on the master increment/decrement within the trigger. Of course I get an error:

    expected exception, contact your administrator: NonCashCompAfterUpdate: execution of
    AfterUpdate caused by:

  2. Created a new field, and used the existing field as a helper. Basically, I’ve hidden the old RFS while still using it. This works, but I wanted to see if there was a better way.

Before I went any further I wanted to check in for ideas.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T00:11:44+00:00Added an answer on June 5, 2026 at 12:11 am

    There is no way to directly alter values on a roll-up summary field in salesforce, except by altering the underlying detail records. The second proposal, as I understand it, would involve three fields, the roll-up summary, the checkbox, and the displayed summary (which would be a formula field). The displayed summary field would look something like this:

    Rollup_Summary_Field__c + IF(Checkbox_Field__c, 1, -1)
    

    The read-only nature of a roll-up summary field is preserved in Apex as well, so you would not be able to alter it through a trigger. Presumably, that is the nature of the error that you got, though the excerpt that you have attached omits the actual error.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have replication setup on MySQL 4.1 (master, named radius) to MySQL 5.0
Setup: I have a form and a Submit button. Ideally the user should fill
I have setup a settings bundle and can successfully pull data from that. I
I have the following setup: A subclass of UISplitViewController that creates the master and
We have a master-master replication setup for one of our databases. Some automated backup
I have a master-master replication setup and just found out that sometime during the
I have two tables: OutputPackages (master) |PackageID| OutputItems (detail) |ItemID|PackageID| OutputItems has an index
I'm trying to create a master detail view of a linq to sql relationship
I have a Master - Slave setup for a web application written in PHP.
I want to ask a question that i have a master template like this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.