- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2020 07:40 AM
Hello,
I have a question about the restriction on the Actions in the Allocation Workbench.
I customize the UI Action Confirm and Allocate
I change the condition.
How I put the same condition on the allocation Workbench?
Thanks a lot.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2020 05:24 AM
In your code, current is 'not defined'.
Try in below way.
var RMActionValidator = Class.create();
RMActionValidator.prototype = Object.extendsObject( RMActionValidatorSNC,{
initialize: function(gr) {
this.currentResPlanGr = gr;
RMActionValidatorSNC.prototype.initialize.call(this, gr);
},
canConfirm: function() {
if((gs.getUserID()==this.currentResPlanGr.user_resource.manager)||(gs.getUserID()==this.currentResPlanGr.group_resource.manager)){
return true; // You can add your logic here and return a boolean value
}else{
return false;
}
}
type: 'RMActionValidator'
});

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2020 12:21 PM
Hi
You may be looking for the "ResourceGridActionHandler" Script Include.
This appears to be where the button functionality is defined. I do not believe that you can actually modify the buttons to become invisible as much of the Allocation Workbench is designed in the inaccessible Java Layer. Perhaps you could add validation here to prevent the action from being taken and maybe display a message saying that the user does not have the privileges to perform the action.
Hope that helps!
If it did, please mark as Helpful and consider setting the reply as the Correct Answer to the question, thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2020 03:28 AM
Hello
Thanks for your response.
But I don't see how I can pu my script on this script include.
For It is not easy.
Lylys
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-20-2020 09:05 PM
Hi,
- Yes, there is a way to configure/customize 'Allocation Workbench' grid actions.
- You need to override the method 'canConfirm' and 'canAllocate' methods in 'RMActionValidatorSNC' Script include(This is a read only script include and you should not modify any code here).
- To override those methods, you need to re-define/override 'canConfirm' and 'canAllocate' methods in 'RMActionValidator' script include (This is the place where we expect customers to configure/override the functionality). By default, this is empty and this extends 'RMActionValidatorSNC' script include.
Please find the below example to override canConfirmvar RMActionValidator = Class.create(); RMActionValidator.prototype = Object.extendsObject( RMActionValidatorSNC,{ initialize: function(gr) { RMActionValidatorSNC.prototype.initialize.call(this, gr); }, canConfirm: function() { return false; // You can add your logic here and return a boolean value } type: 'RMActionValidator' });
Thanks,
Harsha Lanka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2020 07:21 AM
Hi
Thanks for your response.
I put this code but when I open the Allocation Workbench, he load again and again.
And the list user of Resource plan doesn't appear.
canConfirm: function() {
if((gs.getUserID()==current.user_resource.manager)||(gs.getUserID()==current.group_resource.manager)){
return true; // You can add your logic here and return a boolean value
}else{
return false;
}
I think create an ACL. It's possible or not?
Thanks
Lylys