I have created a new retail server extension.
/* ****
[ComVisible(false)]
public class EdmModelExtender : IEdmModelExtender
{
public void ExtendModel(CommerceModelBuilder builder)
{
ThrowIf.Null(builder, "builder");
action.Parameter<string>("ItemId");
action.Parameter<string>("WhseId");
}
******/
The controller is a NonBindableOperationController and has the following method:
/* ****
[CommerceAuthorization(CommerceRoles.Anonymous, CommerceRoles.Customer, CommerceRoles.Device, CommerceRoles.Employee)]
public Microsoft.Dynamics.Commerce.Runtime.PagedResult<FulfillmentReservedOrders> TMCGetReservedOrdersAction(ODataActionParameters parameters)
{
if (parameters == null)
{
throw new ArgumentNullException("parameters");
}
string whseId = (string)parameters["WhseId"];
queryResultSettings.Paging = new PagingInfo(10);
GetReservedOrdersResponse response = this.CommerceRuntime.Execute<GetReservedOrdersResponse>(request, request.RequestContext);
**** */
The DLL generates without errors.
The CRT code has a commerceEntitiy class called FulfillmentReservedOrders, and a service class that extends IRequestHandler as wella s th erequest and response classes.
This DLL also generates correctly.
I was also able to generate the TypeScript proxy without errors and it created the DataServiceRequests.g and DataServiceentites.g which I imported in POS.
I copied the DLLs to Retailserver\Webroot\bin\Ext and also updated the CommerceRuntime.Ext in this folder with the CRT code DLL.
I also updated the RetailServer\Webroot\Web.config to have the retailServer DLL included.
I then ran in the commandPrompt IISReset to restart the IIS. I also in the IIS Services Manager stopped and started the RetialServer site.
When I open now https://Your Commerce Scale Unit URL/Commerce/$metadata, it doesn't show my method or entity.
Any idea why not?
Any help is much appreciated