Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control doesn't become read-only when the form becomes read-only #8

Closed
markduk opened this issue Jul 13, 2020 · 3 comments
Closed

Control doesn't become read-only when the form becomes read-only #8

markduk opened this issue Jul 13, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@markduk
Copy link

markduk commented Jul 13, 2020

I am using javascript to change the forms state (Active -> Inactive) or (Inactive -> Active).

Xrm.WebApi.updateRecord('entity_name', primaryControl.data.entity.getId(), {
    statecode: 2, // Inactive
    statuscode: 2 // Inactive
}).then(() => {
    formContext.data.refresh(true);
});

On success I refresh the form, all of the other controls on the page change to the appropriate edit mode (Editable or Read-only) but this control does not. If I refresh the page using F5 the control then has the correct edit mode.

This is happening in v2.5 (I saw Issue #4 said this was fixed in 2.2 but still seems to be an issue.)

@ChrisMayor
Copy link
Owner

ChrisMayor commented Jul 14, 2020

Thank you for opening an issue for this.

I will analyze/fix this in the next days.

@ChrisMayor ChrisMayor added the bug Something isn't working label Jul 14, 2020
@ChrisMayor
Copy link
Owner

It seems that the Read-only flag got broken in V2.5. I fixed this today - Please update to current solution V2.6.

@markduk
Copy link
Author

markduk commented Jul 17, 2020

Dankeschön Chris, I can confirm that it is working now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants