Apex data relationship

  • 15 April 2019
  • 4 replies
  • 26 views

I have two main objects and one junction object and I want to retrieve data from one main object for corresponding Id from another main object . I have tried soql for this but I am unable to retrieve distinct data ,and after using my apex class I am able to download template but it's empty with no data in place of docgen tags


4 replies

Userlevel 2
Badge +4

Would it be possible to share your code, and explain further what you're trying to accomplish with your Apex data class? Are you attempting to combine the two objects related by the junction object together into a replication? Is that accurate?

@katie_chu I won't be able to share my code but I'll explain what I did.

First I looked to the samples for apex data which was for opportunity object and copied it into developer console and changed the code according to my custom object (in place of opportunity I replaced it with my custom object API name). And then Made apex data relationship and copied the tag into my documents and then tried to test my package and when I downloaded the documents ,in place of tags it was just blank.

@katie_chu also first I am trying to run it for one custom object just to understand how it works for which I have done the above steps . Then I'll try to combine two custom object to get distinct data from one object. But before trying to work for 2 object I am having trouble with single object.

Userlevel 2
Badge +4
It's really hard to say why you're not getting any data without seeing what you've done. It sounds like a code issue. Are you sure your queries are returning data?

Reply