Doubts on Layer concept in AX2012


I have a question about layer concept.

As per the layer concept, lower layer changes will effect on Top layer and Top most layer changes will consider when the compilation.(correct me if i am wrong).

  1. Opned the AX in VAR layerr and created a new Form with VAR layer and writen message like, “This is VAR Layer” in a button click(). When i click on button it display the message as “This is VAR Layer” and i closed the AX.

2)Now opned the AX in CUS layer and clicked form button created in step1, and it displayed message “This is VAR Layer”.
Now i changed the message as “This is VAR-CUS Layer”. and closed the AX.

  1. Now again opend the AX in VAR layer the clicked on form button and it displayed message as “This is VAR-CUS Layer”
    but here i expected a message as “This is VAR Layer”.

But here i have doubt, Lower layer changes will reflect in Top layer but 2nd time i changed the message in CUS, so how the Top most chages will display in lower layer.

Can any one please make me understand on this.


Layers allows you to organize your code, so you can override code in higher layers without touching code in lower layers, compare layers and so on. Nevertheless what gets executed is the same as if you flatten all layers together.

If you log into a specific layer, your modifications are put into that layer (unless you’re modifying something what already exists in a higher layer - it would go to the higher layer in that case). There is absolutely no difference in what code gets executed just because you log into another layer.

If I look at your example, your assumption that you’ll get “This is VAR Layer” after you changed the code to “This is VAR-CUS Layer” is wrong. "This is VAR Layer"still exists in VAR, but it will never executed unless you remove the change in CUS that overrides it.