Verify that an association is established between two objects
Summary
I want to verify that an association is established between two objects when i click “save and close”Content
I want to verify that an association is established between two objects when i click “save and close”.
If the two objects not exist an association, the system will not allow the workspace to be closed. But now the code does't work.
private void _recordContext_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
_recordContext.RefreshWorkspace();
IOrganization _org = _recordContext.GetWorkspaceRecord(RightNow.AddIns.Common.WorkspaceRecordType.Organization) as IOrganization;
if (_org != null && _org.ID >= 0)
{
//through webservice to query whether the association is exis
if (queryOrganizationEntityCount(_org.ID) <= 0)
Tagged:
0