RestoreCurrentRowIndex And Undo


Author
Message
Larry Caylor
Larry Caylor
StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
I've run into an issue with RestoreCurrentRowIndex and Undo. In my application I have a business rule that checks for duplicates by looping through the records in the business object using move commands or GetEnumerable. Before entering the loop I save off the current row index using SaveCurrentRowIndex. After the loop is completed I call RestoreCurrentRowIndex(False). At this point everything is okay. However if UndoCurrentRowOnly is called on the BO, the CurrentRowIndex is not updated and the Index points beyond the current number of rows. Attached is a simple example that shows the issue. The BO is mapped to the SF demo data base although it doesn't access it.

I've been able to work around the issue by storing the CurrentRowIndex off to a local variable and restoring the current row using Move.Absolute.

-Larry

Attachments
CurrentRowIndexTest.zip (75 views, 741.00 KB)
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search