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
Next revision
Previous revision
en:devel:executefunctions [2017/07/16 01:21]
joebordes
en:devel:executefunctions [2017/07/16 16:28] (current)
joebordes
Line 5: Line 5:
 </​WRAP>​ </​WRAP>​
  
-During front-end development we normally run into situations where we need information from the backend or we need some functionality that is already implemented there with all the necessary logic.+During front-end developmentwe normally run into situations where we need information from the backend or we need some functionality that is already implemented there with all the necessary logic.
  
-Obviously this where javasript ​AJAX comes into play and we launch a call to the backend to retrieve the information or operations that we need.+Obviouslythis where javascript ​AJAX comes into play and we launch a call to the backend to retrieve the information or operations that we need.
  
 There are mostly three ways to do this: There are mostly three ways to do this:
Line 49: Line 49:
  
  
-We enhance the list of supported actions in ExecuteFunctions ​regullary ​so have a look at the latest copy to see all the things that can be done and don't hesitate to ask if you find something missing that you think should be there.+<WRAP center round info 90%> 
 +We enhance the list of supported actions in ExecuteFunctions ​regularly ​so [[https://​github.com/​tsolucio/​corebos/​blob/​master/​modules/​Vtiger/​ExecuteFunctions.php|have a look at the latest copy]] to see all the things that can be done and don't hesitate to ask if you find something missing that you think should be there. 
 +</​WRAP>​ 
  
 This is the list of actions that can be found: This is the list of actions that can be found:
  
 +  * **getFieldAutocomplete**:​ search for records in some modules
 +    * @param searchinmodule:​ comma separated list of modules to search in
 +    * @param term: string to search for
 +    * @param fields: fields to look for the term in
 +    * @param returnfields:​ fields to return of the records found
 +    * @param limit: maximum number of records that will be returned
 +    * @return set of records that have the term in the indicated fields
 +  * **getReferenceAutocomplete**:​ same as **getFieldAutocomplete** but searches only in the reference field of the defined modules and returns only those fields
 +  * **getFieldValuesFromRecord**:​ very useful function that permits getting information from QueryGenerator. You can find [[https://​github.com/​tsolucio/​corebos/​blob/​master/​modules/​Assets/​Assets.js#​L57|an example in the Assets module]] which fills in the Account when an Invoice is selected
 +  * **getEmailTemplateDetails**:​ function to load a merged email template
 +  * **ValidationExists**:​ returns yes/no if a module has a custom validation script
 +  * **ValidationLoad**:​ execute the custom validations of a module
 +  * **getModuleWebseriviceID**:​ a quick way to get webservice module ID, faster than ListTypes and parsing the output.
 +  * **getEmailTemplateVariables**:​ get a list of template variables
 +  * **saveAttachment**:​ upload an image or file to the application
 +  * **getNumberDisplayValue**:​ format the given values in the currency of the user
 +  * **ismoduleactive** returns boolean indicating if the given module is active or not in the installation