RE: Scripting UI Lib example
HI Dennis,
Here's an interesting example that showcase samples are not production ready...
In the ScriptUIDataHandler, the code to get batch tasks is doesn't take into account an associateID.
BatchTaskInfo[] btis = ba.GetBatchTaskInfosByNameAndState(
ScriptingUILib.BatchTasks.ScriptsBatchTaskPlugin.Name,
SuperOffice.Data.BatchTaskState.Unknown);
You have a couple options....
Change that to use GetBatchTaskInfosByNameAndAssociates, but then you will need to check the BatchTaskState and only add ones that are Unknown.
BatchTaskInfo[] btis = ba.GetBatchTaskInfosByNameAndAssociates(
ScriptingUILib.BatchTasks.ScriptsBatchTaskPlugin.Name,
new int[] { SuperOffice.SoContext.CurrentPrincipal.AssociateId });
Alternatively, use the GetBatchTaskInfosByAssociatesAndState and only add the ones where the name equals the ScriptsBatchTaskPlugin.Name.
BatchTaskInfo[] btis = ba.GetBatchTaskInfosByAssociatesAndState(
new int[] { SuperOffice.SoContext.CurrentPrincipal.AssociateId },
SuperOffice.Data.BatchTaskState.Unknown);
Hope this helps!