Aje1968
Aje1968

Reputation: 3

Rollup field in Dynamics CRM 2016

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

Upvotes: 0

Views: 160

Answers (1)

MarioZG
MarioZG

Reputation: 2087

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);

Upvotes: 1

Related Questions