delegateas/XrmDefinitelyTyped

Unable to generate TypeScript files: Specified argument was out of the range of valid values

thomas-schiller opened this issue · 3 comments

Typedefinition generation does not work anymore.
According to the error message, I assume some name-string of the crm views is too long/short or not set.

Is there any possibility to find out where exactly the problem occurs (which view for instance.)?

When trying to generate the *.d.ts files I get the following output:

[XrmDefinitelyTyped v.5.3.2]

Connecting to CRM...Done!
Retrieving CRM version...Done!
Version: (9, 2, 22031, 140)
Figuring out which entities should be included in the context..Done!
Creating context for the following entities:
        - <List of entities>
Fetching entity names from CRM...Done!
Fetching specific entity metadata from CRM...Done!
Fetching specific views from CRM...
Unable to generate TypeScript files: Specified argument was out of the range of valid values.
Parameter name: index

Environment

  • CRM/D365/CDS version: 9.2.22031
  • Tool version: 5.3.2

This is indeed an error we throw when the name of a view does not contain at least one letter, number, or underscore. This is still unsupported in version 6.1.0 (latest). For now there is no easy way to figure out which view causes the issue from the logging but you should be able to find the view(s) using the below FetchXML.

<fetch top="50">
  <entity name="savedquery">
    <attribute name="name" />
    <filter>
      <condition attribute="name" operator="not-like" value="%[a-zA-Z0-9_]%" />
    </filter>
  </entity>
</fetch>

Thanks, that did the job. Somehow a view without a name was created. After giving the view a name the generation worked as before.

This is indeed an error we throw when the name of a view does not contain at least one letter, number, or underscore. This is still unsupported in version 6.1.0 (latest). For now there is no easy way to figure out which view causes the issue from the logging but you should be able to find the view(s) using the below FetchXML.

<fetch top="50">
  <entity name="savedquery">
    <attribute name="name" />
    <filter>
      <condition attribute="name" operator="not-like" value="%[a-zA-Z0-9_]%" />
    </filter>
  </entity>
</fetch>

I did not find it with an empty name, but I have a name that is not in English, could this be a problem?