Extending the same object twice in one Extension

I’ll be honest. I was a bit disapointed after I had published my previous blog. Not about the content but about the number of people commenting and replying on twitter.

I talked to a few people in person and they said that it was a bit complex and maybe not everyone completely got what the problem was that I was trying to solve.

The problem is simple. You cannot extend the same table, page or report more than once in one AL project.

Did you know that in the prototype of AL that was given to us as christmas present several years ago it actually did work? At least you could create a second extensions without fields.

I complimented Microsoft about it. I was happy that we could “put things where they belong” in a project with a proper structure.

The answer was “oops”, this was not supposed to work, because you can only have one SQL companion table per table.

I bet that if they spent a few more hours they could have made the compiler and engine smart enough to group these together and solve the problem alltogether.

Why did you say again we need this?

If you want to organize your PTE in modules you need this. I wrote about this in one of my earlier blogs.

And what is the workaround?

That is working with PreProcessorSymbols and Code Cloning.

Maybe that clarifies the blog I wrote a few days ago and get a bit more comments up and running.

Can we fix the Code Cloning?

Yes! I also discussed this with a few people and hopefully I will blog about that somewhere next week.

Enjoy,

Marije

2 Comments

  1. Bert Verbeek says:

    You are completely richt Marije. More page or table extension is needed if you want to organize the functionality in your app by folder!
    For sure this will be a feature we need in our app.
    Especially if you want to clean up and split apart.

    Like

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.