/// <summary>
 ///     !!ONLY IMPLEMENTED FOR STATIC LOOKUP CODES
 /// </summary>
 public void AddLinkFilter(string entityType, string lookup, string fieldName, object value)
 {
     if (LinkEntity == null)
     {
         LinkEntity = new LinkEntity(RecordTypeAggregated, entityType, lookup,
                                     XrmEntity.GetPrimaryKeyName(entityType), JoinOperator.Inner);
         LinkEntity.LinkCriteria.AddCondition(new ConditionExpression(fieldName, ConditionOperator.Equal, value));
     }
     else
     {
         throw new InvalidPluginExecutionException("Only one link filter may be added to an aggregate");
     }
 }