public ConnectionsViewModel(EntityReference parentRecordId, Dictionary <string, string> connectToTypes)
{
ParentRecordId = parentRecordId;
ObservableConnection connection = new ObservableConnection(connectToTypes);
connection.Record2Id.SetValue(ParentRecordId);
ConnectionEdit = (Observable <ObservableConnection>)ValidatedObservableFactory.ValidatedObservable(connection);
Connections.OnSelectedRowsChanged += Connections_OnSelectedRowsChanged;
Connections.OnDataLoaded.Subscribe(Connections_OnDataLoaded);
ConnectionEdit.GetValue().OnSaveComplete += ConnectionsViewModel_OnSaveComplete;
ObservableConnection.RegisterValidation(Connections.ValidationBinder);
}