I have the code working to run the Db retrieval parts, but I am missing something in the syntax (I think) when I try to run the External BAQ. I am getting the row count to be 0, which I think is because I am not filling in the project ID parameter correctly. Here is my code
using (var svc = Ice.Assemblies.ServiceRenderer.GetService<Ice.Contracts.DynamicQuerySvcContract>(context))
{
var BAQName = svc.GetQueryExecutionParametersByID("Cobra_Project_Cost");
var param = BAQName.ExecutionParameter.Where(r=>r.ParameterID=="ProjectID").FirstOrDefault();
foreach (var PROJ in project)
{
vProject = PROJ.ProjectID;
var CProj = Db.UD19.Where(e=> e.Key1 == vProject.ToString());
foreach (var CName in CProj)
{
Cobra_Project = CName.Character01;
BAQName.ExecutionParameter.Clear();
param.ParameterValue = Cobra_Project;
dsCobra = svc.ExecuteByID("Cobra_Project_Cost", BAQName);
dtCobra = dsCobra.Tables[0];
//set up the project cost table
int rcount = dtCobra.Rows.Count;
Have I properly set up the param variable to be the parameter, with the line param.ParameterValue filling in the value?