Rollbase - Edit/Delete button permission by state

Posted by araqiel on 01-Jul-2014 04:15

Hi,

I would like suggest features for next versions of Rollbase. I would like the edit and delete button will be disable or enable function of permissions and workflow state.

I don't know if is possible today. If is true, thank you for letting me know.

Thanks and regards.

All Replies

Posted by Bill Wood on 01-Jul-2014 05:07

FYI... there is an "Ideas" section in Community where Ideas for Rollbase new features such as this one can be posted.  Other users can see your ideas and vote on ones that appeal to them.  

Ideas can be posted at: community.progress.com/.../default.aspx

The root page for all Ideas is here.

Posted by Godfrey Sorita on 01-Jul-2014 08:41

You can also accomplish this using JavaScript. Paste the code below to a script component on your view page.

<script type="text/javascript">
$(function() {
    checkStatus();
});

function checkStatus() {
    var currentStatus = "{!status#code}";           //Current status of the record
    var statusToDisableButtons = "^forApproval";    //Change "^forApproval" to your desired status integration code
    if (currentStatus == statusToDisableButtons) enableButton(' Edit ', false);
    else enableButton(' Edit ', true);
}

function enableButton (buttonName, isEnabled) {
    if (isEnabled) $("[value='"+ buttonName +"'").removeAttr("disabled");
    else $("[value='"+ buttonName +"'").attr("disabled", "disabled");
}
</script>

For this code to work, make sure to assign integration codes to your statuses and change the value of statusToDisableButtons variable.

Posted by pvorobie on 01-Jul-2014 08:56

You can use server-side Condition formulas for that:

Object View page > More Actions > Condition Formulas

This way you'll ensure that edit/delete functionality is consistent on all pages.

Posted by pvorobie on 01-Jul-2014 09:00

Bill, this feature is already implemented in Rollbase.

Posted by araqiel on 02-Jul-2014 02:39

Thanks for your replies ! It works.

This thread is closed