"Illegal Address Field" Error while accessing a Global


This one’s interesting and quite straightforward too.

I had to create a new Global field in my customization. Instead of creating a new field, I added an existing GP field (‘Customer Number’) and wrote my code to assign value and retrieve value as required.

I created the chunk and when my code was executed at run-time, I received the following error message:

At the first look, it’s all correct. I have referred to a Global field which exists pretty much in my dictionary, otherwise it would not have even got compiled in first place.

So what else would be the reason? It’s plain and simple. I created a “new Global field from an existing GP field”. Which means, when I created my chunk, I should have added this resource explicitly to my dictionary, using Transfer Resources Dex Utility option. OR I should have first created a new field itself and then add that to Globals.

Since I didn’t do above, compiler did not find that resource at all in my dictionary or GP’s dictionary (Dynamics.dic) and then threw this error message.

I created a new field itself in my custom dictionary and added that to Globals. Things were perfectly alright.

Sometimes, focusing more on brain draining issues may actually drain your brain. Well, I am serious. Otherwise, how in your opinion I missed this above simple concept?

Update: David has posted a quick tip on why this issue occurs and what is the best possible solution to this.

VAIDY

Advertisements

Leave a Reply

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 )

Google+ photo

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

Connecting to %s