Results 1 to 3 of 3

Thread: Problem with custom dependency using metadata

  1. #1
    borjacomet is offline Sugar Community Member
    Join Date
    Dec 2011
    Posts
    25

    Default Problem with custom dependency using metadata

    I have one problem whith custom dependency. I created a module named "Inventario". This module have a text box and a combo box. The text box in required when value of combo box is "Reenviado".

    In the path custom\modules\Inven_Inventario\Ext\Dependencies I created the following file named CustomDependences.php

    PHP Code:
    <?php
    $dependencies
    ['Inven_Inventario']['required_CodigoPostal_dep'] = array(
    'hooks' => array("all"),
    'trigger' => 'true'//Optional, the trigger for the dependency. Defaults to 'true'.
    'triggerFields' => array('estado_c'),
    'onload' => true,
    //Actions is a list of actions to fire when the trigger is true
    'actions' => array(
    array(
    'name' => 'SetRequired',
    //The parameters passed in will depend on the action type set in 'name'
    'params' => array(
    'target' => 'cod_postal_destino_av',
    'label' => 'cod_postal_destino_av_label',//id of the label to add the required symbol to
    'value' => 'equal($estado_c, "Reenviado")' //Set required if the status is closed
    )
    ),
    ),
    //Actions fire if the trigger is false. Optional.
    'notActions' => array(),
    );
    ?>
    estado_c is id of comboBox
    cod_postal_destino_av is id of text box
    cod_postal_destino_av_label is id of label of text box.

    I rebuilt with a quick repair after modification but not working.
    I need your help

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: Problem with custom dependency using metadata

    Try DevToolKit. You can find the link to project page at my signature.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    borjacomet is offline Sugar Community Member
    Join Date
    Dec 2011
    Posts
    25

    Default Re: Problem with custom dependency using metadata

    Than's for your answer. DevToolKit is compatible with 6.2.0 CE?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Custom dependency using metadata
    By borjacomet in forum Español
    Replies: 15
    Last Post: 2012-02-23, 08:08 AM
  2. Creating a Custom Dependency for a View
    By Francescas in forum Developer Help
    Replies: 5
    Last Post: 2012-02-11, 06:19 PM
  3. Help creating a custom dependency
    By nielsentm in forum Developer Help
    Replies: 0
    Last Post: 2011-11-16, 02:29 AM
  4. custom function call from custom code field in metadata
    By josh.sweeney in forum Developer Help
    Replies: 9
    Last Post: 2010-02-09, 09:23 PM
  5. Custom Subpanel not metadata driven
    By ifv in forum Developer Help
    Replies: 2
    Last Post: 2009-06-05, 11:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •