Previous Topic: CountCardManyAscNext Topic: DelObject


DelAssoc

This method will delete an association between the current object and a given object. The parameters are the association type code, the ID of the target object, and a flag indicating whether a trigger delete should be executed or not. It returns the LastReturnCode value.

Syntax

LastReturnCode = object.DelAssoc nAscTypeCode nToObjID nTriggerFlag

Parameters

object

An expression that evaluates to a MetaModelObject.

LastReturnCode

A long value representing the return code from the method.

nAscTypeCode

 A long value indicating the type of association to follow.

nToObjID

A long value indicating the object id of the target object.

nTriggerFlag

A boolean value used to tell the delete method to trigger delete related objects when this association is deleted. A zero value indicates that a non-trigger delete will be executed (only the association will be deleted) and a non-zero value indicates that a trigger delete will be executed (the association and any objects related through mandatory associations will be deleted).

Remarks

EAPI_SUCCESSFUL_RC - indicates a successful execution

EAPI_FROM_OBJECT_NOT_FOUND_RC - indicates that the current object is invalid

EAPI_TO_OBJECT_NOT_FOUND_RC - indicates that the target object is invalid

EAPI_ATC_INVALID_RC - indicates that the object type code passed in is invalid

EAPI_ASSOC_NOT_FOUND_RC - indicates that the association is not valid between the two objects

EAPI_ASSOC_PROTECTED_RC - indicates that the deletion of the association would cause a protection error