Al: Issue Object Table: Conversion of OemText to Text fails

Created on 27 Jul 2020  Â·  6Comments  Â·  Source: microsoft/AL

Describe the bug

My app.json contains:

{
"target": "Internal"
}

I'm encountering this error "The definition of the Name field has changed; old type: Text, new type: OemText. Start your activity again."

AL Code to reproduce the issue

The error comes on this line of code. When I try to set filter on "Name" field of "Object Table" to get "Object ID".

image

5. Versions:

  • AL Language: v5.0.288712
  • Business Central: 16.0.11240.12076

Is there any way to convert the OemText into a valid string?

bug

Most helpful comment

Hi! We've discussed this a bit internally. We will deprecate the "Object" and "Object Metadata" tables in 17.0 and later. These tables should not be used as they refer to objects and metadata generated by C/SIDE. The AllObj, AllObjWithCaptions, "Nav App Object Metadata" tables should be used instead.

All 6 comments

Can you provide a fully contained project that reproduces the issue?

Hello,

I created a new AL project and edited the default "HelloWorld.AL" file to simulate the issue.

CustomerListExt

image

Error Message:

image

The project files are attached:
ObjectTableIssue.zip

Business Central Version: 16.0.11240.12076
AL Language: v5.0.288712
Launch.json

image

Please let me know if you need any other information.

Hello, is there any update on this issue? Do you need any more input from my side?

@MathurRahul , Did you try to work with the "AllObj" virtual table?

Hello @waldo1001 , Thank you for the input. It works.

image

Hi! We've discussed this a bit internally. We will deprecate the "Object" and "Object Metadata" tables in 17.0 and later. These tables should not be used as they refer to objects and metadata generated by C/SIDE. The AllObj, AllObjWithCaptions, "Nav App Object Metadata" tables should be used instead.

Was this page helpful?
0 / 5 - 0 ratings