Is there any way to find the hidden N:N intersect table name? I would need this for a custom plugin i am writing.
Best Regards,
Anthony
Solved! Go to Solution.
I found my solution,
To retrieve the intersect entity table name:
Then i changed my code to:
if (context.MessageName == "Update" && context.Stage == 20)
{
targetEntity = context.InputParameters["Target"] as Entity;
var courseID = targetEntity.Id;
var query = new QueryExpression()
{
//Set this to the entity you wish to retrieve data from
EntityName = "cref8_cursist",
//This will return us all columns for each record returned
ColumnSet = new ColumnSet(true),
};
//AddLink(RELATIONSHIP ENTITY NAME, ENTITY UNIQUE ID FROM THE ENTITIE YOU WISH TO RETRIEVE DATA FROM, ENTITY UNIQUE ID FROM THE ENTITIE YOU WISH TO RETRIEVE DATA FROM
var link = query.AddLink("cref8_opleiding_cref8_cursist", "cref8_cursistid", "cref8_cursistid");
link.LinkCriteria = new FilterExpression()
{
//Add this to filter the Trainee records for a specified Course
Conditions =
{
new ConditionExpression("cref8_opleidingid", ConditionOperator.Equal, courseID)
}
};
//Invoke the service with our query
var subjectEntities = service.RetrieveMultiple(query);
//Loop through the result
for (var i = 0; i < subjectEntities.Entities.Count; i++)
{
//Do some logic
}
}
This now returns me all Trainees of the Training i did the Disassociate on. Thank you for the help @bipinshan and @rampprakash .
Best Regards,
Anthony
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
29 | |
23 | |
19 | |
12 | |
11 |