Quantcast
Channel: VFPX
Viewing all articles
Browse latest Browse all 3798

Updated Wiki: Using Dynamic Forms with Business Objects

$
0
0

Using Dynamic Forms with Business Objects

Dyanamic Forms can work with Business Objects to call the appropriate “Save“ method when the user clicks the Save button. The following properties are used to wire up a Dynamic Form to a Business Object to implement this functionality

oBusinessObject
oDataObject
cBusinessObjectSaveMethod

Example:

loForm = CreateObject('MyDynamicForm')
loOrder = CreateBusObject('Order')

loOrder.Load(lnSomeOrderId)

loForm.oBusinessObject = loOrder
loForm.oDataObject = loOrder.oData
loForm.cBusinessObjectSaveMethod = 'Save()'

loForm.Show(0) && Modeless

In this example, we've created a Dynamic From and a Business Object. Then we load a record with the Business Object. We then wire up Dynamic Form to the Business Object to handle the Save() click. Now, when the user clicks the Save button the command"loOrder.Save(.t.)" will be called to invoke the Save() method.


Viewing all articles
Browse latest Browse all 3798

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>