<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.infinite-erp.co.id/index.php?action=history&amp;feed=atom&amp;title=How_To_Implement_FICExtension_Hook</id>
	<title>How To Implement FICExtension Hook - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.infinite-erp.co.id/index.php?action=history&amp;feed=atom&amp;title=How_To_Implement_FICExtension_Hook"/>
	<link rel="alternate" type="text/html" href="https://wiki.infinite-erp.co.id/index.php?title=How_To_Implement_FICExtension_Hook&amp;action=history"/>
	<updated>2026-04-06T18:42:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.infinite-erp.co.id/index.php?title=How_To_Implement_FICExtension_Hook&amp;diff=2815&amp;oldid=prev</id>
		<title>Wikiadmin: Created page with &quot;== Introduction ==  This document explains how to implement the '''FICExtension''' Hook. The hook is executed in the ''execute'' method of the '''FormInitializationComponent''...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.infinite-erp.co.id/index.php?title=How_To_Implement_FICExtension_Hook&amp;diff=2815&amp;oldid=prev"/>
		<updated>2021-12-16T05:21:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Introduction ==  This document explains how to implement the &amp;#039;&amp;#039;&amp;#039;FICExtension&amp;#039;&amp;#039;&amp;#039; Hook. The hook is executed in the &amp;#039;&amp;#039;execute&amp;#039;&amp;#039; method of the &amp;#039;&amp;#039;&amp;#039;FormInitializationComponent&amp;#039;&amp;#039;...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
This document explains how to implement the '''FICExtension''' Hook. The hook is executed in the ''execute'' method of the '''FormInitializationComponent''' class just before the response is built.&lt;br /&gt;
&lt;br /&gt;
== Hook Implementation ==&lt;br /&gt;
&lt;br /&gt;
This hook is implemented by extending the ''FICExtension'' class. It has just one void method to implement: ''execute''. This method receives as parameters the instances of the objects used to build the response.&lt;br /&gt;
&lt;br /&gt;
;'''mode''': The execution mode.&lt;br /&gt;
;'''tab''': The ''Tab'' owner of the ''Form'' that it is being executed.&lt;br /&gt;
;'''columnValues''': ''Map'' with the values of forms columns.&lt;br /&gt;
;'''row''': The ''BaseOBObject'' that it is being edited in the form.&lt;br /&gt;
;'''changeEventCols''': The ''List'' of dynamic columns that fire the CHANGE event mode.&lt;br /&gt;
;'''calloutMessages''': The ''List'' of messages returned by the callouts that have been executed.&lt;br /&gt;
;'''attachments''': The ''List'' with the attachments related to the record that it is being edited.&lt;br /&gt;
;'''jsExcuteCode''': The ''List'' of JavaScript code returned by the callouts to be executed in the client.&lt;br /&gt;
;'''hiddenInputs''': The ''Map'' with all the hidden fields with their values.&lt;br /&gt;
;'''noteCount''': count of notes available on the record that it is being edited.&lt;br /&gt;
;'''overwrittenAuxiliaryInputs''': The ''List'' of the Auxiliary Inputs overriden by callouts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
This example shows a message every time a new product is edited. You can find the code described below in the ''org.openbravo.platform.features'' module. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;public class ProductFICExtensionExample implements FICExtension {&lt;br /&gt;
&lt;br /&gt;
 @Override&lt;br /&gt;
  public void execute(String mode, Tab tab, Map&amp;lt;String, JSONObject&amp;gt; columnValues, BaseOBObject row,&lt;br /&gt;
      List&amp;lt;String&amp;gt; changeEventCols, List&amp;lt;JSONObject&amp;gt; calloutMessages, List&amp;lt;JSONObject&amp;gt; attachments,&lt;br /&gt;
      List&amp;lt;String&amp;gt; jsExcuteCode, Map&amp;lt;String, Object&amp;gt; hiddenInputs, int noteCount,&lt;br /&gt;
      List&amp;lt;String&amp;gt; overwrittenAuxiliaryInputs) throws OBException {&lt;br /&gt;
    if (&amp;quot;180&amp;quot;.equals(tab.getId())) {&lt;br /&gt;
      JSONObject jsonMessage = new JSONObject();&lt;br /&gt;
      try {&lt;br /&gt;
        jsonMessage.put(&amp;quot;severity&amp;quot;, &amp;quot;TYPE_WARNING&amp;quot;);&lt;br /&gt;
        jsonMessage.put(&amp;quot;text&amp;quot;, &amp;quot;Product form opened&amp;quot;);&lt;br /&gt;
      } catch (JSONException ignore) {&lt;br /&gt;
      }&lt;br /&gt;
      calloutMessages.add(jsonMessage);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:HowTo]]&lt;/div&gt;</summary>
		<author><name>Wikiadmin</name></author>
		
	</entry>
</feed>