User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
en:adminmanual:businessmappings:field_dependency [2020/07/07 00:20]
joebordes [Field Dependency Business Mapping]
en:adminmanual:businessmappings:field_dependency [2020/07/07 01:52] (current)
joebordes [Examples]
Line 564: Line 564:
  
 <​code>​BusinessActions::​addLink(getTabid("​Invoice"​),​ '​FOOTERSCRIPT',​ '​corebosjshookinvoice',​ '​modules/​Invoice/​corebosjshookinvoice.js',​ '',​ 0, null, false);</​code>​ <​code>​BusinessActions::​addLink(getTabid("​Invoice"​),​ '​FOOTERSCRIPT',​ '​corebosjshookinvoice',​ '​modules/​Invoice/​corebosjshookinvoice.js',​ '',​ 0, null, false);</​code>​
 +
 +<WRAP center round box 80%>
 +Force execution of functions on the load of the edit screen.
 +</​WRAP>​
 +
 +The application is constructed to not permit this so we have to use a trick to consciously force this.
 +
 +<code XML>
 +<map>
 +  <​originmodule>​
 +    <​originname>​CobroPago</​originname>​
 +  </​originmodule>​
 +<​dependencies>​
 +<​dependency>​
 +    <​field>​cyp_no</​field>​
 +    <​actions>​
 +
 +        <​function>​
 +            <​field>​cyp_no</​field>​
 +            <​name>​doNothing</​name>​
 +            <​parameters>​
 +              <​parameter>​this is a stub to force the next two functions to work. this is a conscious execution of functions on load</​parameter>​
 +            </​parameters>​
 +        </​function>​
 +        <​function>​
 +            <​field>​assigned_user_id</​field>​
 +            <​name>​fieldDep_AssignUser</​name>​
 +            <​parameters>​
 +              <​parameter>​12</​parameter>​
 +            </​parameters>​
 +        </​function>​
 +        <​function>​
 +            <​field>​reports_to_id</​field>​
 +            <​name>​fieldDep_AssignUserSelect</​name>​
 +            <​parameters>​
 +              <​parameter>​5</​parameter>​
 +            </​parameters>​
 +        </​function>​
 +
 +    </​actions>​
 +</​dependency>​
 +</​dependencies>​
 +</​map>​
 +</​code>​
 +