Announcements
No record found.
Hi community,
I have a use case of which a sales custom BPF process is displaying on a target instance where the field record type is sales even though it is not. Can some provide some guidance if by creating a business rule would fix this issue?
Thanks in advance
Hi Sol007,
You want to hide the BPF based on one field value, right?
If so, you can achieve it through js code:
setVisible (Client API reference) in model-driven apps - Power Apps | Microsoft Docs
function hideBPF(executionContext) { var formContext = executionContext.getFormContext(); var type = formContext.getAttribute("new_type").getValue();//the field you need if(type == 0)//type is sales formContext.ui.process.setVisible(false); else formContext.ui.process.setVisible(true); }
open one entity form to add the js code:
Hi,
Please register above code on onload event of your form too addition to onchange event.
Please mark my answer verified if this is helpful!
Regards,
Bipin Kumar
Follow my Blog: xrmdynamicscrm.wordpress.com/
Hi Leah Ju,
It appears the use case is to hide the BPF appearing on non-sales lead forms. Will this still be achievable with js code or via a business rule logic?
Thanks
Can you explain what is 'non-sales lead forms'?
And you can't hide BPF through business rule, js code is one good way.
There are more than one active lead forms that are non sales and the BPF appears on all of them. Idea is to make the BPF non visible to these other forms? Could it non visible through security roles on each forms?
Please screenshot, on the Lead form there are several other forms which the BPF appears on creating a new lead but the BPF should only be visible for record type Sales. Is this only achievable with js code? Thanks in advance.
If you want to show/hide BPF based on the type field value, It is only achievable with js code.
And you need logic name of the type field and correct value of sales options in js code.
Go Settings > Customizations > Customize the system > Entities > Lead > Fields to find the type field you are using.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
ManoVerse 180 Super User 2026 Season 1
11manish 123
CU11031447-0 100