yuuvis® RAD Q&A

0 votes
by (200 points)
edited by

Hi,

it' s possible to mark more than one objects in the client for simultaneously deliting?

Thanks for feedback.

3 Answers

+3 votes
by (1.2k points)
selected by
 
Best answer

Hello,
it is possible, if you use custom actions.
In our project it looks like this:
1) create new action
2) do not define object type, to allow to start this action on every object type
3) code:

var OBJECTS_TO_DELETE;

// Really delete?
var reallyDelete = confirm('Really?');
if(!reallyDelete) {
	scope.api.util.notifier.warning('Action was canceled', 'Objects were not deleted');
	return;
}

// Save all IDs to delete
OBJECTS_TO_DELETE = scope.objects.map(function(object) {
    return object.id;
})

// Delete all async
var promiseArray = [];
OBJECTS_TO_DELETE.forEach(function(objectID) {
    promiseArray.push(deleteThisObject(objectID));
})

// Each object take 755ms in our system
scope.api.util.notifier.info('Duration approximately: ' + Math.round(scope.objects.length * 0.755) + ' seconds', 'Delete was started');

Promise.all(promiseArray)
.then(function() {
    scope.api.util.notifier.success('Objects were deleted');
})
.catch(function(error) {
    scope.api.util.notifier.error(error.message, 'Objects were not deleted');
})

function deleteThisObject(objektID) {
    var url = '/dms/' + objektID;
    return scope.api.http.del(url);
}

I hope it helps.

Best regards,
Georgii

0 votes
by (19.2k points)
edited by

Yes and No. Not within the client. You have to use the management studio scripts capability:

example script: https://developer.enaio.org/redline/download/attachments/20743942/DeleteRootObjects.js?version=1&modificationDate=1547815998166&api=v2

or the rest-ws endpoint as given here:

http://redlinepm001.optimal-systems.de/rest-ws/#ENDPOINT:DmsBatchService.deleteObjects

by (19.6k points)
edited by
scripts are only supported in the enterprise-manager (legacy app). The management studio does not offer this and we recommend to use the REST API to delete objects - for example in a Talend job.
Keep in mind that the enterprise-manager is discontinued with version 6.
0 votes
by (19.2k points)

No. This feature is in the backlog without high priority. A workaround ist given by using management studios scripting capability:

https://developer.enaio.org/redline/download/attachments/20743942/DeleteRootObjects.js?version=1&modificationDate=1547815998166&api=v2

by (430 points)
Hi, I was going to ask the same question, but I see that this feature is not yet included in regular client version 8.16. What is the latest status on this? Is the above script a solution? (P.S. the developer-link from post Apr.8, 2019 doesn't work)
by (19.2k points)
Oh, sorry, after the migration of our help portal we lost this URL.
The documentation for the custom action scripting may help:
https://yuuvisdevelop.atlassian.net/wiki/spaces/onpremise/pages/319620094/Client-side+Custom+Action+Scripting
I will check whether the attachment above is reachable with a different URL as well.

Related questions

...