This article describes the API used to develop client plug-ins, as well as client-side form scripts.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
// how to create a subscription var objectId = '7B683C8E19BD492198F6A262D14EF43F'; var body = {subject: 'My subscription', type: 'document'}; scope.api.http.post('/service/dms/subscription/' + objectId, body, '/rest-ws').then( function(result){ scope.api.util.notifier.info('Created subscription for ' + objectId, 'Success'); }, function(error){ scope.api.util.notifier.error('Failed to create subscription for ' + objectId, 'Error'); } ); // For more information, see the REST function descriptions. |
scope.api.dms
This section describes the read access to object information.
scope.api.dms.getObject()
Loads a DMS object from the backend
Parameter | Type | Description |
---|---|---|
id | string | The id of the DMS object to be fetched. |
type | string | optional: The object type of the selected DMS object. Will improve performance if set. |
version | string | optional: retrieve a specific version of the DMS object. |
...
Parameter | Type | Description |
---|---|---|
dmsObject | DmsObject | the DMS object with the content to download |
rendition | string | (optional) the type of the content file ('PDF', 'TIFF', 'TEXT', 'JPEG') if you don't want to have the original file |
scope.api.config
Gets information about configurations.
scope.api.config.get()
This function returns information about the location of special resources.
config entry | description |
---|---|
serviceBase | relative URL to the yuuvis® RAD rest services |
pluginsBase | relative path to the plug-ins project folder |
pluginStatesBase | relative path to the plug-in states project folder |
themeBase | relative path to the themes folder |
scope.api.agent (version 4.0)
These functions help to handle custom actions with yuuvis® RAD agent.
scope.api.agent.getAvailability()
This function gets the agent availability and returns a promise which is resolved with the agent availability.
Promise | Description |
---|---|
agentAvailability.CONNECTED | The user has an agent connected and the current browser session is connected. |
agentAvailability.AVAILABLE | The user has an agent connected to the system, but there is no pairing between the current browser session and an agent. |
agentAvailability.UNAVAILABLE | The user is not connected with any agent. |
For examples, see the Client-side Custom Action Scripting documentation.
...
Code Block | ||||
---|---|---|---|---|
| ||||
scope.api.agent.executeAction(scope.api.agent.action.OPEN, { document: { id: myObject.id, title: myObject.title, type: myObject.type }, lock: false }); scope.api.agent.executeAction(scope.api.agent.action.MAIL, { message: {// from, to, cc and bcc can be string or array of strings and are optional scope.api.agent.executeAction(scope.api.agent.action.MAIL, { message: { from: ["mail1@mail.org", "mail2@mail.org"] to: "mail3@mail.org" cc: ["cc_mail@mqilorg"] bcc: "bcc_mail@mail.org" text: "some fancy text", // as e-mail body text (if not provided will be filled with "title (filename)" of attachment if no attachment is provided text will be empty) text subject: "some fancy text", subject" // as e-mail bodysubject text(if not provided will be filled with "title (v: version)" or subject: "title"some fancyof subject"attachment if no //attachment asis e-mailprovided subject will be empty) }, attachments: myObject.map(o => { return { id: o.id, title: o.title, rendition: "", version:null, type: o.typeName } }) // attach all document files of the corresponding objects to the e-mail // if message = null default values are used }); scope.api.agent.executeAction(scope.api.agent.action.EXTERNAL, { executable: 'jump2sap.exe', args: [ '/ID', myObject.id ] }); |
...