Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
titleBeforeStartEvent Script
linenumberstrue
// set object title indirectly as process subject

$.variable('objecttitle').value = $.file.get()[0].title;

// Share the object towith users as members of the group set in the variable 'usergroup'

var processFile = $.file.get();            // get all process file objects into the array processFile
var dmsObject = processFile[0];            // take the first element 

var putBody = {
		objects : [],
	 	organizationobjectstype : 'id',
	 	organizationobjects : []
};
putBody.objects.push( { itemid : dmsObject.id, type: dmsObject.type } );
putBody.organizationobjects.push($.variable('usergroup').value);    

$.http.post();
$.http.path('/service/dms/batch/addtoadditionalvisibility');
$.http.body(putBody);
$.http.execute();  

$.done();

...