In May 2015 we construct upon the work of the previous months to add functionality through events and global variables and also an important development to support image fields.
Query generator enhancements
Webservice Query Language enhancements
We enhance the supported query language syntax in the webservice interface by adding a direct connection to the QueryGenerator class we enriched during the past two months, permitting access to the directly related fields and support for parenthesis, "not in", and "not like" operators in the conditions.
You can find examples in our unit tests project and in the coreBOS Webservice Developer tool.
You can read more information on the documentation project page.
coreBOS Events
We add some more events for developers to plug in their logic.
The corebos.entity.link.delete, corebos.entity.link.before, and corebos.entity.link.after events will permit the developer to add their code when two records are unrelated or before and after they are related. In all events you will receive the name of the two modules and the exact two IDs of the records. You can see an example in the coreBOS Events Example code and get some more context in this thread.
The corebos.entity.import.overwrite, corebos.entity.import.merge, and corebos.entity.import.create events, together with the Import_Full_CSV global variable will permit the developer to add some functionality to the import process. Continue reading below for more information.
Global variables
Developer enhancements for import process
Constructing on the new import events and the Import_Full_CSV global variable we add the possibility to import all the CSV columns in order to do more actions during the normal import.
When the import process executes, only the mapped columns are imported. In other words, if you have a CSV with 10 columns but only 5 are mapped to fields in the module, then only those 5 will be read. The other 5 will be discarded. With the Import_Full_CSV global variable set to 1 all of the columns will be read. Only the 5 mapped columns will be saved but all 10 columns will be available to work with. That means that the 3 import events will receive all 10 columns and your code will be able to work with them to set the values of the columns that will be imported.
Let's suppose that you want to import a column whose value is the result of some operation on a few other columns. Basically you have three options:
1.- Open the CSV file in some spreadsheet program and make the calculations there before importing
2.- Create custom fields on the module to import all columns and add a workflow to execute the calculations
3.- Add code to intercept the import process. When a record has been read and all the values loaded, right before saving, you will get the whole record, with all the values so you can do the calculations and save the record directly with the definite result.
Image field support on all modules
Image field support for all modules. uitype 69 fields simply work, even in inventory module product lines!!
Some others:
Thanks for reading.