How to show stored procedure based List methods in an Item View method rule action
KB001455
PRODUCT
Audience |
|
Required Knowledge |
|
Introduction
Example Scenario
In the scenario below we will use the [dbo.].[GetProduct] SQL Service Instance based SmartObject to show how a stored procedure based method can be made visible in the list of methods used for the Execute a method on the View rule action of an Item View. The purpose is for the Item View to have the ability to surface custom List methods in the Execute a method on the View rule action.
The scenario doesn't cover the creation of the [dbo.].[GetProduct] SmartObject as it is assumed that the user has the relevant knowledge on creating a SQL Server Service Instance based SmartObject.
The scenario starts where an Item View is created based on the [dbo.].[GetProduct] SmartObject.
Follow the steps below to set up the scenario:
- Create an Item View using the [dbo.].[GetProduct] SmartObject which should be available under the Default folder of the category tree.
- Configure the Layout step as required then proceed to the Rules step of the wizard.
- Add a rule using the Execute a method on the View rule action.
- Note that the 'List' method is not displayed in the list of methods available.
- Edit the [dbo.].[GetProduct] SmartObject.
- Click on the Methods tabs on the Define Properties & Methods screen.
- The List method is displayed.
- Edit the List method and select 'Read' as the type then change the name of the method to Read. Click Finish and save the SmartObject.
- Edit the View and navigate to the Rules step.
- Add a rule using the Execute a method on the View rule action.
- Note that the 'Read' method is now displayed in the list of methods available.