0

My apologies for being a newbie. I have configured javascript api amps and I can access java script console via admin tools. My challenge is that for 'document', 'search', logger and 'companyhome' I am an receiving reference error e.g reference error 'document' is not defined. I have been reading alfresco documentation and they show that you have to access it using javascript server side. how can i do that in alfresco or how can overcome these errors

1 Answer 1

3

If you are using javascript console. There will be action available on each of the documents "open in javascript console" If you click on that it will open up javascript console for you with context set with selected document.

Now "document" object points to current document on which you have clicked that action. You should also be able to see all API's associated with it by just adding dot after document.

Point is those root objects like "companyhome","document" etc.. are available on server side javascript.

You can find server side javascript two places.

  1. Under company home>Data dictionary> Script (From here you can associate them with rule) .
  2. Controller of any javascript based webscript.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.