How to attach data to dsHolder in Updatable Method Directives

I have a Updatable BAQ Method Directive and I want to refresh the data once my code has been run.

However in an Updatable, I cannot find dsHolder.

Is there an alternative way to refresh the client data that is in the dashboard grid.

If I am not mistaken you just have ttResults, which is the results of the ds.

1 Like

Is anyone able to refresh the Parent Screen when the changes occurs in the Embedded Dashboard

If the screen is not set up to do that by default, you will have to manage that via a client customization, either classic or kinetic.

Using dsHolder.Attach is not even advisable in most circumstances when available, because you are not merging the dataset, your are replacing it. This means that every other BPM or data directive that follows yours will be working with your dataset, and not the original one. This may cause major headaches down the road if one small mistake is made.

Instead, you should transpose your changes to the record and update its row revision to match what is in the database.

For example:

var someRecord = Db.SomeTable.FirstOrDefault();
someRecord.SomeField = "SomeValue";
Db.Validate(someRecord);

var origRecord = ds.SomeTable.FirstOrDefault(r => r.SysRowID == someRecord.SysRowID && r.RowMod == "");
if (origRecord != null)
{
    origRecord.SomeField = someRecord.SomeField;
    origRecord.SysRevID = (long)someRecord.SysRevNum;
}

Unless you do it out of spite, or contempt.

Then it’s acceptable on all occasions.

If You Say So Wow GIF by Identity