I am using a script to delete all related records in a portal called 'general'...
It only deletes the first row ... I think there is something wrong in the loop ....
Debugger shows the following .... cant make sense of it ...
Fixed it ... This is working perfectly !
If you're on the first portal row record, and you delete it, you're now on the next portal row, because that's now the first. Don't need to go to next portal row.
Actually, you're going to next record, not next portal row, so that would be an even bigger problem.
Go to Portal Row [ next ; exit after last ]
I am getttng a spining beach ball and the mac-command icon ... I think its in an endless loop
Since you are obviously trying to delete all child records related to the parent, why don't you just use GoToRelatedRecord > Result Options > Show Only Related Records > Match Current Record Only and then Delete All of the related records.
Go to Object [Object Name: "gerneral"]
Go to Portal Row [First[
Delete Portal Row (no dialog)
Go to Portal Row [next;exit after last]
erolstOct 12, 2015 6:56 AM
Just keep in mind that you will get into an endless loop with this UNLESS your "allow creation of records" is disabled in the relation on the relationship graph.
Go To Related Records can do this without the loop, but be careful. If the portal is empty and you don’t either check for no related records before the GTRR step or an error code immediately after the GTRR step, Delete All Records could delete all records from the wrong table.
The recommendations to Go to Portal Row[next] are misguided.
If using Go to Portal Row, then [first] is the correct choice, though I suspect you don't need any Go to Portal Row (as Extensitech indicates).
Retrieving data ...