private UPMStringField CreateStringField( UPConfigFieldControlField fieldConfig, FieldIdentifier fieldIdentifier, UPCRMResultRow resultRow, string recordIdentification, IConfigurationUnitStore configStore) { UPMStringField field; if (fieldConfig.IsLinkedField) { var fieldRecordIdentification = resultRow.PhysicalRecordIdentificationAtFieldIndex(fieldConfig.TabIndependentFieldIndex); if (!string.IsNullOrEmpty(fieldRecordIdentification)) { var linkRecordAction = new UPMAction(StringIdentifier.IdentifierWithStringId("linkRecordActionId")); var showRecordMenu = configStore.DefaultMenuForInfoAreaId(fieldConfig.InfoAreaId); var linkRecordViewReference = showRecordMenu.ViewReference.ViewReferenceWith(fieldRecordIdentification); this.AddViewReferenceForActionKey(linkRecordViewReference, $"{fieldIdentifier}"); linkRecordAction.SetTargetAction(this, this.PerformLinkRecordAction); field = new UPMLinkRecordField(fieldIdentifier, linkRecordAction); } else { field = new UPMStringField(fieldIdentifier); } } else { var linkUrlAction = new UPMAction(StringIdentifier.IdentifierWithStringId("linkUrlActionId")); linkUrlAction.SetTargetAction(this, (sender) => { var url = (sender as UPMURLField)?.StringValue; if (url != null && !url.Contains("://")) { url = "http://" + url; } var deviceService = SimpleIoc.Default.GetInstance <IDeviceService>(); deviceService?.OpenUri(new Uri(url)); }); field = new UPMURLField(fieldIdentifier, linkUrlAction); } return(field); }