cancel
Showing results for 
Search instead for 
Did you mean: 

RAP: How to access child information while being on parent entity?

Kinsbrunner
Active Contributor
0 Kudos

Hi colleagues,

Currently working on a Composition structure (Parent/Child) where I would need, based on a non-key field of the parent, to check whether a child is present or not. Currently, I am not seeing any straight forward way to see this as on the Create of the behavior implementation class, I only have access to parent data and, when standing on the CBA_Child, I only see the parent's key.

Answer is not as simple as "read through EML" as currently working with legacy FMs which is becoming a nightmare.

So far, the solution I could think of is to have a custom buffer which gets filled in on the Create and CBA_Child methods and, finally, gets checked on the CHECK_BEFORE_SAVE method. If I do not get there with the expected outcome, I can fill in the FAILED structure for the main entity and that will stop the commit.

Althought I believe this solution could work, it is not really efficient as I am doing all the process and only stopping before saving while, if I would be able to make the check on the handler class, I would avoid all this processing.

Has anyone experienced a similar issue?

Any advice from our experts @Andre_Fischer or @Renzo ? 🙂 

Thanks in advance! 

Alejandro.

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Alejandro,

I assume that you are using an unmanaged implementation? What about draft enabling the same. This way you should be able read the data via EML.

Or what about using a managed implementation with draft and unmanaged save?

Kind regards,  

Andre

View Entire Topic
Kinsbrunner
Active Contributor
0 Kudos

@Andre_Fischer I think you may have answered something as I got a notification with your salutation but no content. Any advice on this one? Many thanks in advance!

Andre_Fischer
Product and Topic Expert
Product and Topic Expert
0 Kudos
I added a comment.