There are some mandatory fields on the lead form which are required for qualifying. But the user may not know the values when creating the lead and hence I want to allow saving without the mandatory fields filled. Any suggestions on how to do this?
Hello,
Do you need additional help? Any news?
If it's already clarified, and the answer was helpful, could you please mark it as verified? That will help others in future.
Hello Sankalp,
No. You can read from the fields values and apply the validations (if the fields contains data) as part of the Plug-in logic.
Please mark the answer as verified if helpful.
Hi,
Is it possible to get the current BPF name and it's mandatory fields in the plugin? I am trying out this approach today and I'm stuck at getting the BPF mandatory fields
Sankalp, as mentioned before, if you want to have that fields validation when pressing "Qualify" button, you need to create a synchronous PreValidation Plug-in on "QualifyLead" message, that will fire only when clicking "Qualify" button.
Then, inside the Plug-in logic, you can check if the fields are populated and, if they are empty, block Lead qualification and display an error message to the user.
Please mark the answer as verified if helpful.
You may leverage QualifyLead message in plugin to block the qualify action if some of the fields are blank.
Please register the step as synchronized.
But those fields are required for qualifying the lead. My requirement is that users should be able to save the lead without filling those fields but should fill them to qualify the lead
You may change it to not required at very beginning by formContext.getAttribute(arg).setRequiredLevel("none") and change it back once user qualifies the lead.
Hi David,
So there's a process which contains required fields at every stage. I've extracted the list of required fields and made them mandatory by using setRequiredField("required"), on loading the form. The problem is this prevents the lead from being saved without these fields filled during lead creation. The users wouldn't have this data beforehand and should be able to save the lead without the process provided required fields
Hi Sankalp,
You may set mark the field as optional from the entity and enable onload JS to change the field required level after the lead getting qualified.
Here is the sample JS code for changing field required level. FYI
setRequiredLevel (Client API reference) - Power Apps | Microsoft Docs
Hello,
If you want to have that validation only when pressing "Qualify" button, you can create a PreValidation Plug-in on Qualify message, that will fire only when clicking "Qualify" button.
Inside the Plug-in logic you can check if the fields are populated and, if not, display a message to the user.
Please mark the answer as verified if helpful.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156