A custom connector's Get orders operation returns dates in a legacy text format and deeply nested totals. Before makers see the response, it must be reshaped with logic that converts each date and calculates a summary total, which no policy template supports. Where and how should the developer implement this transformation?
Select an answer to reveal the explanation.
Short Explanation
When the policy templates run out, you write custom code on the connector, and it's C#. Your Script class's ExecuteAsync forwards the call with Context.SendAsync, reshapes what comes back, and returns it. Plug-ins and policies don't run inside a connector's response path.
Full Explanation
Custom code in a custom connector transforms request and response payloads beyond what policy templates can do. The code is C# in a class named Script that inherits ScriptBase and implements ExecuteAsync. For a response transformation, the code checks the operation ID, forwards the incoming request to the backend with Context.SendAsync, parses the returned content, converts the dates, calculates the total, and returns a new HttpResponseMessage with the reshaped JSON. Code can be applied to selected operations only, and when it runs it takes precedence over the codeless definition for those operations. Custom code is C# only, so a JavaScript function is not an option. Dataverse plug-ins run in the Dataverse event pipeline on Dataverse messages; they cannot intercept a connector's HTTP call to an external API. Policy templates take parameters and supported expressions, not C# code, and the Set property template sets a value rather than running computation such as parsing legacy dates. Exam caveat: only one script file is allowed per connector, a limited set of namespaces is supported, execution time and file size are capped, and custom code cannot be used with the on-premises data gateway. Operational check: enable the code for Get orders, run the operation from the Test tab, and confirm the dates and the summary total appear in the reshaped response.