mircoflow something is wrong

0
Hi, I have a question. There is a Data View. I use it to create a product. I set text Box of 'Name' is required, and some other attribute are required alse. when I click action button, the page show the error: attribute is required. But when I check the product list. I find the error product. It have no name, no price, but it was created. Even my microflow add Exclusive split, check the attribute is or isn't valid, but it's not work. I don't know why,please help me, thx!
asked
2 answers
0

What I think is going wrong is that you're committing the object outside your data view. The required setting will only trigger if you try to commit the object within the confines of the data view it's in. If you commit it with an empty value anywhere else, it won't help you.

So if you're saving the object in the microflow source microflow, or in the microflow that you use to open the data view, your object can still end up in your database with an empty attribute value.

If you want to be absolutely certain the object isn't saved without that attribute I suggest you add a validation rule to the domain model. That will apply in any and all circumstances. A more versatile way of handling this is with the use of validation feedback actions in the save microflow. That gives you far more leeway in what to allow but will have to be re-implemented wherever you save the object.

answered
0

It looks like you use Field-level validation in the dataview. Assuming you do not have a Dedicated Save button with associated MF or a Before Commit MF on the object (defined in the domain model?).

Field level required will set up a nice notification in the Dataview, but a before commit validationchecker set up properly will make sure you cannot commit invalid objects in your Database

answered