/// <summary> /// Copies the field values for record identification. /// </summary> /// <param name="recordIdentification">The record identification.</param> /// <param name="alwaysRemote">if set to <c>true</c> [always remote].</param> /// <param name="theDelegate">The delegate.</param> /// <returns></returns> public Operation CopyFieldValuesForRecordIdentification(string recordIdentification, bool alwaysRemote, UPCopyFieldsDelegate theDelegate) { if (!alwaysRemote) { Dictionary <string, object> dict = this.CopyFieldValuesForRecordIdentification(recordIdentification); if (dict?.Count > 0) { theDelegate?.CopyFieldsDidFinishWithValues(this, dict); return(null); } } UPContainerMetaInfo crmQuery = new UPContainerMetaInfo(this.FieldControlConfiguration); crmQuery.SetLinkRecordIdentification(recordIdentification); UPCopyFieldsRequest request = new UPCopyFieldsRequest(crmQuery, theDelegate, this); request.AlwaysRemote = true; if (this.requests == null) { this.requests = new List <UPCopyFieldsRequest>(); } this.requests.Add(request); return(request.Start()); }
/// <summary> /// Copies the field values for record. /// </summary> /// <param name="record">The record.</param> /// <param name="alwaysRemote">if set to <c>true</c> [always remote].</param> /// <param name="theDelegate">The delegate.</param> /// <returns></returns> public Operation CopyFieldValuesForRecord(UPCRMRecord record, bool alwaysRemote, UPCopyFieldsDelegate theDelegate) { return(this.CopyFieldValuesForRecordIdentification(record.RecordIdentification, alwaysRemote, theDelegate)); }
/// <summary> /// Initializes a new instance of the <see cref="UPCopyFieldsRequest"/> class. /// </summary> /// <param name="crmQuery">The CRM query.</param> /// <param name="theDelegate">The delegate.</param> /// <param name="copyFields">The copy fields.</param> public UPCopyFieldsRequest(UPContainerMetaInfo crmQuery, UPCopyFieldsDelegate theDelegate, UPCopyFields copyFields) { this.CrmQuery = crmQuery; this.Parent = copyFields; this.TheDelegate = theDelegate; }