Detach a record - Validation

Posted by IramK on 20-Feb-2015 08:24

Hello,

Is there a way I could catch the detach event of a related record? I have tried using a validate record data trigger to check for atleast one related record to be present before update but I'm still able to detach the related record. Is there a way I could stop this and throw an error?

Posted by Chandrasekhar Gontla on 07-Aug-2015 01:45

Hi,

In 4.0.0.0, it is working fine and the release is targeted on Aug 22nd 2015 as of now.

Thanks and Regards,

Chandra.G

All Replies

Posted by Chandrasekhar Gontla on 20-Feb-2015 09:04

Hi,

We can achieve this by applying 'Validate Record Data' trigger on the top of related object. Means, select related object from 'On Field Change' drop-down and provide error message in  Formula editor. But, it will work for both attach and detach but not only for detach.

One more thing, right now this case is not working as expected. Issue has been raised for the same. We will let you know once that is fixed.

Thanks and Regards,

Chandra.

Posted by Chandrasekhar Gontla on 20-Feb-2015 09:06

Find attached screen shot.

Posted by IramK on 20-Feb-2015 09:13

The validation record data trigger doesn't run on detach of a related record for some reason. Is that a known problem? I have tried and checked it using the rbv_api.log() function and according to the log the trigger doesn't run on detach.

Posted by Chandrasekhar Gontla on 20-Feb-2015 09:27

Hi,

The behavior that I observed and logged an issue for the same.

Note: I tried it in 3.1 release build

-> Create couple of objects. (Ex: Obj1 and Obj2)

-> Create any relationship between them (Ex: M to M)

-> Create few records in both objects and link in between them.

-> Go to any object definition (Ex: Obj1) and create a validation record data trigger where select related object from 'On Field Change' drop-down list and provide error message and select any timing option (Ex: Before Delete) and save it.

-> Go to Obj1's record edit page and click save button without modifying anything.

-> Observe that validate record data trigger got executed ant it is throwing error that we specified.

-> It should not execute the trigger as we haven't attach/detach the related record. It should execute the trigger only when attach/detach the related record.

Hope this helps.

Thanks and Regards,

Chandra.G

Posted by IramK on 20-Feb-2015 09:45

Ok we are using version 3.0.5.0. Can you try and do the same on the view page where we can detach an existing related record and check whether the trigger is firing? I have tried the above mentioned steps with a timing of "Before Update" on that validation trigger but it doesn't seem to run when I detach the related record. Am I missing something?

Posted by Chandrasekhar Gontla on 21-Feb-2015 02:31

Hi,

You are correct. The validate record data trigger on the top of look up field is not working in record details page.

I have added this case as well to the issue.

Thanks and Regards,

Chandra.

Posted by IramK on 23-Feb-2015 03:32

Hello Chandra,

Could you possibly tell me as to when can I expect a fix for this please?

Cheers.

Posted by Chandrasekhar Gontla on 24-Feb-2015 03:02

Hi,

It is targeted for v4.0.0.0 release.

The tentative release date is 18th April 2015

Thanks and Regards,

Chandra.G

Posted by IramK on 05-Aug-2015 09:18

Hello,

Just coming back to my post as I am facing this issue again. May I know if this issue would be fixed in 4.0.0.0 release or would it be fixed in a later version? Kindly let me know.

Cheers.

Posted by Chandrasekhar Gontla on 07-Aug-2015 01:45

Hi,

In 4.0.0.0, it is working fine and the release is targeted on Aug 22nd 2015 as of now.

Thanks and Regards,

Chandra.G

This thread is closed