[Vtigercrm-developers] How to correctly trigger CRMEntity->unlinkRelationship()?

nilay khatri nilay.spartan at gmail.com
Wed Sep 26 14:24:24 GMT 2018


There is no event for that, that has to be custom handled.

On Wed, Sep 26, 2018 at 7:12 PM Tony Sandman <tonysandman999 at gmail.com>
wrote:

> VT code designers will not answer. They seem to be too busy. Are they?
>
>
> On Wed, Sep 26, 2018 at 8:30 PM Alan Lord <alanslists at gmail.com> wrote:
>
>> I have two custom modules which are related via the vtiger_crmentityrel
>> table in a many-to-many style relationship.
>>
>> I've been trying to trace through the vtiger code where the above
>> function is ultimately triggered from and what I need to *configure* and
>> where so that if I delete a record from either of the two modules, the
>> relationship is cleared too?
>>
>> The trash() function in CRMEntity fires unlinkDependencies(), but this
>> seems to be for many-to-one relationships via UIType 10 fields.
>>
>> The DeleteEntity() function in utils.php calls unlinkRelationship(), and
>> this is called either by the Unlink action (expectedly) via the
>> Vtiger_Relation_Model or from the Webservices/VtigerCRMObject.php class,
>> but I do not think this is the right place either.
>>
>> So after all this, am I right to think this is something I should take
>> care of within a vtiger.entity.afterdelete event and that there isn;t a
>> mechanism to get this triggered directly?
>>
>> This is vtiger 7.1
>>
>> TIA
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
> _______________________________________________
> http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20180926/825c3a9c/attachment.html>


More information about the vtigercrm-developers mailing list