How to remove the Run business process button

Hi Team,

 

Scenario Is  : 

When payment status = closed, lock all the details and fields of edit page for which I followed this article https://customerfx.com/article/completely-locking-a-page-via-code-including-all-controls-and-details-in-creatio-formerly-bpmonline/

and it works well.

 

but the issue is that user is able to delete the  detail record using the run business process element. please see the below screenshot.

 

How can modify the code so that only other users have no visibility of this run business process button based on the condition (payment status = closed) ?

 

Many thanks.

 

Like 0

Like

1 comments

Hello Akshit, 

 

Actually there are couple ways to hide it.

 

The first one - you can find the implementation of this button by inspecting it, get the name and find the schema where this button is located. Then create replacing view mode where parent object will be the page where this button is located. So add the next code to the new schema(but change captions and object/buttons names according to yours):

 

define("InvoiceSection", [], function() {

    return {

        entitySchemaName: "Invoice",

        details: /**SCHEMA_DETAILS*/{}/**SCHEMA_DETAILS*/,

        diff: /**SCHEMA_DIFF*/[{

                  "operation":"remove",

                  "name": "YourButtonName"

            },]/**SCHEMA_DIFF*/,

        methods: {}

    };

});

 

 

The second way - hide it with using CSS by "visibility: hidden;" or "display: none;". But for such implementation you also need to inspect this button and get its name. Please check out this post about the way to hide it with CSS style:

 

https://community.creatio.com/questions/how-remove-tag-button

 

And this one might be really helpful to get some additional info: 

 

https://community.creatio.com/questions/how-add-custom-style-control-pa…

 

Best Regards, 

 

Bogdan L.

 

 

Show all comments