Hi.
How can I upload a JS file that points to that part of the form?
I want to make a contact filter according to the account, but I don't know where to put the javascript file to interact.
*This post is locked for comments
Hi.
How can I upload a JS file that points to that part of the form?
I want to make a contact filter according to the account, but I don't know where to put the javascript file to interact.
*This post is locked for comments
Thanks, Pavan for your answer. I resolved my query. !!
Cheers,
Poornimaa
Hi Poornima,
In that case you need to do following steps
1. Write a javascript and call it on save of the form. (https://community.dynamics.com/365/b/goutamdas/posts/how-to-prevent-moving-bpf-next-stage-or-set-current-stage-active-based-on-sub-grid-record-count-or-any-type-condition-in-dynamics-365) use formcontext instead of Xrm.Page
2. In the javascript make sure to prefix attribute name :header_process_<attributename> (that's how you read fields from BPF in Javascript)
3. On save (when ever BPF stage changes it saves the record) Retrieve the current stage and if the field doesn't have required value then prevent moving to next stage.
Note: In case my answer helped you. Kindly mark it as verified.
Warm Regards,
Pavan Kumar Garlapati
Follow my Blog: https://pavankumargarlapati.wordpress.com
Hello,
I have a business process flow that has almost 5 stages. My Business process flow should not move to another until it satisfies some condition in that stage.
(Eg. 1st stage name -> Verify Contact.In this 1st stage, I have a header field called “Trainee Validation Section”.
It is the option set containing more than 5 values.
When the “Trainee Validation Section “is “waiting with Employer for more information or canceled or something”, BPF should not move to the
next stage.
When this field holds the value of “Approved”, then the BPF should move to the next stage.
Likewise, I have the same kind of condition in all 5 stages. I tried doing this with workflow when the stage ID changes, check on the field. But my workflow is working fine only for the first stage, and when I click on the next stage before hitting the 2nd stage, it is throwing the error.
Can you please help me how can I do this with my javascript? I have questioned the same on the forum but haven’t got any information.
Link to the forum:
Hi,
You can not attach JS directly in the BPF Llike form editor.However you can keep the same control inside form and make it visible off and attach JS over there.
You can also attach function in the form onload event and access BPF control using "header_process_fieldname".
See here sample code -
community.dynamics.com/.../how-to-show-related-contact-records-from-account
Use formcontext instead of Xrm.page.
Another option which is no code approach , set the related in the lookup properties in the form fields , BPF field will be apply automatically.
André Arnaud de Cal...
292,516
Super User 2025 Season 1
Martin Dráb
231,436
Most Valuable Professional
nmaenpaa
101,156