-
Notifications
You must be signed in to change notification settings - Fork 53
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
Field statecode not generated #198
Comments
According to some random blogs you have to get it by going through the control, but that seems weird to me. Anyway getControl("footer_statecode").getAttribute() should work |
Thanks @magesoe for your answer, I tried this way too but same result, the control is not recognized and it displays the same error message... In fact I have nothing concerning 'statecode' field in my generated form.d.ts |
Fields in the footer are read only so do not get included. Add the field as
a hidden field to the main form.
…On Thu, 17 Dec 2020 at 19:47, akiraquenot ***@***.***> wrote:
Thanks @magesoe <https://github.com/magesoe> for your answer, I tried
this way too but same result, the control is not recognized and it displays
the same error message...
In fact I have nothing concerning 'statecode' field in my generated
form.d.ts
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#198 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFNWEFIAKMJ5AFOYOBU5E63SVJN5HANCNFSM4VADV7OA>
.
|
@DeanHolmes Thank you for the information. It is sad that XDT cannot manage that... For now, I manually created the method getAttribute("statecode") in the generated file to make the rule work. |
I am currently migrating my TS files to use XDT.
For some reason, the generation process does not manage fields which are placed in the footer of the form ('statecode' field in my case).
So the following line of code fails on build because "Object 'this.formContext.getAttribute("statecode")' is possibly 'undefined' (TS2532)":
this.formContext.getAttribute("statecode").setValue(customentity_statecode.Inactive);
Is that a bug or is there any way to make it work?
Thank you in advance!
Environment
The text was updated successfully, but these errors were encountered: