Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

CRM 2016 Web API Action UpdateSolutionComponent: How to Use IncludedComponentSettingsValues Parameter?

$
0
0

I'm attempting to call into the CRM 2016 Web API action "UpdateSolutionComponent".

The documentation is here: https://technet.microsoft.com/en-us/library/mt607611.aspx

As you can see from the documentation, there's no information about the "IncludedComponentSettingsValues" parameter. I searched high and low and tried a number of different things, to no avail.

In particular, I'm attempting to update an existing Javascript Web Resource.

The JSON body of the POST looks something like so:
{

'ComponentId': '{DF8CCAE7-F173-44B9-832D-E6A4D5DE0AB7}',
	ComponentType: 61,

	SolutionUniqueName: 'MySolution',
	IncludedComponentSettingsValues: [ '??What goes here??' ]

}

Whatever string value I use in that last bit, I get an error that looks like so:
{

"error": {
    "code": "",
    "message": "Component DF8CCAE7-F173-44B9-832D-E6A4D5DE0AB7 of Type 61 cannot have it's root component behavior changed because it currently requires all subcomponents",
    "innererror": {
      "message": "Component DF8CCAE7-F173-44B9-832D-E6A4D5DE0AB7 of Type 61 cannot have it's root component behavior changed because it currently requires all subcomponents",
      "type": "System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.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)\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)\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.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\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.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\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.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n   at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__1.MoveNext()"
    }
  }
}

Any thoughts on how to get this to work are greatly appreciated.

(I'm pretty sure a base64-encoded string of the javascript needs to go in there somewhere, but I haven't a clue as to the format.)

Thanks,

Daniel


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>