Hey Everyone,
I am wondering what the best way is to set the value of a look up field for a CDS entity. This lookup field needs to be set to the entity's grandparent. The structure is, entity-1 is the parent to entity-2. entity-1 can have many entity-2s. Entity-2 can only have one Entity-1. Entity-2 is the parent for entity-3. Entity-2 can have many entity-3s. Entity-3 can only have one Entity-2. Currently the relationship for entity-1 to entity-3 is a lookup field on entity-3 that looks up entity-1. This lookup needs to lookup to the same entity-1 that is the parent for entity-2 which is the parent to entity-3. I do not know a good way to have this set automatically / by default. I need this because I need a subgrid that shows all of the entity-3s that are owned by entity-1. Entity-1 owns both entity-2 and entity-3, but entity-2 also owns and overall affects entity-3.
What would be the best way to set this relationship / lookup field?
Thanks,
:)