Mahi Chopra
Mahi Chopra

Reputation: 103

How to create logic hook in sugarcrm when we create a module through module builder

I create a module Acquisitions through module builder and now want to make some calculations for some fields.i have no clue how to create a logic hook and where to create this logic hook. please tell me the full path and procedure for this.

Upvotes: 2

Views: 5198

Answers (4)

MANI
MANI

Reputation: 1

1­Custom/modules/\logic_hooks.php

logic_hooks.php

Descriptions­

1­ ­: Array Index

/Leads/logichooks_class.php ­­:Logic hooks Class File path

ogic_hooks_class­:Logic_hooks Class Name

before_save_method­­:Logic Hooks class Method Name

Logichooks_class.php

id."' "; } ?>

Upvotes: 0

Abhi Adr
Abhi Adr

Reputation: 1292

You can create a logic hook under Custom folder so it will be safe upgrade

/custom/modules//logic_hooks.php

For understanding the logic hook you can follow this link

Logic hook

I hope this Will help you

Upvotes: 0

david
david

Reputation: 33547

I have this very problem. Unfortunately it's not possible because when you you deploy the package in Module Builder, the custom folder gets overwritten and that's exactly where the logic_hook file needs to be.

Even the fact that there is a parameter called "logic_hooks" for that manifest.php install_def, it still doesn't seem to work when the logic_hook you want to add is part of package you are deploying (Yes, that's very annoying).

I posted about this on the sugar forum, you can see more details @: http://www.sugarcrm.com/forums/f6/module-builder-deploy-deletes-my-logic_hook-php-76402/

Upvotes: 2

See question 4196257 for using logic hooks.

Upvotes: 1

Related Questions