on 05-14-2010 1:03 AM
Hi,
Is it possible to search records which are in relationship using Java Apis? Suppose Record A is Parent record and Record B,C,D ... are child records.
I have to search all the records which are in relationship with record A.
Can any one send code snippet on this.
Regards,
Niraj
Hi Niraj,
You can use RetrieveRelationshipsCommand api to get the relationship child of the Anchor Record.
RetrieveRelationshipsCommand command = new RetrieveRelationshipsCommand(connectionAccesor);
command.setSession(session);
command.setAnchorRecord(anchorRecord); / command.setAnchorRecordId(anchorRecordId); (use any of the two statements)
command.setRelationship(relationshipId); //For child int type is 10, and for Parent_child int type is 5
command.setMemberResultDefinition(resultDefinition);
command.execute();
//Get Member Records' resuld definition
ResuldDefinition rd = command.getMemberResultDefinition();
Hope this helps you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.