Loading...
 
If payment is negative then category must be Infrastructure

 

<map>
  <originmodule>  <originname>CobroPago</originname> </originmodule>
<dependencies>
<dependency>
    <field>amount</field>
    <condition>[{"groupid":"",
	 "columnname":"vtiger_cobropago:amount:amount:CobroPago_Amount:N",
	 "comparator":"m",
	 "value":"0",
	 "columncondition":""}]
    </condition>
    <actions>
        <change>
            <field>paymentcategory</field>
            <value>Infrastructure</value>
        </change>
        <readonly>
            <field>paymentcategory</field>
        </readonly>
    </actions>
</dependency>
</dependencies>
</map>

 

Or this one can also be done like this:

 

<map>
  <originmodule>   <originname>CobroPago</originname> </originmodule>
<dependencies>
<dependency>
    <field>amount</field>
    <condition>[{"groupid":"",
	 "columnname":"vtiger_cobropago:amount:amount:CobroPago_Amount:N",
	 "comparator":"m",
	 "value":"0",
	 "columncondition":""}]
    </condition>
    <actions>
        <setoptions>
            <field>paymentcategory</field>
            <option>Infrastructure</option>
        </setoptions>
 
        <deloptions>
            <field>paymentcategory</field>
            <option>Taxes</option>
            <option>Travel</option>
            <option>Stock</option>
            <option>Sale</option>
        </deloptions>
        <change>
            <field>paymentcategory</field>
            <value>Infrastructure</value>
        </change>
    </actions>
</dependency>
</dependencies>
</map>

 

If (employees < 100 and bill_country is Spain) or (employees > 100 and bill_country is Albania) Then hide ownership collapse address block

 

<map>
  <originmodule>  <originname>Accounts</originname> </originmodule>
<dependencies>
<dependency>
    <field>employees</field>
    <condition>[{"groupid":"1",
	 "columnname":"vtiger_accounts:employees:employess:Accounts_Employees:N",
	 "comparator":"l",
	 "value":"100",
	 "columncondition":"and"},
       {"groupid":"1",
	 "columnname":"vtiger_accountbillads:bill_country:bill_country:Accounts_Bill_County:V",
	 "comparator":"e",
	 "value":"Spain",
	 "columncondition":"or"},
{"groupid":"2",
	 "columnname":"vtiger_accounts:employees:employess:Accounts_Employees:N",
	 "comparator":"g",
	 "value":"100",
	 "columncondition":"and"},
       {"groupid":"2",
	 "columnname":"vtiger_accountbillads:bill_country:bill_country:Accounts_Bill_County:V",
	 "comparator":"e",
	 "value":"Albania",
	 "columncondition":""}]
    </condition>
    <actions>
        <hide>
            <field>ownership</field>
        </hide>
        <collapse>
            <block>LBL_ADDRESS_INFORMATION</block>
        </collapse>
    </actions>
</dependency>
<dependency>
    <field>bill_country</field>
    <condition>[{"groupid":"1",
	 "columnname":"vtiger_accounts:employees:employess:Accounts_Employees:N",
	 "comparator":"l",
	 "value":"100",
	 "columncondition":"and"},
       {"groupid":"1",
	 "columnname":"vtiger_accountbillads:bill_country:bill_country:Accounts_Bill_County:V",
	 "comparator":"e",
	 "value":"Spain",
	 "columncondition":"or"},
{"groupid":"2",
	 "columnname":"vtiger_accounts:employees:employess:Accounts_Employees:N",
	 "comparator":"g",
	 "value":"100",
	 "columncondition":"and"},
       {"groupid":"2",
	 "columnname":"vtiger_accountbillads:bill_country:bill_country:Accounts_Bill_County:V",
	 "comparator":"e",
	 "value":"Albania",
	 "columncondition":""}]
    </condition>
    <actions>
        <hide>
            <field>ownership</field>
        </hide>
        <collapse>
            <block>LBL_ADDRESS_INFORMATION</block>
        </collapse>
    </actions>
</dependency>
</dependencies>
</map>

 

On the invoice, set due date to 30 days more than the invoice date.

 

<map>
  <originmodule>  <originname>Invoice</originname> </originmodule>
<dependencies>
<dependency>
    <field>invoicedate</field>
    <actions>
        <function>
            <field>duedate</field>
            <name>fieldDep_AddDays</name>
            <parameters>
              <parameter>30</parameter>
            </parameters>
        </function>
    </actions>
</dependency>
</dependencies>
</map>

 

On Contact change phone to contain only numbers

 

<map>
  <originmodule>  <originname>Contacts</originname> </originmodule>
<dependencies>
<dependency>
    <field>phone</field>
    <actions>
        <function>
            <field>phone</field>
            <name>fieldDep_OnlyNumbers</name>
        </function>
    </actions>
</dependency>
</dependencies>
</map>

 

On Contact set description to description of the selected account

 

<map>
  <originmodule>
    <originname>Potentials</originname>
  </originmodule>
<dependencies>
<dependency>
    <field>related_to</field>
    <actions>
        <function>
            <field>title</field>
            <name>fieldDep_GetField</name>
            <parameters>
              <parameter>Accounts.industry,Accounts.email1</parameter>
              <parameter>potentialname,nextstep</parameter>
            </parameters>
        </function>
    </actions>
</dependency>
</dependencies>
</map>

 

IF (bill country starts with “A”) SET paymentcategory to infrastructure and make it readonly ELSE make paymentcategory editable

 

<map>
  <originmodule>  <originname>Accounts</originname> </originmodule>
<dependencies>
<dependency>
    <field>bill_country</field>
    <condition>
[
    {"groupid":"1",
	 "columnname":"bill_country",
	 "comparator":"s",
	 "value":"A",
	 "columncondition":""}
]
    </condition>
    <actions>
        <change>
            <field>paymentcategory</field>
            <value>Infrastructure</value>
        </change>
        <readonly>
            <field>paymentcategory</field>
        </readonly>
    </actions>
</dependency>
 
<dependency>
    <field>bill_country</field>
    <condition>
[
    {"groupid":"1",
	 "columnname":"bill_country",
	 "comparator":"ns",
	 "value":"A",
	 "columncondition":""}
]
    </condition>
    <actions>
        <editable>
            <field>paymentcategory</field>
        </editable>
    </actions>
</dependency>
</dependencies>
</map>

 

Another Example

 

<map>
  <originmodule>
    <originname>Accounts</originname>
  </originmodule>
<dependencies>
<dependency>
    <field>accountname</field>
        <condition>
         [
        {"groupid":"1",
	 "columnname":"vtiger_contacts:lastname:lastname:Contacts_Contact_Lastname:V",
	 "comparator":"c",
	 "value":"sel",
	 "columncondition":"AND"},
 {"groupid":"1",
	 "columnname":"vtiger_contacts:email:email:Contacts_Contact_Email:V",
	 "comparator":"c",
	 "value":"gmail",
	 "columncondition":"OR"},
 {"groupid":"2",
	 "columnname":"vtiger_contacts:firstname:firstname:Contacts_Contact_Firstname:V",
	 "comparator":"e",
	 "value":"albana",
	 "columncondition":""}
]
 
        </condition>
    <actions>
        <change>
            <field>phone</field>
            <value>12345</value>
        </change>
        <change>
            <field>email1</field>
            <value>a@gmail.com</value>
        </change>
        <hide>
            <field>otherphone</field>
        </hide>
        <hide>
            <field>assigned_user_id</field>
        </hide>
        <readonly>
            <field>fax</field>
        </readonly>
        <readonly>
            <field>notify_owner</field>
        </readonly>
<deloptions>
            <field>rating</field>
<option>Acquired</option>
            <option>Active</option>
            <option>Shutdown</option>
 </deloptions>
        <collapse>
            <block>CustomerPortalInformation</block>
        </collapse>
    </actions>
</dependency>
<dependency>
    <field>accountname</field>
        <condition>
         [
	{"groupid":"1",
	 "columnname":"vtiger_account:accountname:accountname:Accounts_Account_Name:V",
	 "comparator":"c",
	 "value":"corebos",
	 "columncondition":""}
]
        </condition>
    <actions>
        <change>
            <field>phone</field>
            <value>54321</value>
        </change>
       <show>
            <block>assigned_user_id</block>
        </show>
        <setoptions>
            <field>rating</field>
            <option>Market Failed</option>
        </setoptions>
        <disappear>
            <block>AddressInformation</block>
        </disappear>
    </actions>
</dependency>
</dependencies>
</map>

Admin Manual
Developer Manual