Wednesday, March 29, 2017

The Miracle Of Hook In Ms Dynamics Navision 2016 and 2017?

Why to use Hooks in NAVISION ?

Hooks are the another ways to implement customisation in NAV 2016 and above.

Hooks Advantage :-

  1. It increases Transparency.
      2. It increases Testability.

      3. It creates easy Upgradation of NAV versions.

      4. Separate Codunit for each objects. and there will be only a reference in base objects.

      5. Impact of Customisation will be minimum.

How to implement Hooks?

Step1.
Create a new codeunit which will be a parent codeunit and will be used for all customisation in NAV.

Step2.
Naming Conventions of HOOK
Microsoft Suggests Codeunit Process Name_HOOK for Eg. SIH_HOOK For Sales Invoice Header customisations.

Step3.
Create the hook and take an example to update a field and validate it before customisations.
for Example

Step4.
Reference it in Sales Post Codeunit.

Step5.
Implement all business logic in Hook Codeunit.

Summarize:-

Basically , it is another method suggested by MIcrosoft to write all code in one place so that implementation becomes easy to undertand and working smoothly.

To deploy Apps on Microsoft Partner Source you need to follow these guidelines provided by microsoft.

Thanks.

I hope this will surely hlp all my juniors to work and learn fastly, Please share my blog and comment below if you want another post or querry from my side.




1 comment: