Hi Terry,
Things are mixed up in your code. As far as I can see there are 2 ways of retrieving the design time properties:
- Through solutionModel
- Through the form controller.
Your code is a mix of these 2, hence the error.
The reason that the code editor doesn’t show you the mistake, is because you’ve overridden the oForm variable type with JSDocs (which should not be needed at all)
I guess either of 2 examples below should do the job:
function onAction$PrintForm( oEvent )
{
...
var jsForm = solutionModel.getForm(oEvent.getFormName());
var aPropertyNames = oForm.getDesignTimePropertyNames();
...
}
function onAction$PrintForm( oEvent )
{
...
var oForm = forms[oEvent.getFormName()];
var oProperties = oForm.controller.getDesignProperties();
var aPropertyNames = Object.keys(oProperties);
...
}
As you can see the first example will give you only the property names, so in order to get a specific property you need to call a 2nd function
The second example does contain the properties (both key & value) in the oProperties variable.
Hope this has unraveled your error mystery