The View Pro Area is a Web Area running SpreadJS, as such, it does not have many 4D native form event triggers. One trigger that may be desired is one for when a document has been completed being exported or imported.
When one of the document importing or exporting commands are called with a PDF or Excel format document, the process is asynchronous and just continues on without making sure that the action is completed or not. This can possibly cause issue if the document is larger and requires more time to complete and the next set of code is reliant on the export's or import's result.
To handle these cases, the export and import commands allow for a callback formula to be applied in the parameter object of options. In the object set method as a Formula to the "formula" property. This method will then be called when the command completes.
| $paramObj:=New object|
VP IMPORT DOCUMENT("ViewProArea"; $pathExcelDoc_t; $paramObj)
VP EXPORT DOCUMENT
VP IMPORT DOCUMENT