Hello,
Due to a new requirement, I wanted to try using Javascript to switch the BPF for an opportunity based on a specific field value. In short, we are treating Contract Renewals as an Opportunity but want to use a different form and BPF. Switching the form will be easy enough for the team to handle, but it would be nice if the corresponding BPF could load when that form is selected. The approach I am starting with is using JS to switch the BPF when the "Contract Renewal" field is set to "Yes". I tried using this post as a guide:
I am completely new to JavaScript so please bear with me, these may be very basic questions that follow.
I modified the JS to match the fields and IDs as needed, I created the web resource, and I tried adding a new OnLoad event. When I save and publish, I get a JS error on the form: ReferenceError: Web resource method does not exist
I think part of the problem is...I don't know what the function is based on the code below. I tried checkSwitchBPFbyType and SwitchBPF but those do not appear to work.
Here is the JS I used:
I appreciate any help you can provide!