Skip to content

Commit 8fbc184

Browse files
authored
Merge pull request #3753 from MicrosoftDocs/stjanovi-patch-6
Add notes on control disabled list
2 parents 4cb708e + 0c465a4 commit 8fbc184

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

powerapps-docs/developer/model-driven-apps/forms-troubleshooting-guide.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,21 @@ Another way is to check the `ControlStateChange` operation that explains why a c
319319
> [!div class="mx-imgBorder"]
320320
> ![Control state changed](media/control-state-changed.png "Control state changed")
321321
322+
A control is disabled following the order of the below list of rules. If a rule is met, the result is final and all following rules are ignored. If you want to change whether a control is disabled or not, you must change the input to the rule used for the final result, or a rule earlier in the list.
323+
324+
If flag "DisableWebResourceControls=true" or "DisableFormControl=<control name>" are passed in and this control is impacted by these flags, control is disabled.
325+
If the owning entity is marked as read-only in UCI in entity metadata, the control is disabled.
326+
If the entity is not available in offline, the control is disabled.
327+
If the current user doesn't have write permissions on the record, the control is disabled.
328+
If the attribute metadata has IsValidforCreate marked as false, the control is disabled in an create form.
329+
If the attribute metadata has IsValidforUpdate marked as false, the control is disabled in an edit form.
330+
If the field for the control is the Owner field and the current user doesn't have an "assign to" privilege, the Owner field is disabled.
331+
If the user does not have write permissions on the field of the control defined by Field-level Security, the control is disabled.
332+
If the control is disabled or enabled by a Client API script, the control disabled state will honor that setting.
333+
If the control is disabled in form designer, the control is disabled.
334+
Finally, if the control passes all of the above checks, the record state determines whether control is disabled. The control is enabled by default on an active record and disabled on an inactive record.
335+
336+
322337
> [!NOTE]
323338
> The difference between `FormControls` and `ControlStateChange` is that the `FormControls` operation reflects the initial control state when the form loads, while the `ControlStateChange`operation reflects the state change at any time on the form. For example, if control is disabled for security reasons, it's very unlikely to be enabled after the form is loaded, so the initial state can be found in `FormControls` and not likely found in `ControlStateChange`. Even if a `Client API` function tries to enable the control, it will not be effective, and you'll see `ControlStateChange` event of the disabled state change intention by the script without success, and you'll be able to find out why the intention is unsuccessful in `FormControls`.
324339

0 commit comments

Comments
 (0)