Jump to content
xisto Community
Sign in to follow this  
Falguni.Ganatra

Vtigercrm Help Vtiger CRM is very important open - source

Recommended Posts

Here are some useful coding on most useful open source in PHP i.e Vtiger.

 

Steps to add Account field (related Module) in Campaign Module

 

1. Insert value in vtiger_relatedlists table

insert into vtiger_relatedlists(relation_id,tabid, related_tabid, name, sequence, label, presence)values(83,26,6,'get_accounts',10,'Accounts',0);
2. Create New table (i.e. vtiger_campaignaccountrel) to maintain relation

 

CREATE TABLE `vtiger_campaignaccountrel` (  `campaignid` int(19) NOT NULL default '0',  `accountid` int(19) NOT NULL default '0',  PRIMARY KEY  (`campaignid`,`accountid`),  KEY `vtiger_campaignaccountrel_accountid_idx` (`accountid`),  CONSTRAINT `fk_2_vtiger_vtiger_campaignaccountrel` FOREIGN KEY (`accountid`)   REFERENCES `vtiger_account` (`accountid`) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=utf8

3. To get campaign related accounts, define a function(get_accounts) like get_contacts/get_leads in modules/Campaigns/Campaigns.php

 

4. To display related accounts in campaign's related list, do the required changes in Smarty/templates/RelatedListContents.tpl

 

{elseif $MODULE eq 'Campaigns'}					<input alt="{$APP.LBL_SELECT_BUTTON_LABEL} {$APP.Account}" title="{$APP.LBL_SELECT_BUTTON_LABEL} {$APP.Account}" accessKey="" class="crmbutton small edit" value="{$APP.LBL_SELECT_BUTTON_LABEL} {$APP.Account}" LANGUAGE=javascript onclick='return window.open("index.php?module=Accounts&return_module={$MODULE}&action=Popup&popuptype=detailview&select=enable&form=EditView&form_submit=false&recordid={$ID}&parenttab={$CATEGORY}","test","width=640,height=602,resizable=0,scrollbars=0");' type="button"  name="button">

Share this post


Link to post
Share on other sites

Hi, Falguni.Ganatra,
Thanks for the info.
You first posted your text in the Tutorial section of our forum. Just a small detail. Please have a look at the "Tutorial Specifications" as expressed here : http://forums.xisto.com/topic/6-forum/
Namely, your post does not meet the first specification :

1. The Tutorials have to be of a bare minimum length of 500 words to be accepted.

Your topic is far below this 500 words threshold, that's why I moved it here.Also, when you post some code examples, don't forget to wrap them between "code" tags, this makes your text more easy to understand for standard people. I did the "code" tags job for you, please do it by yourself next time.
By the way, what is Vtigercrm ? "Virtual Tiger Customer Removable Material" ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.