I have a dashboard that has an updateable BAQ. The BAQ often shows 50-60 jobs and we need to close them all
In epicor 10, I did a customization which had a button. When clicking on the button, it would loop in the grid and check the ‘JobClosed’ checkbox for all lines. It would then call the Update and Refresh action. It worked really well
However, in Kinetic, I don’t know how I’m supposed to loop through all rows to set the value. Is there any option other than creating a function? If I create a function, I would have a function + the update code in the BAQ so it would be a duplicate
You can make a call to a custom action in the BAQ. Look up custom action and put your code in there instead of in the customization. Then you can hook that up to a button in kinetic.
When I add a custom action in my BAQ, it should show in Action Data directly or I have to add it ? I deployed the Dashboard and reloaded it in Kinetic and I only see the Update action from the BAQ
I guess that if I only want to update some rows (not ALL rows), I have to add a parameter to the BAQ. That’s not a problem but even if I configured the parameter to subscribe to the ‘ProjectID’ column of the above grid, it still asks for the BAQ parameter every time I refresh my Dashboard. Is there any ‘silent parameter’ in Kinetic to bypass that?
It should show up. I’m assuming you used the “Define custom actions” button, as well as adding the BPM?
You control that in your code. You loop through your data set and choose what you want to edit. Usually you filter for updated rows only, and trigger that with a check box or something that you add into your BAQ. While you could use a parameter, I don’t see why that would be a necessity.
It should show up. I’m assuming you used the “Define custom actions” button, as well as adding the BPM?
You’re right. Just discovered this as you answered and it show directly in my Kinetic App once I deployed the Dashboard
You control that in your code. You loop through your data set and choose what you want to edit. Usually you filter for updated rows only, and trigger that with a check box or something that you add into your BAQ. While you could use a parameter, I don’t see why that would be a necessity.
My problem was that I thought that even if the grid was filtered, that it wouldn’t be filtered in the BAQ custom action and it would loop on all rows. I just tested with no parameter and my custom action only looped on the rows with the ProjectID that was shown in the kinetic dashboard so it’s perfect I’ll be able to check the column on there and then call the Update method from my BAQ
Thanks again for the help, really appreciated as I begin my understanding of Kinetic development !!
Yeah, the tracker filters actually parameterize the results in the back end when it can, otherwise performance would be horrible if it returned all the rows and filtered after that. Glad you got it figure out!
For some reason, the row isn’t considered ‘updated’ when I call my custom action. I changed a field and I changed RowMod to ‘U’ but even in my BAQ Designer, when I execute my custom action then click on Update in the Analyse tab, I get this error:
Is there anything else that I need to change on my queryResultDataset.Results to make it works ? I want to have my custom action + my code in Update processing in my BAQ. Technically I could put the same code from the Update method in my custom action but I was wondering if it’s a simple fix
Edit:
foreach(var row in queryResultDataset.Results)
{
if(row.JobHead_JobClosed == false)
{
row.JobHead_JobComplete = true;
row.JobHead_JobClosed = true;
row.RowMod = "U";
row.SetRowState(Ice.IceRowState.Updated); //Try that to modify the row but it doesn't seem to work
}
}
So it checks the box in the UI (you can see the box checked) but you are getting this error? Also, did you try not setting the row mod? I’ve had time where trying to set it actually messed things up.
Yes it checks the box in the UI but it doesn’t flag her as updated. I just tried not setting row mod, not setting rowstate and still the same error.
It’s not much of a problem since I just copy-pasted the code from my update bpm to the custom action bpm but if someone has the same problem and find a solution someday, please comment back, it would help!
I guess I usually just do the update within the the custom action, but then again, I usually roll my update nowadays because my projects seem to usually be more complex.