BPM Update Task

,

Hi,

I have created a BPM that calls a Form on the GetNewHDCase and forces the user to enter the required information before creating a Help Desk Case, all works well however after it calls the HelpDesk.Update method I would like it to go on and assign the task created to the case owner.
After the HelpDesk.Update method I have called the Task.GetbyId and set the fields to the correct variables however when I call the Task.Update method nothing seems to happen even though my message box at the end shows that the variables are being assigned.


Message

I have also created a BPM that creates a new task on the HD Case if the related sales order Value is above a certain amount which works fine using the task.GetNewTask and Update methods which is why I am so confused as i’m using pretty much the same settings.

Open to suggestions if I am over complicating this.

You may need to set RowMod to “U”. That wouldn’t be necessary in your GetNew version because the RowMod will already be set to a changed (in that case added) row.

Thanks Daryl, That makes sense however I don’t have the ability to set the RowMod with the Set Filed Widget, would I need to do this with code?

These days I do it in code anyway, so I’m surprised the widgets don’t make it possible and it makes me wonder if I’m on the wrong track and the RowMod is meant to be set automatically anyway.

But certainly you CAN do it with code.

Thanks again Daryl,

Would you have any examples of how to do it? I am new to C# and I am struggling a little.

Looking at your screenshots, the DataSet you have is UpdTask?

If so, then something like

var updrow = (from row in UpdTask.Task select row).FirstOrDefault();
if (updrow != null)
{
    updrow.RowMod = "U";
}

That’s a bit belt-and-braces but more repurposeable in future that way.

Worked like a charm, thanks so much for your help.