I am working with Microsoft Dynamics CRM on-premises v.1612.

I have two lookup fields on my accounts entity, used for creating risk assessments. One for high risk, the other for low. I also have an option set so I can choose either 'high risk' or 'low risk', which shows/hides the relevant lookup field.

I'm wanting to know, is it possible to have it so that instead of:

Choosing the 'low risk' option - The low risk lookup field shows. I then click the search icon and then click the +New button at the bottom so that the new record page appears.

Can I instead have it so that simply choosing the 'high risk' or 'low risk' option in the option set makes the lookup field show, but also automatically opens the new record page for whichever lookup was wanted?

I am able to use JavaScript to modify pages on the CRM, but don't have access to install plugins.

So far I have searched the Internet for any help with similar requirements, but only found options talking about different systems. It seems nobody else has requested this kind of functionality before from Microsoft Dynamics CRM, from what I can find at least.

Either that, or it is so simple to do that nobody else has needed to ask how to do it!

1

There are 1 answers

0
Henk van Boeijen On

Try adding this:

Xrm.Navigation.openForm({
    entityName: 'new_riskassessment',
    createFromEntity: 'account',
    useQuickCreateForm: true,
})
    .then(value => {
...

See also openForm - MS Learn.