I am using a modify provisioning policy form. Is it possible to present the form to the user only when they have selected a certain entitlement? Is plan object accessible to the form?
can you try printing the plan, if its having the entitlement in attribute request, then you can get plan.getAccountReuests() and loop through to get attributerequests and get the entitlement name that you are trying to select.
Hello @kkanathe
Welcome to the community!
You can try to use some work around for that. One that comes to my mind is:
- Create a dummy field in your provisioning policy form. You can set this field as hidden and based on the value of this field you can determine to make other fields hidden or visible according to requested entitlement.
- For the value of this dummy field, you can use field value rule where you can make use of project or accountRequest object passed as arguments. You can use the same to populate the value of the dummy field or return true/false.
- This dummy field can be accessed from your hidden field evaluation rule/script for all other existing form fields.
There might be other ways of doing it as well.
Hope this helps.
Animesh
Hi @kkanathe , No, the plan object isn’t accessible in the form since it’s created only after the form is submitted. If you need entitlement-based logic, the smooth way is to always show the form and handle checks later using a Before Provisioning Rule.