Hi Priyanka,
If I understand correctly, you need help creating your validation microflows which checks whether an object with a certain ID already exists.
If you want to do this, you can use a Retrieve Action to retrieve all objects of this entity from the database.
Because you want to check whether there is an objects which has the same ID as the object you are currently editing, you can constrain your Retrieve Action as follows:
[ExampleAttribute = $ExampleEntity/ExampleAttribute]
The only problem now is that if we Edit an object which is already in the database, and try to save this, the validation message will be shown. To handle that we allow saving an existing object, add the following Xpath constraint to your retrieve action. This will exclude the object you're currently editing from your retrieve.
[id != $ExampleEntity]
Now your validation flow could look as follows:
With you explanation i can guess that your ID field is not of type autonumber (because you want to give the option of editing)
Now you can have a BeforeCommit Microflow setup on your entity (in the domain model you can double click the entity and find the tab Event Handlers in the end)
On this BeforeCommit Microflow, the incoming data is the one you entered on the New/Edit page. You can first do a DB retrieve on the data and see if it exists, if not you can create it.
Would this be something of interest to your flow? let me know.