Now as we are aware of mostly used JavaScript APIs, Alfresco objects, and syntaxes, let’s explore some example JavaScript. In the following example scripts, you will be able to witness the APIs and functionalities we discussed earlier in this chapter.
We will store the JavaScript files in the Company Home>Data Dictionary>Scripts>Cookbook folder (this folder does not exist in your repository and create this folder).
And will run the sample scripts against a document—Test_JS_API.txt in the folder Company Home>InfoAxon>Chapter 8. I have uploaded this text file with a simple line of text: A sample Document created to investigate in JavaScript API
. and used our custom content type iabook:Product
.