Published by  Ashish Dwivedi  on

SuiteCRM Tutorial Dev Journey : Day 3

Now Its Day 3.

I hope you have gone through all packages builder exercise on Day 1 , and played wide range on creating/managing fields on Day 2.

As your journey to become a developer, here is some real fun going to start. Before you need to know that  development in SuiteCRM Tutorial is very tricky , there are many ways to do the same , you will become wise to decide best way as long as you go deeper.

In this Article, we are covering

  1. Logic Hooks
  2. Views

1. Logic Hooks– During your development , most of the time you are making logic hooks. They are of 2 types.

  • Application Level– Application level hooks are supposed to fire on all requests , irrespective of any module.
  • Module Level– Module level hooks only fire when specific module is loaded.

logic hooks

So like you have a "Before Save" logic hook on an application level , it is going to fire on all module when an Save event is going to be triggered.

Again if you have a “Before Save” hook on Lead module, it will only be fired when a lead is going to save.

So writing Application level hooks, you need to be pretty sure about your needs. Until and unless not need to go for module level hooks.

I have a complete article for how to write a logic hook and how they get fired.

Now it’s time to see the views.

2. Views– There are many customization using views. Here are the examples.

For any view customization, you need to copy the files from

  1. modules/mod_name/views/view.edit.php   -> custom/modules/mod_name/view.edit.php
  2. modules/mod_name/views/view.list.php  -> custom/modules/mod_name/view.list.php
  3. modules/mod_name/views/view.detail.php -> custom/modules/mod_name/view.detail.php

There are many custom requirements when you need to add your code into above files. If you are not present in their core location, you need to make it at the custom location by yourself. Here are a few examples.

  1. Changing a field value on the base of a condition after displaying.
  2. Refreshing any subpanel
  3. Any after load Jquery/Javascript.
  4. Custom code for any field on layouts.

1 Comment

more info here · May 2, 2019 at 5:47 pm

Hi there, You have done an incredible job. I will definitely digg it and personally suggest to my friends. I am sure they’ll be benefited from this site.

Leave a Reply

Your email address will not be published. Required fields are marked *