Difference between Saving & Compiling a Dexterity Code

I was quite taken back by this very difference of Saving a Code and Compiling a Code in Dexterity.

Alright, let me explain.

I was demonstrating a customization my team yesterday and I had to change some code to show a Window on a Button Click event. The only code I had to change in that event script was to add the following statement:

open window [Window_Name];

And even a Non-Dexterity developer would tell us that the above statement do not contain any error, unless the window [Window_Name] do not exist at all. But in my case it did.

I SAVED the code and closed the Project. Created a Chunk and deployed it. To my confusion, the code piece that I added never worked. I was confused to say the least. Why not? I did add the code and created the chunk.

That’s where I made a mistake. I SAVED the code instead of COMPILING it. Only when we compile a Dexterity Code, it gets effective. Saving the code won’t affect the business logic and it would not have reflected in the chunk on that portion.

So, SAVING a code is totally different from COMPILING a code.



One thought on “Difference between Saving & Compiling a Dexterity Code

  1. If you only save the code and the script has never been saved before you will get an FP: Script Not Found error when it tries to execute as there is no executable code for the script.If you only save the code and the script has been compiled before, the previous executable code will be used as it has not been updated.ALWAYS compile entire dictionary before creating a chunk to avoid issues such as these.Davidhttp://blogs.msdn.com/DevelopingForDynamicsGP/


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 )

Facebook photo

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

Connecting to %s