Try our conversational search powered by Generative AI!

How can get i an entry from related entries

Vote:
 

Hello,

I can get related entries for an entry but i can't get an entry from related entries

public IEnumerable<Association> ListAssociations(ContentReference referenceToEntry)
      {
        var associationRepository = ServiceLocator.Current.GetInstance<IAssociationRepository>();
        var associations = associationRepository.GetAssociations(referenceToEntry);
        return associations;
      }

Is there anyone know any solution please let me know?

Thanks,
Thang Le

#302792
Edited, Jun 01, 2023 11:06
Vote:
 

Hi Thang Le,

Have you checked out the IRelationRespository.

Using this you should be able to get the children of an entry or the parents of a relation.

Paul

#302962
Jun 05, 2023 8:25
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.