09-26-2012 06:53 AM
<webscript>
<shortname>Get ConfigDoc Test</shortname>
<description>Get ConfigDoc Test</description>
<family>Green Energy</family>
<url>/com/greenenergy/em/lab3/getconfigdoc/{serialnum}</url>
<format default="html"/>
<authentication>user</authentication>
</webscript>
var serialnum = url.templateArgs["serialnum"];
var docquery = 'select e.* from geem:equipment as e where e.geem:serialnum='+serialnum;
var def = {query:docquery,language:"cmis-alfresco"};
var results = search.query(def);
if(results!=null)
{
doc = results[0];
model.docnode = doc;
}
else
{
status.redirect=true;
status.code=401;
status.message="Equipment document with serial number: " + serialnum + ", was not found!";
}
<a href="${url.serviceContext}/api/node/content/${docnode.nodeRef.storeRef.protocol}/${docnode.nodeRef.storeRef.identifier}/${docnode.nodeRef.id}/${docnode.name?url}">${docnode.name}</a>
08260046 Wrapped Exception (with status template): 08260338 Failed to execute script '/com/greenenergy/em/lab3/getConfigDoc.get.js (in repository store workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions)': 08260337 Failed to execute search: select e.* from geem:equipment as e where e.geem:serialnum=77777
10-08-2012 06:52 AM
var serialnum = url.templateArgs["serialnum"];
var results = search.luceneSearch("@geem\:serialnum:\"'+serialnum+"\"");
if(results!=null)
{
doc = results[0];
model.docnode = doc;
}
else
{
status.redirect=true;
status.code=401;
status.message="Equipment document with serial number: " + serialnum + ", was not found!";
}
10-15-2012 02:19 AM
10-15-2012 02:30 AM
09150016 Wrapped Exception (with status template): 09150114 Failed to execute script '/com/greenenergy/em/Calendar Event/create-event.get.js (in repository store workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions)': syntax error (workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions/com/greenenergy/em/Calendar Event/create-event.get.js#7)
in the ff javascript:
<import resource="classpath:alfresco/site-webscripts/org/alfresco/callutils.js">
if (args['uri'])
{
var uri = unescape(args['uri']);
// Call the repo for the event information
model.event = doGetCall(uri);
model.edit = true;
}
else
{
model.event = {};
model.event.what = model.event.location = model.event.description = '';
model.edit =false;
}
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.