Fraudie Posted June 2, 2007 Posted June 2, 2007 I have seen other similar topics already but they didnt help. I have a point of sale system with a portal. With products and stuff etc... I want to have a button outside of the portal which will delete the last transaction on the portal. But when i make a script which highlights the previous transaction and then the delete portal row, it deletes the entire point of sale for that particular sale! Plz help.
IdealData Posted June 2, 2007 Posted June 2, 2007 As you have 8.5 Advanced I assume you've used the debugging tools - running the script step by step and monitoring values. Why not post your script on the board.
Reed Posted June 2, 2007 Posted June 2, 2007 Do you have the cascading delete option checked in the relationship graph?
Fraudie Posted June 3, 2007 Author Posted June 3, 2007 (edited) Go to Portal Row [select; Last] Go to Portal Row [select; Previous] Delete Portal Row [] It automatically creates a blank record underneath the last product so I have it set to the last then the one above and then want it to delete that row. I want this button to be outside the portal. With the script now, when i press the button it highlights the right portal row and asks if i want to delete this one record, i click yes but then it deletes the whole thing. Edited June 3, 2007 by Guest
Ender Posted June 3, 2007 Posted June 3, 2007 If you manually delete a portal row, does it delete the parent record? This would indicate the parent side of the relationship has the option checked to "Delete related records in this table when a record is deleted in the other table". This is what Reed was asking about (but you didn't answer).
Fraudie Posted June 3, 2007 Author Posted June 3, 2007 Yea I didnt understand what he meant, Thanks that fixed it though. I think my IT teacher told me to tick that, idiot... lol
Reed Posted June 3, 2007 Posted June 3, 2007 You do probably want to tick the box on the other side of the dialog, so that portal records get deleted when the parent record is deleted. Just not the other way around.
Recommended Posts
This topic is 6383 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now