new action by invoke button

3
I was trying to create a new metaobject by Invoke action. (I need some attribute to be set before the page displays) I created a button 'Invoke', and attached Microflow to create a new metaobject, and changed some value for it (Commit is No, and Refresh in Client is unticked), and Show Client Form the Metaobject in content Dataview. Once I press 'Cancel' in the new screen, the Datagrid still shows one blank row. Once i refresh the page, it goes. I tried to make an event to refresh after rollback (Tried to access all meta objects from database). But i am confused, how to refresh the data grid on rollback. Still the problem exists. A blank object is listed in the data grid, even though it is rolled back.
asked
3 answers
3

Once I press 'Cancel' in the new screen, the Datagrid still shows one blank row. Once I refresh the page, it goes.

Your understanding of the behaviour is right. The DataGrid should not show an empty row after clicking cancel. Do you use the default cancel button?

Make sure that:

  • You use the default cancel button
  • That you do not commit in the Microflow creating the object
  • If the behaviour is still incorrect please sends us a testproject via our Partner Portal.

You can also try to use a custom cancel button, i.e. use a button to call a microflow. That microflow should contain a rollback (with refresh on true) and a close form activity.

answered
2

The problem of empty row was existing due to one of refresh on client check boxes in one of microflows, but when i made sure that all check boxes are unchecked , it is resolved(I mean no empty row created in data grid). I mean I have to check all microflows (microflow of invoke button and if there is an event action(microflow) on the metaObject that supposed to be created or changed)

answered
1

Maybe I don't understand your question completely, but it seems to be working as intended:

A microflow, when executed as you described, will first create an empty object (and store it in the database), then change a value (but, because you set commit to No, it won't store it in the database) and then show it in a dataview.

It should rollback once you hit either the "cancel" button or the "X" at the top (if it's a popup) and then show nothing in the datagrid. However, if you don't hit cancel or close the form and you surf to a datagrid, it will show an empty object there.

In other words, you shouldn't need a rollback action, just use the default cancel button.

answered