Skip to main content

I know to use "execute a SmartObject method" when I am trying to get data from a smart object that isn't part of my view, but when it IS part of my view, does it matter if I use one or the other of these... 

 

Hi there,

If you use the view method then any controls that are bound to the data source will automatically load those values when you read data, and will use them as inputs for when you call the add / update type methods.

I seem to remember from a long time ago that calling the equivalent SmartObject method is slightly more performant than using the view methods, but this was from an internal post many moons ago.  Someone else may be able to confirm that this is still the case.

Cheers


When a View uses a SmartObject as a Data Source then it will inherit the SmartObjects methods.  The View based on the “New Vendor Bank Account Request” now has a Create List Item Method.

Executing the SmartObject Method and Executing the View Method will execute the SmartObject Method in the back ground.  From a execution point there is no difference. 

From a development and UX point of view there are differences.

  • Visually (clearer execution displays)
    • When executing the SmartObject Method the entire form will become unusable/disabled as the SmartObject method executes.
    • When Executing the View Method only that View becomes unusable/disabled.
  • Designer Experience (easier and faster low code dev)
    • Binding a SmartObject to a view, as a data source, allows you to bind its properties and methods to controls more easily. 
    • Designers can now drag properties from that SmartObject onto their view.  
      • this will create a label and an appropriate control type.
      • Any methods that have been configured in rules on the view will automatically map these controls to inputs and outputs.
    • Designers can now drag methods from the SmartObject onto the view to create an appropriate control (either a toolbar button or a button).
      • This will bind the data source SmartObject properties to the inputs and outputs of the method.  Where controls are bound to properties the controls are used instead.

So to summarize

The execution will still occur through the SmartObject layer irrespective of which action is used. 

Visually the view appears to execute the method instead of the form.

Most of the difference happens when you design.


Reply