0
votes

Is there a way to force a rollup field to do it's calculation rather than having to "refresh" the field on the form?

1

1 Answers

1
votes

You can use CalculateRollupFieldRequest in plugin when component field is updated:

CalculateRollupFieldRequest request= new CalculateRollupFieldRequest
{
    Target = new EntityReference("<entityname>", recordId),
    FieldName = "<rollup field to refresh>"
};

CalculateRollupFieldResponse response = (CalculateRollupFieldResponse)service.Execute(request);