cancel
Showing results for 
Search instead for 
Did you mean: 

companyhome not defined

djesdforum
Champ in-the-making
Champ in-the-making
WE are trying to use the JAvascript API to access webscripts. However we are receving the "companyhome not defined" error and as a result not able to proceed. Are we missing anything as far the installation goes, trying to figure why we would get this error for a seemingly simple script.
This is sample code from the cookbook for JS API
var template = companyhome.childByNamePath("/Data Dictionary/Presentation Templates/doc_info.ftl");
if (template != null)
{
   var result = document.processTemplate(template);
   // output result to the console - could just as easily save the content into a new node…
   logger.log(result);
}
2 REPLIES 2

mikeh
Star Contributor
Star Contributor
If you're running that code as part of a webscript, then make sure the descriptor is setting authentication to user rather than guest or none.

Thanks,
Mike

djesdforum
Champ in-the-making
Champ in-the-making
Thx MikeH  that helped.