Hello,
It is possible to create a hierarchy relationship.
For example Employee ==> Employee.
The hierarchy relationship is 1 to many.
We use it to have manager / collaborators.
When doing a rbv_api.getRelatedIds("relname", employeeId);
Does the getRelatedIds returns the 'children' or the 'parent' of this relationship?
(Since there is only one relationship for bot directions - manager and collaborators)
Thank you for your answer.
Hi Romain,
The API rbv_api.getRelatedIds("relname", employeeId); returns parent ID which is always a single record.
Alliterative way is to use rbv_api.getFieldValue which returns array of record Id's associated with parent.
Example:
var childIds=rbv_api.getFieldValue("ObjectName", empID, "collaborator");
for(var i=0;i<childIds.length;i++){
rbv_api.println(childIds[i]);
}
Regards,
Shiva
Hi Romain,
The API rbv_api.getRelatedIds("relname", employeeId); returns parent ID which is always a single record.
Alliterative way is to use rbv_api.getFieldValue which returns array of record Id's associated with parent.
Example:
var childIds=rbv_api.getFieldValue("ObjectName", empID, "collaborator");
for(var i=0;i<childIds.length;i++){
rbv_api.println(childIds[i]);
}
Regards,
Shiva