back_image
blog-image

SuiteCRM Tutorial Dev Journey : Day 3

Author Image By Ashish Dwivedi

December 8, 2018

2 minutes

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 the 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 3 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 the specific module is loaded.
  • User Level- This context executes the logic for user action for Log-in and Log-out time.

They are further sub-categorized, please check the link below to see the detailed version.

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 the 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 on how to write a logic hook and how they get fired.

Here I have elaborated everything about the logic hooks.

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.
Categories: SuiteCRM development

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 *

© OutRight Systems 2024 - We are doing IT Right! This website is property of OutRight Systems and it has copyright.

Disclaimer: The website outrightsystems.org is owned and operated by OutRight Systems Pvt Ltd and not affiliated with SugarCRM, Inc. or SuiteCRM. SugarCRM® is a registered trademark of SugarCRM, Inc.