Skip to content

Commit 11c5307

Browse files
authored
Create missing-form-context-bookable-resource.md
1 parent e59b8bd commit 11c5307

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title:
3+
description:
4+
author:
5+
ms.author:
6+
ms.reviewer: mhart
7+
ms.date: 03/13/2025
8+
ms.custom: sap:Schedule Board
9+
---
10+
#
11+
12+
This article helps resolve issues ........ in Microsoft Dynamics 365 Field Service.
13+
14+
## Symptoms
15+
16+
When opening the form to create a bookable resource, the error message **Cannot read properties of undefined (reading 'getFormContext')** appears when selecting a user from the field.
17+
18+
## Cause
19+
20+
There was a change in the internal handler for the userID field. It now requires a context to be passed in from the form.
21+
22+
## Resolution
23+
24+
You can fix this through an update of the form settings in Power Apps or with a script that you run in the browser's console.
25+
26+
### Update the form in Power Apps
27+
28+
1. Sign in to Power Apps and open the solution that contains the form.
29+
30+
1. Select the user field and go to the events.
31+
32+
1. Look for the *Mscrm.userid_onchange* event handler.
33+
34+
If the handler doesn't exist:
35+
36+
1. Add a new event of type **On Change**
37+
1. Select the **Scheduling/BookableResource/BookableResource_main_system_library.js** library.
38+
1. Enter **Mscrm.userid_onchange** in the **Function** field.
39+
1. Ensure the checkboxes **Enabled** and **Pass execution context as first parameter** are active.
40+
41+
If the handler exists:
42+
43+
1. Edit the handler and ensure the checkboxe **Pass execution context as first parameter** is active.
44+
45+
1. Save and publish the updated form.
46+
47+
Edit the handler and make sure that the "Pass execution context as first parameter" is checked
48+
Save and publish the form

0 commit comments

Comments
 (0)