How to Show/Hide a Button Using the Business Process Flow Stage
How to Show/Hide a Button Using the Business Process Flow Stage
First, we will create one new record in the Opportunity entity. After creating the new Opportunity record, the Close as Won button is displayed.

To achieve the Show/Hide button functionality as per Business Process Flow (BPF) stages:
Create a custom JavaScript in which we will check the BPF stage and accordingly we are showing and hiding the button.
Go to the customizations and create one new solution and add an Opportunity form; also, create one new web resource for Javascript.
JavaScript :
1.2 Creating new web resource (JavaScript)
Once JavaScript is created, open the ribbon workbench and select the solution that contains the Opportunity form.
1.3 Customize the “close as won” button on form.
Select the button and click Customise command. Next, create a new Enable Rule and add CustomRule inside that. Use below property for CustomRule:
Default : True , invertResult="" , funcationName: closeAsWonCustomEnable ,Javascriptname : new_ showhidebutton
Once you create a new Enable Rule, add that rule inside “Close as won” button command and publish.
1.4 Create new enable rule for “close as won” button and add that to “close as won” button command.
After publishing the custom rule for Close as Won button, we will go to the Opportunity entity and create one new record.
Once we create a new Opportunity record, we can see in the below screenshot that the Close as won button is not showing:
Now, move to the next stage, and when the last BPF stage arrives for this opportunity (BPF last stage: Opportunity Close) then the JavaScript (new_showhidebutton) will return TRUE and Close as Won button will show:
1.6 “Close as won” button showing on last BPF stage.
posted on 2022-10-14 14:15 lingdanglfw 阅读(440) 评论(0) 编辑 收藏 举报
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?
2008-10-14 CustVend Settlement by programming