Dependency not working

Hello There,

I am facing dependency issue while using formulla builder for module . Below is the path of file : custom/Extension/modules/modulename/Ext/Dependencies

i am using below formulla in that file :

array(
'name' => 'SetRequired',
'params' => array(
'target' => 'namsa_bde_referred_c',
'value' => 'or(equal($id,""),and(isAfter($date_entered,date("2021-10-04")),equal($namsa_quote2_c,"Yes")))',
) ,
) ,

Somehow it's not working for me , Would anyone please help me to suggest any way to fix this.

Parents Reply
  • I don't think that is quite right. When creating a new record the date_entered field will be blank, it will not set to today until after the Save has been actioned.

    It might be safer to test to see if that field is blank as part of the dependency. However, you are correct in that there is then no need to check for the id being blank as an empty date_entered would do the same check within the Create page.

    Using the above from Jeroen probably means you can use a simpler formula that works directly in the field in Studio - at least you should be able to test it there anyway.

    Good luck,

    JH.

Children