Examples of business object customizations
This example creates a business object for the Name_Note table and exercises the business object with a query.
- From the Staff site, go to RiSE > Business Object Designer.
- Select New > Design Business Definition. The New Object window is displayed.
- Enter Name_Note as the Name for this example.
- Click Create Object.
- (Database tab) Click Add. A window listing all the iMIS database tables appears.
- Select the Name_Note table and click OK. The Name_Note table is added to the Tables field, and its columns are added to the Available Columns field.
- In the Available Columns field, select all the columns except Name_Note.TIME_STAMP, which is used for iBO concurrency, and does not apply to this example.
- Click Add as Properties.
- Click Save.
- On the (Properties tab), examine the automatically generated entries on the Description, Type, Display, and Value tabs.
- (Properties tab > Definition sub-tab) For the following properties, verify the Available to Query Builder and Automatically Include in Queries options are checked:
- ID
- NOTE
- NOTE_NUM
- PURPOSE
- Click Save and then Close.
- Click Publish.
- Click OK and then Close.
- Create a new query in a working folder.
- From the Staff site, go to RiSE > Intelligent Query Architect.
- Select the folder Scratch.
- Select New > Query.
- Enter a Name for this query.
- (Define tab > Sources sub-tab) Click Add Source.
- In the Document Browser, go to $/Common/Business Objects.
- Select Name_Note. Click OK to add it to the Query Sources list.
- (Define tab > Display sub-tab) The four columns in the display set are selected.
- Click Save As. On the Document Saver window, enter Name_Note query as the name for this query.
- Click OK.
- Click Run to see the sample output.
- Generate extended results
- (Define tab > Sources sub-tab) Click Add Source.
- In the Document Browser, go to $/Common/Business Objects.
- Select Name_Note. Click OK to add it to the Query Sources list.
- Add the Name table to the business object, display FULL_NAME in the query results, and republish.
- In BOD, Edit the Name_Note business object. Select Database, and add the Name table to the Tables list. Add Name_Note.ID=Name.ID to the Joins list, by selecting the columns from the left and right drop-down lists.
- Select Columns, select Name.FULL_NAME, and add a property for the column.
- On the (Properties tab), select the Display sub-tab.
- Add FullName to the Display Set.
- Select Save, Close, Build, and Publish.
- In IQA, open the query for this business object.
- On the (Sources tab), click the Remove icon to remove the existing source.
- Click Add Source and re-add Name_Note.
- On the (Display tab), change the order to have Id and Full Name first. Use the Refresh button as you go to confirm the order. Save the query.
- Select Run to see the query results.
- On the (Summary tab), switch to Advanced mode to see the SQL for the query.
Note: When creating a new Business Object, ensure you add the new Business Object in the Design Business Object Definition folder only. Do not create subfolders in the Design Business Object Definition folder.
Note: Business object changes aren’t automatically reflected in queries that use them.
The following example changes a display property on the Campaign object and shows the change from the application.
- From the Staff site, go to Community > Manage marketing campaigns > Define campaigns.
- Select a campaign. Note the values for Name and Campaign Code. These values come from the business object.
- Go to RiSE > Business Object Designer.
- Select the Campaign object.
- Click Edit.
- (Properties tab) Select the Name property.
- (Properties tab > Display sub-tab) Change the Prompt for Field entry to the Campaign Name.
- (Properties tab > Display sub-tab) Change the Description to the Campaign Description.
- Click Save, and then Close.
- Click Publish.
- Click OK, and then Close.
- Go to Community > Manage marketing campaigns > Define campaigns.
- Select the campaign from Step 1. Note the values for Name and Campaign Code.
This example creates, builds, and publishes business objects for all user-defined tables set up in iMIS Customer Management. It edits one of the business objects, changing display set and prompt entries, and tests the new business object in IQA.
- From the iMIS Desktop, go to Customers, select Set up module > General and click Additional Windows. The Customer Setup window appears.
- Verify that the Defined Tables list contains the Name_Demo table. This table (included in the demo database) is used in this example.
- Close the Customer Setup window.
- From the Staff site, go to Settings > Utilities > User defined tables. The Auto-Generate Business Objects from User-Defined Tables window is displayed.
- Click Build All. Wait for iMIS to generate business objects. The Build Results field will display a log of the business objects that were built, compiled, and published.
- Verify that Name_Demo is listed in the Build Results field.
- Go to RiSE > Business Object Designer.
- Select the Name_Demo object.
- Click Edit. The Name_Demo object is displayed.
- (Properties tab) Verify that a Property Name value exists for each column in the Name_Demo table.
- Add the ID, Spouse, and School_Attended properties to the object's display set. Change the displayed caption for School_Attended property:
- (Properties tab > Display sub-tab) In the Property Name area, select the row containing the ID property. The values shown in the Display sub-tab change to the defined display set values for the ID property.
- (Properties tab) > (Definition sub-tab) select the Automatically Include in Queries? checkbox.
- Repeat steps a through b for the Spouse and School_Attended properties.
- (Definition tab) In the Default Display Property? List, select ID.
- (Properties tab > Display sub-tab) For the School_Attended property, change the Prompt for Field value from School _Attended to Alma Mater.
- Click Save and wait a moment for your changes to be saved to the business object.
- Click Publish. A results window is displayed, listing any messages and errors.
- Ensure that the business object published without errors. Click Close.
- Go to RiSE > Intelligent Query Architect.
- Select New > Query.
- Create a new query named New Query.
- (Sources tab) Click Add Source.
- Select Name_Demo.
- Click OK.
- Click Save to save the query.
- Click Run. The result set for the query is displayed. Notice that the three columns shown in the query result set match the three properties that you defined for the business object's display set.
- Modify the query to return only those records that contain non-null values for either Alma Mater or Spouse. Creating an OR evaluation like this requires you to define two separate filter sets:
- Click Define.
- (Filters tab) Select Advanced in the Mode drop-down list.
- Select Spouse in the Property drop-down list.
- Select Not Empty in the Comparison drop-down list.
- Click the Add Line icon +. The filter is added to the filter set.
- Click Add Filter. A new filter set is added below the first filter set.
- Select Or in the drop-down list to the left of the Property column header.
- Repeat steps c through e in the new filter set to add the Alma Mater property and specify a Not Empty comparison value.
- Click Save to save the query.
- Click Run. The result set for the query is displayed. Notice that the result set for the query now contains only those records that contain values for Alma Mater or Spouse.
Note: Rerunning the Build All command in the Auto-Generate Business Objects from User-Defined Tables window will cause your changes to be overwritten and lost. The business objects for user-defined tables are recreated by that operation.