-
-
Save hasokeric/bc4b2d2086f677e652b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Execute BAQ with parameter | |
using (var session = new Epicor.Mfg.Core.Session("user", "secret", "AppServerDC://server:port")) | |
{ | |
// DynamnicQuery for BAQ | |
var dynamicQuery = new Epicor.Mfg.BO.DynamicQuery(session.ConnectionPool); | |
// Build Parameters DS | |
QueryExecutionDataSet executionDS = new QueryExecutionDataSet(); | |
// Actual parameter row | |
var paramRow = executionDS.ExecutionParameter.NewRow(); | |
paramRow["ParameterName"] = "StartDate"; | |
paramRow["ParameterValue"] = "6/15/2011"; | |
paramRow["ValueType"] = "date"; | |
paramRow["IsEmpty"] = "False"; | |
paramRow["RowIdent"] = ""; | |
paramRow["RowMod"] = ""; | |
paramRow["DBRowIdent"] = new byte[0]; | |
executionDS.ExecutionParameter.Rows.Add(paramRow); | |
// Out variable which indicates if more results are available (likely for use with topNRecords) | |
bool hasMoreRecords; | |
// Executed named BAQ with parameter | |
var results = dynamicQuery.ExecuteByIDParametrized("01-NamedBAQ", executionDS, "", 0, out hasMoreRecords); | |
// Store results | |
results.WriteXml(@"c:\temp\BAQWithParamResults.xml"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment