on 2021 Feb 01 6:50 PM
Hi All!
We're trying to do a mass exclusion in Route Standard BO in SDK using ABSL according to a certain business rule:
import ABSL;
var selectedDate = this.RemainingVisitsDate;
if (!selectedDate.IsInitial())
{
this.Account.Remove(acc => acc.VisitDate != selectedDate);
} else {
raise Message_RemainingDate_Not_Set.Create("E");
}
The this.Account.Remove() doesn't work, even without any filter (should delete all items), what we're doing wrong?
Thanks in Advance!
Hi Saurabh!
Thanks for the answer! We tried the Delete() method, but he item doesn't have it (it was our first option actually). We haven't found an alternative until now.
in that case, the protocode tried was:
foreach (var acc in this.Account) {
if (acc.VisitCode != selectedDate){
acc.Delete() ---> doesnt have this method :(
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see...we're trying another approach (filter the added Visits instead of deleting the unwanted ones in this context).
Anyway, thank you for helping us!
Hello,
"Remove" should only be used when you want to "remove" an instance from iterating/runtime collection which will in result generate a new collection. It has no persistence in the database.
Hence If you want to delete the instance of "Attendee" party then you have to use "Delete" method and then you should be able to remove the instance completely.
For more details pls check:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
11 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.