Validation Rules for alternate hierarchies to not insert / update node
Summary
Validation Rules for alternate hierarchiesContent
Hi All,
we have 4 top nodes out of 4 , 2 are main/ primary Hierarchy which should have unique members and rest 2 hierarchy can have / repeated nodes or parents more than one time. we want to build validation rule to the primary Hierarchies to prevent the user to stop add, insert or move the node if that is already exist in Hierarchical
i have create a validation at Hierarchy set level but its not working efficiently .
{
if (node.ancestors.any(ancestor Node => ancestor Node.name.matches("(T)|(R)")))
{
if (node.locations.count(location => location.name.matches("..*")).equals(1))
0