Answered by:
crm2016: turbo forms - switch form based on field (optionset)

Question
-
Hi everyone,
does anyone found a script for crm2016-turboforms-activated to switch the form based on an optionset-field?
For older crm-versions this was possible with a form reload:
- Load the form
- get the value of an optionsetfield of the loaded record
- and check (with js) if the loaded form is the right one (saved in optionset-field)
- if not - reload the correct from
- if yes - everything is fine and no reload is needed.
I dont think its a good way to reload the form - better is, to preload the value of the optionsetfield (before form is loaded) and then just load the right form (which is saved in the os-field), without reloading the form ...
but msft still dont likes this idea of optionset-based-form-loading ...
so i would be happy if the script with reloading the form works with turbo forms.Example:
forms in contact- customer (customers of our customer)
- contact person (of supplier (account))
- insurance broker (our customer)
Everyone need very different form-fields and pre-load-forms, subgrids etc.
So we created a new optionset-field in contact-entity: new_contacttype with the values
1 - customer
2 - contact person
3 - insurance brokerWe named the forma exactely like the os-values und by js checked, after loaded the record, which type of contact the record is (with the value of the field new_contacttype) and if the loaded form was not the right one, reloaded the needed form.
thx, Greetings
PeBTuesday, June 21, 2016 9:31 AM
Answers
-
Hello,
Following approach still works fine - https://community.dynamics.com/crm/f/117/t/157879
Dynamics CRM MVP
Read My blog
Subscribe for one of my courses- Proposed as answer by Peter Bohn Wednesday, June 29, 2016 6:25 AM
- Marked as answer by HIMBAPModerator Friday, August 5, 2016 8:09 AM
Friday, June 24, 2016 6:45 AMModerator
All replies
-
anyone?Wednesday, June 22, 2016 12:41 PM
-
Hello,
Following approach still works fine - https://community.dynamics.com/crm/f/117/t/157879
Dynamics CRM MVP
Read My blog
Subscribe for one of my courses- Proposed as answer by Peter Bohn Wednesday, June 29, 2016 6:25 AM
- Marked as answer by HIMBAPModerator Friday, August 5, 2016 8:09 AM
Friday, June 24, 2016 6:45 AMModerator -
Hi andrii
thx, this works ... i had a very similar script, but then a very little bit different.
I changed some things and it works!Great! Thx.
Greets PeBWednesday, June 29, 2016 6:27 AM