/// <summary> /// Gets the value of a LookupItem from the header /// </summary> /// <param name="control">The lookup field name of the lookup.</param> /// <example>xrmApp.Entity.GetValue(new Lookup { Name = "primarycontactid" });</example> public string GetHeaderValue(LookupItem control) { return(_client.GetHeaderValue(control)); }
/// <summary> /// Searches records in a lookup control /// </summary> /// <param name="control">LookupItem with the name of the lookup field</param> /// <param name="searchCriteria">Criteria used for search</param> public void Search(LookupItem control, string searchCriteria) { _client.SearchLookupField(control, searchCriteria); }
/// <summary> /// Sets the value of a Lookup. /// </summary> /// <param name="control">The lookup field name, value or index of the lookup.</param> public void SetValue(LookupItem control, int index = 0) { _client.SetValue(control, index); }
/// <summary> /// Clears a value from the LookupItem provided /// </summary> /// <param name="control"></param> public void ClearValue(LookupItem control) { _client.ClearValue(control); }
/// <summary> /// Selects a Lookup Field /// </summary> /// <param name="control">LookupItem with the schema name of the field</param> public void SelectLookup(LookupItem control) { _client.SelectLookup(control); }
/// <summary> /// Sets the value of a Lookup in the header /// </summary> /// <param name="control">The lookup field name, value or index of the lookup.</param> public void SetHeaderValue(LookupItem control) { _client.SetHeaderValue(control); }
/// <summary> /// Retrieves the value of a Lookup field /// </summary> /// <param name="field">LookupItem with the schema name of the field to retrieve</param> public string GetValue(LookupItem field) { return _client.GetValue(field); }
/// <summary> /// Sets the value of a LookupItem field /// </summary> /// <param name="field">LookupItem with the schema name of the field to retrieve</param> public void SetValue(LookupItem control) { _client.SetValue(control, FormContextType.BusinessProcessFlow); }
/// <summary> /// Sets the value of a Lookup. /// </summary> /// <param name="control">The lookup field name, value or index of the lookup.</param> public void SetValue(LookupItem control) { _client.SetValue(control, FormContextType.Dialog); }
/// <summary> /// Clears a value from the LookupItem provided /// Can be used on a lookup, customer, owner, or activityparty field /// </summary> /// <param name="control"></param> /// <example>xrmApp.Entity.ClearValue(new LookupItem { Name = "parentcustomerid" });</example> /// <example>xrmApp.Entity.ClearValue(new LookupItem { Name = "to" });</example> public void ClearValue(LookupItem control) { _client.ClearValue(control, FormContextType.Entity); }
/// <summary> /// Clears a value from the LookupItem provided /// Can be used on a lookup, customer, owner, or activityparty field /// </summary> /// <param name="control"></param> /// <example>xrmApp.QuickCreate.ClearValue(new LookupItem { Name = "parentcustomerid" });</example> /// <example>xrmApp.QuickCreate.ClearValue(new LookupItem { Name = "to" });</example> public void ClearValue(LookupItem control) { _client.ClearValue(control, FormContextType.QuickCreate); }