Coder Social home page Coder Social logo

xrm.reportscheduler's People

Contributors

andreaporini avatar bguidinger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xrm.reportscheduler's Issues

Bad Request

Hi Bob, I know this might not be an issue,but i dont know where to ask this. The App has been registerered everywhere, but I am getting this error - "Something went wrong: The remote server returned an error: (400) Bad Request.", when I use the connector in Flow. During Test, GET call works but not the POST call. What could be the problem ?

Update the Setup documents

Could you update the Azure set up in the documents I'm new to this but every thing seams to have changed since you made the setup instructions in azure portal. sorry to be a pain

GetReportSession failing

Hi There, I have downloaded the source and tried running this as a plugin and direct from code but it all seems to come unstuck at the GetReportSession method.

Regardless of report, the reponse is always the same:

<!DOCTYPE html><html><head><script type='text/javascript'>window.location.href = '/_common/error/errorhandler.aspx?BackUri=&ErrorCode=0x8004832C&inline=1&Parm0=%0d%0a%0d%0a&Parm1=%28rsItemNotFound%29&RequestUri=%2fCRMReports%2fRSViewer%2fReportViewer.aspx&user_lcid=1033';</script></head><body></body></html>

Any help would be greatly appreciated

Error 400 - Something went wrong

Getting a similar error than what I see in previous Posts. However I don't see a solution being listed. I am running a report that has no Parameters required. Below is the error that I am getting in the Body of the Output error:

{
"error": {
"code": "0x80040265",
"message": "Something went wrong.",
"innererror": {
"message": "Something went wrong.",
"type": "System.ServiceModel.FaultException1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]", "stacktrace": " at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, InvocationContext invocationContext, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext, Dictionary2 optionalParameters)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.Execute(OrganizationRequest request, ExecutionContext executionContext)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.ExecuteOperation(CrmODataExecutionContext context, EdmOperation edmOperation, Dictionary2 parameters, Dictionary2 boundParameters)\r\n at Microsoft.Crm.Extensibility.OData.ActionController.ProcessOperationRequest(String operationName, Dictionary2 operationParameters, EntityReference entityReference, String boundEntityName, String boundEntityType)\r\n at Microsoft.Crm.Extensibility.OData.ActionController.<>c__DisplayClass11_0.<PostBoundAction>b__0()\r\n at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func1 func, IEnumerable1 additionalCustomProperties)\r\n at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func1 func)\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.b__9(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()"
}
}
}

Fail to register custom connector on Flow

Hi, I'm stuck at registering my custom connector. I always receive "The reply url specified in the request does not match the reply urls configured for the application". I am sure I have put the correct reply url as indicated in step 6 Azure AD in INSTALL.md. Any idea why?

Run Template as different user

Hi @bguidinger ,

thank you for this connector, it's very useful.

I have a enhanchment to propose, I'd like to run my Excel Template as a different user, this way I can use the same view (filtered by "Owned by current user") but having a different context of data for each user that i extract from a List Record action.

Is this possibile?

Best regards,
Andrea

Unable to import into Dynamics 365

When attempting to import the ReportRenderer_1_5_0_0_managed.zip file into Dynamics it gives the following error. File Isn't Valid "The compressed (.zip) file couldn't be uploaded because it's corrupted or doesn't contain valid importable files. I have tried redownloading the zip file but it yields the same error message. I am using Dynamics 365 online Version 1710 (9.1.0.8428)

Unable to successfully test connector in GCC

I am able to successfully create and test this custom connector in us.flow. When attempting the same setup in gov.flow, i consistently get a bad authorization token (400) error.

Error from token exchange: Bad authorization token. The access token is from wrong audience or resource.

Is there anything that needs to be done differently for this custom connector to work in GCC??

Thanks!
Amanda

Using own client_id

Awesome solution Bob. I'm using it for a client and would prefer using an app registration in their Azure AD instead of the client id set in the source. I've registered a Native app and given permissions to D365 and then authorized the app but get a 401 Unauthorized when getting the access token. The same resource/username/password parameters work fine with your client id in there. Any idea what I might be missing?

Also, I tried switching to using a client id/secret and that gets me an access token just fine but then it fails to get the ReportSession and ControlId.

I can just use your solution as is if necessary but just wanted to check if you knew of any solutions to either of the above.

Thanks.

Using Flow - When Record Selected

We are using this application to run a report on selected records and then send to adobe sign for signature. My issue is how to pass the accountid that has been selected into the report for each account selected. Scenario, our user will create a view and run the flow on multiple records. Flow is set up with a when record is selected, then list accounts, what is the correct parameter for the accountid?

Thank you

Import Report Renderer Custom renderer does not work

Dear,

We are currently integrating the Custom Connector in a solution with a Power Automate Flow.
Then we export the solution from the Dev environnement and try to import it in another Test environnement. The Flow seems completely broken and is not usable and editable any more.

Did you have experienced the same problem ? Have you any adviced to deploy the Power Automate flow within another environments?

Any help will be appreciated.

Thanks in advance for your feedback.

Kind Regards,

Unable to pass multiple parameters to the report

Hello Bob, First of all thanks for building this solution. Its very handy to use.

I am trying to schedule a report that expects multiple integer parameters. I have tried passing it by initializing a variable of type object and passing the values as an array as shown below.

{
"ReportParameter1": [
"960940000",
"960940000"
]
}

When i run the flow i get this error "Something went wrong: The best overloaded method match for 'System.Net.WebUtility.UrlEncode(string)' has some invalid arguments"

Is there anything obvious that i am missing here?

flow

How to Pass Parameters

Hi Bob,

Thank you for the awesome work. So I've been using the Report Renderer for a file My boss asked me to make one more automation but I couldn't manage to get it working.

For the previous flows, report renderer easily worked without any parameter passing like you described in the guide. I guess I was lucky because I couldn't figure out where to find the parameters for the specific report.

For this one however, it gives me error code 400 with the message of "Something went wrong: Error while getting report session. This is most likely an issue with invalid report parameters.". I'm guessing this new flow I'm working on is not working because the data is not coming from the same database compare to others. I believe I should pass the parameters to fix this issue but I'm pretty new to Dynamics 365 environment and I couldn't figure out where to find the parameters for the specific report.

I'm attaching a picture of how the flow error looks like and also pasting the error code below. Error code looks similar to the codes in previous posts but I couldn't figure it out. Maybe if you could help me how to find the JSON body of the parameters that would be great. I would be super happy if you could take look!

{
"error": {
"code": "0x80040265",
"message": "Something went wrong: Error while getting report session. This is most likely an issue with invalid report parameters.",
"innererror": {
"message": "Something went wrong: Error while getting report session. This is most likely an issue with invalid report parameters.",
"type": "System.ServiceModel.FaultException1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]", "stacktrace": " at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, InvocationContext invocationContext, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext, Dictionary2 optionalParameters)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.Execute(OrganizationRequest request, ExecutionContext executionContext)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.ExecuteOperation(CrmODataExecutionContext context, EdmOperation edmOperation, Dictionary2 parameters, Dictionary2 boundParameters)\r\n at Microsoft.Crm.Extensibility.OData.ActionController.ProcessOperationRequest(String operationName, Dictionary2 operationParameters, EntityReference entityReference, String boundEntityName, String boundEntityType)\r\n at Microsoft.Crm.Extensibility.OData.ActionController.<>c__DisplayClass11_0.<PostBoundAction>b__0()\r\n at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func1 func, IEnumerable1 additionalCustomProperties)\r\n at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func1 func)\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.b__9(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()"
}
}
}

Screen Shot 2020-02-01 at 4 47 47 PM

Cannot Render Report, Template or Template Excel using Connector

I’ve created a custom connector for Report Rendering in a trial instance, following the steps provided by you.
Please find below the test results for the APIs used in the Rendering Report Connector.

pic1
pic2
pic3

The test successfully retrieved report list and query (view in crm) list.
I found the test failed to retrieve document template list.
Test for (/POST/RenderReport (test 4), /POST/RenderTemplate_Word (test 5) , /POST/RenderTemplate_Excel (test 6) also returned schema validation issue.

In Dynamics 365 forum, there are a number of people reporting issue getting this Report Rendering connector to work. Unfortunately, no solution mentioned to solve the issue.
There might be an issue with the swagger file potentially?

Do you have any fix to this issue that would be appreciated.

Cannot install solution

Hi, I am getting errors when importing the solution. saying invalid solution because the 3 XML file expected inside the solution is missing. And if I want to use just the plugin, which of the pipeline stages should i register the plugin against ??

Azure App Registration Changes

Hello, I tried to set up the solution according to the installation guide, but Azure App Registration is changed completely and Reply URLs and Dynamics CRM API are not available now. So what should be the suggested installation process in Azure now? Thank you.

Connector Definition

In Power Automate after the security section on the install document, there is a new section called Definition, you specify Actions, Triggers ...etc

I kept all the defaults but nothing comes up under test and cannot change options.

Please advise,

PDF Report Not Changing Values

When I use a custom report and change values such has the last week to the last 15 or 30 or even 60 days and change sorting by a different field. Nothing changes with the PDF from the original run i did but when i run it in Dynamics it shows the proper information.

Any help or ideas would be greatly appreciated,

Unable to create connection

We are getting an error when creating the custom connector. The screens in Azure and Flow have changed since this original installation document was created. Can we get any information about how to set up the new informational lines?

Question on Calling ReportScheduler from Web API

Hi,

This is more of a silly question than an issue - if I call the action from web api, can I prompt the saving or download of the output?

Thanks,

Jack

Xrm.WebApi.online.execute(request).then(result => {
var response = JSON.parse(result.responseText);
var output = response.Output;

console.log(output); 

}

Error 400 - Something went wrong

hI,

Getting a similar error than what I see in previous Posts.

Below is the error that I am getting in the Body of the Output error:.

{
"error": {
"code": "0x80040265",
"message": "Something went wrong: Error while getting report session. This is most likely an issue with invalid report parameters.",
"innererror": {
"message": "Something went wrong: Error while getting report session. This is most likely an issue with invalid report parameters.",
"type": "System.ServiceModel.FaultException1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]", "stacktrace": " at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, InvocationContext invocationContext, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext, Dictionary2 optionalParameters)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.Execute(OrganizationRequest request, ExecutionContext executionContext)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.ExecuteOperation(CrmODataExecutionContext context, EdmOperation edmOperation, Dictionary2 parameters, Dictionary2 boundParameters)\r\n at Microsoft.Crm.Extensibility.OData.ActionController.ProcessOperationRequest(String operationName, Dictionary2 operationParameters, EntityReference entityReference, String boundEntityName, String boundEntityType)\r\n at Microsoft.Crm.Extensibility.OData.ActionController.<>c__DisplayClass11_0.<PostBoundAction>b__0()\r\n at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func1 func, IEnumerable1 additionalCustomProperties)\r\n at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func1 func)\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.b__9(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()"
}
}
}

Wont Import

Getting error "You can only import solutions with a package version of 8.2 or earlier into this organization. Also, you can't import any solutions into this organization that were exported from Microsoft Dynamics 365 2011 or earlier."

I am using the latest release and we are running CRM Online.

Thanks,
Terry

OpenAPI File

Under the custom connector in Power Automate I name the connection. After that I have the Import an OpenAPI file. Where is this file located?

Did I miss a step with the installation?

Continue is greyed out and when i click on import it wants me to load a json file.

Please advise,

Question - Reg Client Id

How to get Client Id in the GetToken Method?

I have registered my crm application in Azure AD. get the application Id , I used that as a Client Id, But I am getting 400 unauthorized error.

little caveat here that Our Azure AD will sync local AD, when I login to CRM it is going to redirect to local adfs site.

private Token GetToken(string resource, string username, string password)
{
var uri = $"https://login.microsoftonline.com/common/oauth2/token";

        var parameters = new Dictionary<string, dynamic>()
        {
            ["grant_type"] = "password",
            **["client_id"] = "2ad88395-b77d-4561-9441-d0e40824f9bc",**

            ["username"] = username,
            ["password"] = password,
            ["resource"] = resource,
        };
  
    }

Passing Parameters for certain condition types

Is it possible to pass parameters for the following type of fields?

  • Look Ups (Do we pass the Guid?)
  • Date Fields, specifically for operators like Last X Years?

If you could please clarify how to pass these parameters it would be incredibly helpful.

Thanks

Import API step?

Hi, I have created all of the setup and stuck at the API import step in Flow, where does the json file come from? I tried creating from blank bu then the connector has no actions which I assume are in the API file. thanks for any info to resolve this.

Can't directly edit components within a managed solution ...

Message in Dynamics/Power Apps says:
You cannot directly edit the components within a managed solution. If the managed properties for solution components are set to allow customization, you can edit them from another unmanaged solution.

Due to this, I don't seem to be able to set the Username/Password in the Configuration area - after I click submit, nothing happens so I don't know if it has saved or not.

Should I be using the 'Unmanaged' zip file instead? (i.e. ReportRenderer_1_5_0_0.zip instead of ReportRenderer_1_5_0_0_managed.zip)

400 Error while executing report from flow.

While Executing Render report from flow i am getting following exception. This issue is for all reports, which are having no parameters then also getting same issue. I am using oob report.. "User Summery report."
Note: I am using trail CRM.
Annotation 2019-07-01 123755

Issue Details:
Something went wrong: Value cannot be null.
Parameter name: SecureConfig

Plugin Execution Error

Hi Bob,

I wonder if you can help?

We're using report renderer for a client and have started getting an issue in flow with solution version 1.5

I thought there might be an issue with environments and connections etc in Flow itself so have created a new flow in the correct environment. The app registration secret has been renewed and the connection seems to be fine. So is the API access to CDS for the environment. The connection seems to be fine as we are seeing plug in execution exceptions being created so it looks like flow is able to connect with no issues.. See below. I also refreshed the credentials in the solution configuration.

I wonder if you have any ideas about what is going on?

Cheers

Chris.

Flow reports an error when rendering a report

Something went wrong: Error executing web request: https://esuoms.crm4.dynamics.com/Reserved.ReportViewerWebControl.axd?OpType=Export&Format=PDF&ContentDisposition=AlwaysAttachment&FileName=&Culture=1033&CultureOverrides=False&UICulture=1033&UICultureOverrides=False&ReportSession=repl51vgqoms4g3fjynorp45&ControlID=e3c488bbc8ec4afa94e475815b7e1e2b

There is also a plug in execution error in CRM

Unhandled exception:
Exception type: System.ServiceModel.FaultException1[Microsoft.Xrm.Sdk.OrganizationServiceFault] Message: Something went wrong: Error executing web request: https://esuoms.crm4.dynamics.com/Reserved.ReportViewerWebControl.axd?OpType=Export&Format=PDF&ContentDisposition=AlwaysAttachment&FileName=&Culture=1033&CultureOverrides=False&UICulture=1033&UICultureOverrides=False&ReportSession=repl51vgqoms4g3fjynorp45&ControlID=4f471065789148038c6ca740209cd17dDetail: <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts"> <ActivityId>ca90607f-9b74-4a4c-867f-5b12a8abd0c1</ActivityId> <ErrorCode>-2147220891</ErrorCode> <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic"> <KeyValuePairOfstringanyType> <d2p1:key>OperationStatus</d2p1:key> <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int">0</d2p1:value> </KeyValuePairOfstringanyType> <KeyValuePairOfstringanyType> <d2p1:key>SubErrorCode</d2p1:key> <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int">-2146233088</d2p1:value> </KeyValuePairOfstringanyType> </ErrorDetails> <HelpLink i:nil="true" /> <Message>Something went wrong: Error executing web request: https://esuoms.crm4.dynamics.com/Reserved.ReportViewerWebControl.axd?OpType=Export&amp;Format=PDF&amp;ContentDisposition=AlwaysAttachment&amp;FileName=&amp;Culture=1033&amp;CultureOverrides=False&amp;UICulture=1033&amp;UICultureOverrides=False&amp;ReportSession=repl51vgqoms4g3fjynorp45&amp;ControlID=4f471065789148038c6ca740209cd17d</Message> <Timestamp>2020-07-15T11:05:03.5806393Z</Timestamp> <ExceptionRetriable>false</ExceptionRetriable> <ExceptionSource>PluginExecution</ExceptionSource> <InnerFault> <ActivityId>ca90607f-9b74-4a4c-867f-5b12a8abd0c1</ActivityId> <ErrorCode>-2147220970</ErrorCode> <ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" /> <HelpLink i:nil="true" /> <Message>System.Exception: Error executing web request: https://esuoms.crm4.dynamics.com/Reserved.ReportViewerWebControl.axd?OpType=Export&amp;Format=PDF&amp;ContentDisposition=AlwaysAttachment&amp;FileName=&amp;Culture=1033&amp;CultureOverrides=False&amp;UICulture=1033&amp;UICultureOverrides=False&amp;ReportSession=repl51vgqoms4g3fjynorp45&amp;ControlID=4f471065789148038c6ca740209cd17d at BGuidinger.Reports.Renderer.GetResponse(HttpWebRequest request) at BGuidinger.Reports.Renderer.RenderReport(Entity report, String format, String parameters) at BGuidinger.Reports.Render.OnExecute(IPluginProvider provider) at BGuidinger.Base.Plugin.Execute(IServiceProvider serviceProvider): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #20E22317</Message> <Timestamp>2020-07-15T11:05:03.5806393Z</Timestamp> <ExceptionRetriable>false</ExceptionRetriable> <ExceptionSource i:nil="true" /> <InnerFault i:nil="true" /> <OriginalException i:nil="true" /> <TraceText i:nil="true" /> </InnerFault> <OriginalException>Microsoft.Xrm.Sdk.InvalidPluginExecutionException at BGuidinger.Base.Plugin.Execute(IServiceProvider serviceProvider) at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.&lt;&gt;c__DisplayClass15_0.&lt;Execute&gt;b__0() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.Execute(IOrganizationServiceFactory organizationServiceFactory, Dictionary2 sandboxServices, String pluginTypeName, String pluginConfiguration, String pluginSecureConfig, IPluginExecutionContext requestContext, Boolean enablePluginStackTrace, Boolean chaosFailAppDomain, String crashOnPluginExceptionMessage)
at Microsoft.Crm.Sandbox.SandboxWorker.<>c__DisplayClass3_0.<Execute>b__0()

2020-07-15 11:05:02.033 - Starting execution.
2020-07-15 11:05:02.033 - Authenticating....
2020-07-15 11:05:02.158 - Authenticated.
2020-07-15 11:05:02.174 - POST https://esuoms.crm4.dynamics.com/CRMReports/RSViewer/ReportViewer.aspx
2020-07-15 11:05:02.174 - id=%7Bdf7d126f-f4fb-e911-a813-000d3ab8d5b5%7D&iscustomreport=true&reportnameonsrs=&p:Branch=%7B28e6e6c9-6a43-e911-a83a-000d3ab86580%7D
2020-07-15 11:05:03.518 - GET https://esuoms.crm4.dynamics.com/Reserved.ReportViewerWebControl.axd?OpType=Export&amp;Format=PDF&amp;ContentDisposition=AlwaysAttachment&amp;FileName=&amp;Culture=1033&amp;CultureOverrides=False&amp;UICulture=1033&amp;UICultureOverrides=False&amp;ReportSession=repl51vgqoms4g3fjynorp45&amp;ControlID=4f471065789148038c6ca740209cd17d
2020-07-15 11:05:03.580 - Parm0: Error Details: The report execution repl51vgqoms4g3fjynorp45 has expired or cannot be found.
2020-07-15 11:05:03.580 - Error executing web request: https://esuoms.crm4.dynamics.com/Reserved.ReportViewerWebControl.axd?OpType=Export&amp;Format=PDF&amp;ContentDisposition=AlwaysAttachment&amp;FileName=&amp;Culture=1033&amp;CultureOverrides=False&amp;UICulture=1033&amp;UICultureOverrides=False&amp;ReportSession=repl51vgqoms4g3fjynorp45&amp;ControlID=4f471065789148038c6ca740209cd17d
2020-07-15 11:05:03.580 - Stopping execution.

Any help much appreciated.

Cheers

Chris.

Parameters for Flow

I have this working but it does not allow me to use the Parameters in Report Renderer (Dynamic Content)

For the Initialize Variable what do i need to put in there from my custom report?

The columns such as Activity Type, Date Created ? etc?

The file attaches as HTML not as PDF.

Please advise,

Related to #11 - Parameter passing

Thanks for the info regarding passing an actual FetchXML query to the report however my query was something much simpler.

For example if the report required me to pass the "Owner" for a required report how would I do so?
I've tried passing the Guid of the User however I end up getting errors with bad requests.

Thanks

Custom Action Execution Exception - Authentication Problem

Hi Bob,

I'm getting a exception for the bg_Render custom action. It seems simply to be an authentication issue. The SecureConfiguration setting with my user name and credentials is in place and looks fine. Here is the message block from the step and the exception details. I'm not using Client ID / Client Secret, I am using my normal Dynamics 365 user id / password. I'm also not trying to call it from a Flow, just trying to call the custom action directly.

Any help would be appreciated.

Austin

Unhandled exception:
Exception type: System.ServiceModel.FaultException1[Microsoft.Xrm.Sdk.OrganizationServiceFault] Message: Something went wrong: The remote server returned an error: (400) Bad Request.Detail: <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts"> <ActivityId>a6c01c93-a221-4f7c-886c-5a6c5caffd2c</ActivityId> <ErrorCode>-2147220891</ErrorCode> <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic"> <KeyValuePairOfstringanyType> <d2p1:key>OperationStatus</d2p1:key> <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int">0</d2p1:value> </KeyValuePairOfstringanyType> <KeyValuePairOfstringanyType> <d2p1:key>SubErrorCode</d2p1:key> <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int">-2146233088</d2p1:value> </KeyValuePairOfstringanyType> </ErrorDetails> <HelpLink i:nil="true" /> <Message>Something went wrong: The remote server returned an error: (400) Bad Request.</Message> <Timestamp>2020-11-10T16:05:41.1457299Z</Timestamp> <ExceptionRetriable>false</ExceptionRetriable> <ExceptionSource>PluginExecution</ExceptionSource> <InnerFault> <ActivityId>a6c01c93-a221-4f7c-886c-5a6c5caffd2c</ActivityId> <ErrorCode>-2147220970</ErrorCode> <ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" /> <HelpLink i:nil="true" /> <Message>System.Net.WebException: The remote server returned an error: (400) Bad Request. at System.Net.HttpWebRequest.GetResponse() at BGuidinger.Reports.Renderer.GetToken(String resource, String username, String password) at BGuidinger.Reports.Renderer.Authenticate(String resource, String username, String password) at BGuidinger.Reports.Render.OnExecute(IPluginProvider provider) at BGuidinger.Base.Plugin.Execute(IServiceProvider serviceProvider): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #367F8E5A</Message> <Timestamp>2020-11-10T16:05:41.1457299Z</Timestamp> <ExceptionRetriable>false</ExceptionRetriable> <ExceptionSource i:nil="true" /> <InnerFault i:nil="true" /> <OriginalException i:nil="true" /> <TraceText i:nil="true" /> </InnerFault> <OriginalException>Microsoft.Xrm.Sdk.InvalidPluginExecutionException at BGuidinger.Base.Plugin.Execute(IServiceProvider serviceProvider) at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.&lt;&gt;c__DisplayClass17_0.&lt;Execute&gt;b__0() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.Execute(IOrganizationServiceFactory organizationServiceFactory, Dictionary2 sandboxServices, String pluginTypeName, String pluginConfiguration, String pluginSecureConfig, IPluginExecutionContext requestContext, Boolean enablePluginStackTrace, Boolean chaosFailAppDomain, String crashOnPluginExceptionMessage)
at Microsoft.Crm.Sandbox.SandboxWorker.<>c__DisplayClass3_0.<Execute>b__0()

2020-11-10 16:05:39.380 - Starting execution.
2020-11-10 16:05:39.864 - Authenticating....
2020-11-10 16:05:41.145 - The remote server returned an error: (400) Bad Request.
2020-11-10 16:05:41.145 - Stopping execution.

400 error "Something went wrong"

I'm receiving the following 400 error when testing the plugin directly from the custom connector in Flow using /POST/RenderReport. Running /GET/Reports does return the correct data however.

I've already tried completely reversing all installation steps then starting again but get the same result. I've also tried with both v1.3 and v1.4 with the same issue.

Do you have any ideas around what could be causing this?

`{
  "error": {
    "code": "0x80040265",
    "message": "Something went wrong.",
    "innererror": {
      "message": "Something went wrong.",
      "type": "System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]",
      "stacktrace": "   at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext, Dictionary`2 optionalParameters)\r\n   at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.Execute(OrganizationRequest request, ExecutionContext executionContext)\r\n   at Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.ExecuteOperation(CrmODataExecutionContext context, EdmOperation edmOperation, Dictionary`2 parameters, Dictionary`2 boundParameters)\r\n   at Microsoft.Crm.Extensibility.OData.ActionController.ProcessOperationRequest(String operationName, Dictionary`2 operationParameters, EntityReference entityReference, String boundEntityName, String boundEntityType)\r\n   at Microsoft.Crm.Extensibility.OData.ActionController.<>c__DisplayClass11_0.<PostBoundAction>b__0()\r\n   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)\r\n   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
    }
  }
}`

Not working if Multi Factor Authentication (MFA) is enabled

In my case Multi Factor Authentication (MFA) is enabled, and unable to bypass that. Please suggest a way to achieve this.

Below is the error that I get.
{"error":"invalid_grant","error_description":"AADSTS50126: Invalid username or password.\r\nTrace ID: c10c7df5-a926-4e9a-bece-4d6306c2df00\r\nCorrelation ID: aefd02de-612d-4139-8012-719674e19392\r\nTimestamp: 2019-08-20 11:35:04Z","error_codes":[50126],"timestamp":"2019-08-20 11:35:04Z","trace_id":"c10c7df5-a926-4e9a-bece-4d6306c2df00","correlation_id":"aefd02de-612d-4139-8012-719674e19392","error_uri":"https://login.microsoftonline.com/error?code=50126"}

Adding a rendered report to Timeline

Does anyone know a way to take a rendered pdf report and add it to the timeline in dynamics? When I go to create a record it does not allow me to select output like it does in send an email

"message": "Bad Request - Error in query syntax.",

Hi,

I get the following error when trying to render a report. I've tried an OOB report, a simple, parameter-less SSRS report and get the same response.

I've checked the secure config in the plugin registration tool as noted in another issue and can see my credentials are saved.

Any ideas greatly appreciated.

Request:
https://europe-001.azure-apim.net/apim/***/reports(SimpleReport)/Microsoft.Dynamics.CRM.bg_Render

Response:
{
"error": {
"code": "0x8006088a",
"message": "Bad Request - Error in query syntax.",
"innererror": {
"message": "Bad Request - Error in query syntax.",
"type": "Microsoft.OData.ODataException",
"stacktrace": " at Microsoft.OData.UriParser.SegmentKeyHandler.TryCreateKeySegmentFromParentheses(ODataPathSegment previous, KeySegment previousKeySegment, String parenthesisExpression, ODataUriResolver resolver, ODataPathSegment& keySegment, Boolean enableUriTemplateParsing)\r\n at Microsoft.OData.UriParser.ODataPathParser.TryBindKeyFromParentheses(String parenthesesSection)\r\n at Microsoft.OData.UriParser.ODataPathParser.TryCreateSegmentForNavigationSource(String identifier, String parenthesisExpression)\r\n at Microsoft.OData.UriParser.ODataPathParser.CreateFirstSegment(String segmentText)\r\n at Microsoft.OData.UriParser.ODataPathParser.ParsePath(ICollection1 segments)\r\n at Microsoft.OData.UriParser.ODataPathFactory.BindPath(ICollection1 segments, ODataUriParserConfiguration configuration)\r\n at Microsoft.OData.UriParser.ODataUriParser.Initialize()\r\n at System.Web.OData.Routing.DefaultODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer, Boolean template)\r\n at System.Web.OData.Routing.DefaultODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer)\r\n at Microsoft.Crm.Extensibility.ODataV4.Routing.CrmODataPathHandler.Parse(String serviceRoot, String odataPath, IServiceProvider requestContainer)"
}
}
}

Thanks,
Tristan

Reply URL

This solution is awesome. Great work!

Just a FYI for the Canadian Data Centers I needed to use "https://canada-001.consent.azure-apim.net/redirect" as the reply URL to work correctly. This might affect other geos as well. Thought I would mention it.

My only complaint is that I would have liked to have this solution 6 months earlier... :)

Cheers
Nick

Something went wrong: The remote server returned an error: (400) Bad Request.

Hi,
as mentioned in older issues, I am getting the above error when trying to trigger the Plug-In from Web API.

Here are the parameters I am using regarding the functions from the "usage" docmentation:

var reportId = '45ABF7FF-1371-E711-80E5-3863BB340A80'
var format = 'PDF';
var strParameterXML = {"CRM_FilteredSystemUser": "<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"><entity name="systemuser">"};`

(reportId is the id of the user summary report)
I tried different custom and default reports with the same result.

Here is the full Exception I get:
{"error":{"code":"0x80040265","message":"Something went wrong: The remote server returned an error: (400) Bad Request.","innererror":{"message":"Something went wrong: The remote server returned an error: (400) Bad Request.","type":"System.ServiceModel.FaultException1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]","stacktrace":" at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, InvocationContext invocationContext, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext, Dictionary2 optionalParameters)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.Execute(OrganizationRequest request, ExecutionContext executionContext)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.ExecuteOperation(CrmODataExecutionContext context, EdmOperation edmOperation, Dictionary2 parameters, Dictionary2 boundParameters)\r\n at Microsoft.Crm.Extensibility.OData.ActionController.ProcessOperationRequest(String operationName, Dictionary2 operationParameters, EntityReference entityReference, String boundEntityName, String boundEntityType)\r\n at Microsoft.Crm.Extensibility.OData.ActionController.<>c__DisplayClass11_0.<PostBoundAction>b__0()\r\n at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func1 func, IEnumerable1 additionalCustomProperties)\r\n at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func1 func)\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.b__9(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()"}}}

Referencing #11 parameters

In #11 - You mentioned SSRS reports were different in passing parameters. I am attempting to run a custom SSRS report each month on specified accounts, say fmic_status equals active. How do i run the report on CRM_FilteredAccount on an SSRS report?

Action 'Render Report' failed

Hi
I've seen this has already been logged but just wanted to add my two pennorth.
I have a custom report that has no parameters. I've done a simple flow that has a trigger and then Render Report, with report name, output to PDF, and invoiceid.
Running the Flow returns BadRequest; Status code 400; Headers below
Cache-Control
no-cache
Set-Cookie
ReqClientId=573b446b-8379-4424-a44f-f609973a763a; expires=Thu, 17-Jan-2069 14:18:01 GMT; path=/; secure; HttpOnly,orgId=77331774-6be2-4486-87c3-2b51aa13a864; expires=Thu, 17-Jan-2069 14:18:01 GMT; path=/; secure; HttpOnly,ApplicationGatewayAffinity=37f8ee44e952a9cb07f16ab89cb87ac47a89fc732e9fa81a69e9a1dc94ea43c1;Path=/;Domain=cbidev.crm4.dynamics.com

x-ms-service-request-id
24517817-d4ce-4bf5-8c77-85f7278832c5
REQ_ID
24517817-d4ce-4bf5-8c77-85f7278832c5,24517817-d4ce-4bf5-8c77-85f7278832c5
x-ms-ratelimit-burst-remaining-xrm-requests
59986
x-ms-ratelimit-time-remaining-xrm-requests
11,992.25
OData-Version
4.0
Date
Thu, 17 Jan 2019 14:18:04 GMT
Content-Length
3058
Content-Type
application/json; odata.metadata=minimal
Expires
-1

Error message "something went wrong" (can send whole content if required).

I've checked the registration in crm with plugin registration tool and it's all fine.

Please help! If I can get the report to render I then have to attach it to an email to send but that's another story...

Many thanks
Jules

Operation /GET/Reports was not found in swagger

I get this error when choosing the "Render Report" option in Flow selecting the custom connector. The testing actually works inside the custom connection but when I make the flow i get this error.

Plugin Execution Exception - Authentication

Hi Bob,

I'm getting a plugin exception for bg_Render. It seems simply to be an authentication issue. The SecureConfiguration setting is in place and looks fine. Here is the message block from the step and the exception details. Many thanks for any help.

David

2020-07-15 16:00:00.590 - Starting execution.
2020-07-15 16:00:00.606 - Authenticating....
2020-07-15 16:00:01.027 - The remote server returned an error: (400) Bad Request.
2020-07-15 16:00:01.027 - Stopping execution.

Unhandled exception:
Exception type: System.ServiceModel.FaultException1[Microsoft.Xrm.Sdk.OrganizationServiceFault] Message: Something went wrong: The remote server returned an error: (400) Bad Request.Detail: <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts"> <ActivityId>f3d6501d-1b0a-453d-a80a-1154b81c71a0</ActivityId> <ErrorCode>-2147220891</ErrorCode> <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic"> <KeyValuePairOfstringanyType> <d2p1:key>OperationStatus</d2p1:key> <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int">0</d2p1:value> </KeyValuePairOfstringanyType> <KeyValuePairOfstringanyType> <d2p1:key>SubErrorCode</d2p1:key> <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int">-2146233088</d2p1:value> </KeyValuePairOfstringanyType> </ErrorDetails> <HelpLink i:nil="true" /> <Message>Something went wrong: The remote server returned an error: (400) Bad Request.</Message> <Timestamp>2020-07-15T16:00:01.0279426Z</Timestamp> <ExceptionRetriable>false</ExceptionRetriable> <ExceptionSource>PluginExecution</ExceptionSource> <InnerFault> <ActivityId>f3d6501d-1b0a-453d-a80a-1154b81c71a0</ActivityId> <ErrorCode>-2147220970</ErrorCode> <ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" /> <HelpLink i:nil="true" /> <Message>System.Net.WebException: The remote server returned an error: (400) Bad Request. at System.Net.HttpWebRequest.GetResponse() at BGuidinger.Reports.Renderer.GetToken(String resource, String username, String password) at BGuidinger.Reports.Renderer.Authenticate(String resource, String username, String password) at BGuidinger.Reports.Render.OnExecute(IPluginProvider provider) at BGuidinger.Base.Plugin.Execute(IServiceProvider serviceProvider): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #4124366D</Message> <Timestamp>2020-07-15T16:00:01.0279426Z</Timestamp> <ExceptionRetriable>false</ExceptionRetriable> <ExceptionSource i:nil="true" /> <InnerFault i:nil="true" /> <OriginalException i:nil="true" /> <TraceText i:nil="true" /> </InnerFault> <OriginalException>Microsoft.Xrm.Sdk.InvalidPluginExecutionException at BGuidinger.Base.Plugin.Execute(IServiceProvider serviceProvider) at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.&lt;&gt;c__DisplayClass15_0.&lt;Execute&gt;b__0() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at Microsoft.Crm.Sandbox.SandboxAppDomainHelper.Execute(IOrganizationServiceFactory organizationServiceFactory, Dictionary2 sandboxServices, String pluginTypeName, String pluginConfiguration, String pluginSecureConfig, IPluginExecutionContext requestContext, Boolean enablePluginStackTrace, Boolean chaosFailAppDomain, String crashOnPluginExceptionMessage)
at Microsoft.Crm.Sandbox.SandboxWorker.<>c__DisplayClass3_0.<Execute>b__0()

2020-07-15 16:00:00.590 - Starting execution.
2020-07-15 16:00:00.606 - Authenticating....
2020-07-15 16:00:01.027 - The remote server returned an error: (400) Bad Request.
2020-07-15 16:00:01.027 - Stopping execution.

Report NOT render correctly with new filter condition

First of all, thank you for sharing your solution!!

We have installed v1.3.0.0 and it has rendered 2 custom reports for us in the past without any issue. However, recently we had to change the report filtering to show by certain users. After we "Edit Default Filter" on CRM side and manually create report in PDF, the new filtering condition applied correctly. However, when the scheduled Report Renderer Flow runs, even though it is ran successfully, the PDF report we received have the previous filtering condition. I have now updated the solution to v1.5.0.0, but this issue still remains. Please advise!!

(400) Bad Request - While calling RenderReport in Flow

Hi Bob,
I followed all the steps in the installation guide and I'm trying to schedule a simple SSRS report with no parameters in Microsoft flow and it is giving me 400 bad request error.

{
  "error": {
    "code": "0x80040265",
    "message": "Something went wrong: The remote server returned an error: (400) Bad Request.",
    "innererror": {
      "message": "Something went wrong: The remote server returned an error: (400) Bad Request.",
      "type": "System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]",
      "stacktrace": "   at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, InvocationContext invocationContext, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext, Dictionary`2 optionalParameters)\r\n   at Microsoft.Crm.Extensibility.OData.CrmODataExecutionContext.Execute(OrganizationRequest request, ExecutionContext executionContext)\r\n   at Microsoft.Crm.Extensibility.OData.CrmODataServiceDataProvider.ExecuteOperation(CrmODataExecutionContext context, EdmOperation edmOperation, Dictionary`2 parameters, Dictionary`2 boundParameters)\r\n   at Microsoft.Crm.Extensibility.OData.ActionController.ProcessOperationRequest(String operationName, Dictionary`2 operationParameters, EntityReference entityReference, String boundEntityName, String boundEntityType)\r\n   at Microsoft.Crm.Extensibility.OData.ActionController.<>c__DisplayClass11_0.<PostBoundAction>b__0()\r\n   at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.Execute[TResult](ILogger logger, EventId eventId, ActivityType activityType, Func`1 func, IEnumerable`1 additionalCustomProperties)\r\n   at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.Execute[TResult](ILogger logger, XrmTelemetryActivityType activityType, Func`1 func)\r\n   at lambda_method(Closure , Object , Object[] )\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)\r\n   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
    }
  }
}

However it is retrieving all the reports in the system while testing the custom connector's "_GET_Reports" function. I tried rendering the report in all the formats, nothing worked.

image

Error

Hi,
I installed the solution ReportRenderer_1_4_0_0_managed.zip , configured it but I have this exception

2018-06-25 21:14:21.435 - Starting execution.
2018-06-25 21:14:25.505 - The remote server returned an error: (400) Bad Request.
2018-06-25 21:14:25.505 - Stopping execution.

Any suggestion?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.