Custom Formula Function and dependencies

Hi! I've created a custom formula function to check if current user is admin and I have used it in a readonly dependency. The idea is to make some fields editable for admins.

It works like a charm for the web version but it's not for the mobile version. The problem is that is leaving the field editable for nonadmin users.

I haven't found this problem among known issues.

Any ideas?

Thanks very much!

Parents
  • And, just in case, here is an example of the dependency...

        'hooks' => array("edit", "view"),
        'trigger' => 'true',
        'triggerFields' => array(''),
        'onload' => true,
        'actions' => array(
            array(
                'name' => 'ReadOnly',
                'params' => array(
                    'target' => 'email',
                    'label' => 'email_label',
                    'value' => 'and(not(isUserAdmin()), and(equal($consolidado_mdm_c, true), greaterThan(strlen($email1),0) ) )',
                    //
                )
            ),

    Perhaps it would work if I use the function in the trigger...

  • Unfortunately all Dependencies on Mobile are built in and can not be extended. Eventually you can compile a custom app from sugar-mobile-sdk and override the Dependencies accordingly.

    André Lopes
    Lampada Global
    Skype: andre.lampada
Reply Children