Cannot see contract values in ER report

I am having trouble getting an ER report to execute with passing parameters by code.  When I try to run it by the following code, I get an error message that "Parameters for model SalesByPartModel have not been found".  I followed the Microsoft documentation about how to add contract classes for ER and have the following code trying to execute it.


                        ERIModelDefinitionParamsAction ParametersAction = new ERModelDefinitionParamsUIActionComposite()
                            .add(new ERModelDefinitionObjectParameterAction(ModelStr, 'RunTimeParameters', contract, true));

                        ERIFormatMappingRun formatMappingRun = ERObjectsFactory::createFormatMappingRunByFormatMappingId(formatMappingId,DefaultExportedFileName)

The RunTimeParameters are setup in my model as an Object of my contract class.  The parm methods show in the expanded list.

Why doesn't the ERIFormatMappingRun see the 'RunTimeParameters' in my model?


Shawn T.

  • There must be something to the class, but I can't find it.  When I look at the Fixed asset roll forward report, I see the 'MyParameters' data source and the AssetRollForwardService  uses this to run the report.  It's not setup as an integration point, so I don't understand what the difference is.

    ERIModelDefinitionParamsAction parameters = new ERModelDefinitionParamsUIActionComposite()
                        .add(new ERModelDefinitionDatabaseContext().addTemporaryTable(assetRollForwardTmp))
                        .add(new ERModelDefinitionObjectParameterAction(ERModelDataSourceName, 'MyParameters', _contract, true));
                    // Call ER to generate the report.
                    ERObjectsFactory::createFormatMappingRunByFormatMappingId(formatMappingId, DefaultExportedFileName)