Creating your own root object

We saw some of the generic examples of how to use root objects and JavaScript APIs in the JavaScript controller. You should be able to now explore the other root objects and related JavaScript APIs and find out which ones you can use to develop the web script as per your business requirement. Now, let's see something very interesting.

Consider a scenario wherein you want to execute some part of the JavaScript controller as a system user. The first thing that you will do is go through the available JavaScript APIs to find out whether there is a suitable API for this functionality is available or not. After doing an analysis, you will find that there isn't such an API available out-of-the-box. However, you found that ...

Get Learning Alfresco Web Scripts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.