0

I am facing the issue while using

NodeRef nodeRef=nodeService.getNodeRef(longNodeRef);

This function to get the node Refrence using dbid. i am passing admin alf_ticket its giving this exception

You do not have the appropriate permissions to perform this operation.

can anyone help me what should i do?

Sachin Singh
  • 99
  • 12

1 Answers1

0

After spending some time i got the solution

 NodeRef noderef= (NodeRef) AuthenticationUtil.runAsSystem(new AuthenticationUtil.RunAsWork<Object>() { 
              public Object doWork() throws Exception {
                  NodeRef refNode=nodeService.getNodeRef(longNodeRef);
               return refNode;
              }
            });

it's working fine for me.

Sachin Singh
  • 99
  • 12