Skip to content

Instantly share code, notes, and snippets.

@wes1278
Created October 25, 2016 01:54
Show Gist options
  • Select an option

  • Save wes1278/e9d992cb289f5f2d31b451f5cf820b90 to your computer and use it in GitHub Desktop.

Select an option

Save wes1278/e9d992cb289f5f2d31b451f5cf820b90 to your computer and use it in GitHub Desktop.
// add these properties to the RollupSummaryField class.
public boolean isMasterTypeCheckbox;
public boolean isDetailTypeCheckbox;
// add these to LREngine RollupSummaryField class constructor (starts at line 420)
this.isMasterTypeCheckbox = isCheckbox(master.getType());
this.isDetailTypeCheckbox = isCheckbox(detail.getType());
// Add this anywhere inside RollupSummaryField inner class
boolean isCheckbox (Schema.Displaytype dt) {
return dt == Schema.DisplayType.Boolean;
}
//this should replace the current line 320
for(Id masterRecId : masterIds)
for (RollupSummaryField rsf : ctx.fieldsToRoll)
masterRecordsMap.get(masterRecId).put(rsf.master.getName(),
rsf.isMasterTypeNumber ? 0 : (rsf.isMasterTypeCheckbox ? false,null));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment