Attached record disappears!!

Posted by smartsysISV on 08-Nov-2014 02:48

In my app the object "Car" is attached to object "Equipment" in a many-to-many relationship.

I log all changes.

My customer has attached a lot of equipment to a lot of cars.

In the log, I see what equipment wich is attached to a "Car", but I can not se the attachment on the "Car"-record or in the records of "Equipment". They are dissapeard !! The log tells me nothing about a release of thees items.

I have no trigger etc. that does something like this, and I have no idea what's going on.

Does anyone have any idea?

Is there a possibility to use the log to update the attachment of "equipment" -Record?

All Replies

Posted by smartsysISV on 09-Nov-2014 06:44

You can forget this problem.

The relationship where not updateted to a many-to-many relationship during the last upgrade.

The realtionship where One-To-Many and then the equipment-records disappered from the car-record when the same equipment where attached to another car-record.

But...

This should also be logget on those car-records where the equipment was disconnected?

Posted by Orchid Corpin on 10-Nov-2014 08:09

Hi,

Just to verify, is the current setup was one-to-many where your issue was found?

Regards,
Orchid

Posted by smartsysISV on 10-Nov-2014 11:05

Yes

Posted by Orchid Corpin on 10-Nov-2014 14:11

The object that can have only "ONE" related record will be detached from its original Parent record when another Parent record select that same child, because this can't have multiple parent record.

In your case, if the "equipment" record can only have ONE "car", then "Equipment A" that has already a "Car A" record must not be available in the lookup of another Car (to avoid detaching of a record), once another Car record (let's say "Car B") selected "Equipment A" then "Equipment A" will be detached automatically to "Car A" and will now at "Car B".

I think in your setup this could be many-to-many.

Regards,

Orchid

Posted by Orchid Corpin on 05-Jan-2015 06:44

Hi,

Is the issue has been fixed? or are there any followup questions regarding this thread?
Thank you.

Regards,
Orchid

Posted by smartsysISV on 06-Jan-2015 15:38

Yes, at my development-system the setup was many-to-many. But the upgrade of the production-system had failed and where one-to-many. I didn't see that before i posted here.

But i still think that this detach should be logged, because the setup defined logging on this field.

Posted by Orchid Corpin on 08-Jan-2015 15:33

Hi,

I tested in 3.0.5.0, 3.1.0.0 and 3.1.3.0 and I don't see any trail also that the record was detached from the previous parent.
On the other hand if we use manual detach action, it creates an audit trail that record has been removed.
Tracking defect as PSC00324937

Regards,
Orchid

Posted by Orchid Corpin on 14-Jan-2015 11:24

Hi,

When the team check the defect filed it was said to be not a defect but currently this functionality is not yet available to current release.
We do not create Audit records on Child records when Parent record is changed and child record is attached or detached automatically.
Audit trail will be recorded when using Detach or Attach action, or setup the relationship to many to many.
This will be considered as an enhancement to the product, please file to the ideas page.

Regards,
Orchid

This thread is closed