I have this classic dashboard that I can use to record our open job inventory into a UD09 table. In classic I could delete these by clicking the checkbox on the dash and running a custom action. The checkboxes were inserted as calculated fields in the UBAQ. Then if the user checks off one or more of those checkboxes and hits the delete button, this codes runs:
// step through each row of results
foreach (var xRow in (from ttResults_Row in queryResultDataset.Results where ttResults_Row.Calculated_MyCheck == true select ttResults_Row))
{
using (Ice.Contracts.UD09SvcContract mySvc = Ice.Assemblies.ServiceRenderer.GetService<Ice.Contracts.UD09SvcContract>(Db))
{
mySvc.DeleteByID(xRow.UD09_Key1, xRow.UD09_Key2, xRow.UD09_Key3, xRow.UD09_Key4, xRow.UD09_Key5);
}
}
This approach won’t work in Kinetic because the queryResultsDataset doesn’t work or is not present. One method that did work was to pass in the values for the key fields into callcontext, but this only stores one record. This code works in Kinetic for one record at a time:
if (callContextBpmData.Checkbox01 == true)
{
using (var mySvc = Ice.Assemblies.ServiceRenderer.GetService<Ice.Contracts.UD09SvcContract>(Db))
{
mySvc.DeleteByID(
callContextBpmData.Character01, // Key1
callContextBpmData.Character02, // Key2
callContextBpmData.Character03, // Key3
callContextBpmData.Character04, // Key4
callContextBpmData.Character05 // Key5
);
}
}
I really want to let the user check off a lot of rows, and then click delete.
What is the best way to have a grid of UD records with a checkbox on each line, and let the user checkoff as many as they want then click delete?