Skip to content
This repository was archived by the owner on Jan 24, 2021. It is now read-only.

Entity forms will not be editable for records without a StatusCode of 0 #117

Open
BobHarper1 opened this issue Jul 16, 2019 · 3 comments
Open

Comments

@BobHarper1
Copy link

BobHarper1 commented Jul 16, 2019

When an entityform is rended it checks if the statecode is 0. If it is not it assumes (possibly wrongly) that the record should be inactive and sets the form to read-only, no matter the settings on the EntityForm configuration.

Relevant lines: https://github.com/Adoxio/xRM-Portals-Community-Edition/blob/master/Framework/Adxstudio.Xrm/Web/UI/WebControls/EntityForm.cs#L581-L589

But as described in this Dynamics Community Forum post there is at least one entity that has more than the 0 or 1 (active, inactive) status, such as a ServiceAppointment which has four states - for example '3' means scheduled and you would assume that could be made editable.

This may be hard to get around however, for example, the SalesOrder state code also has a '3' for a fulfilled invoice.

@amervitz
Copy link
Contributor

Hi @BobHarper1, please check what the behavior is in online portals. We will need to defer to its behavior to decide whether this is by design or if any changes are appropriate.

@BobHarper1
Copy link
Author

I believe it is as I've described - any entity with a state code other than 0 will be read-only. This appears to be by design - going by the code comments anything that StateCode != 0 is presumed to be inactive.

This can have an undesired effect on some Dynamics OOB entity types that makes use of Portal difficult, in some specific cases.

@amervitz
Copy link
Contributor

I think the best avenue for moving such a change forward would be to reach out to Microsoft and see whether they will treat it as a bug or a feature enhancement in the online portals first. Online support requests would be sent via the PowerApps Platform admin center at https://admin.powerplatform.microsoft.com/support, and feature enhancements submitted as ideas on the PowerApps Ideas site at https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas/label-name/portals.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants