Not sure how to make this work.
I have a situation whereby the user creates a record and rules do some checking of the new record. In particular cases the new record MAY be deemed invalid and should be discarded.
So, I guess the question is......
Is it possible to delete a record after the user has click Create but using the Rules of the BO?
I know I can use REPORT ERROR but this record may have been specifically altered by the earlier rules and I do not want the User to be questioned regarding an error. I just want the record discarded.
Not sure if I have explained this very well but hopefully someone will get the gist.
Deleting a record using rules
-
- Posts: 2405
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Deleting a record using rules
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Possible solution
A possible solution is having an yes/no flag attribute in this BO that the BO rules flag based on if the instance is invalid or not and then you use a scheduled process to delete flagged BO every hour or so. If there is an problem with e.g. the user seeing this invalid instance, the flag could also work as a filter to hide these instances from users.
There might be other and possible better solutions for this, the solution above is what came to mind when i read you post.
There might be other and possible better solutions for this, the solution above is what came to mind when i read you post.
Henrik (V8 Developer Ed. - Windows)
-
- Posts: 2405
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
-
- Posts: 2405
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Hi ACDC,
DELETE Object does not work in this instance as an error is generated due to the fact that the remaining rules have not yet been executed and the system thinks the Object has been deleted by another user.
DELETE Object does not work in this instance as an error is generated due to the fact that the remaining rules have not yet been executed and the system thinks the Object has been deleted by another user.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Try this, When you create the object use IF NEW .... to run the validate rule(s) and then on the DELETE rule use IF NOT Object IS NEW .
Then in the process that creates the Object, at the end of the process insert UPDATE Object . So the UPDATE event will take care of the DELETE rule after the object has been created
Then in the process that creates the Object, at the end of the process insert UPDATE Object . So the UPDATE event will take care of the DELETE rule after the object has been created