Skip to main content

Notifications

Announcements

No record found.

Supply chain | Supply Chain Management, Commerce
Unanswered

Retail Server Extension APIs not All APIs generating in Typescript Proxy

Posted on by Microsoft Employee

I am generating typescript proxy for commerce extensibility and some of the methods are generated in the proxy but not all of them. When I generate Retail Proxy for C# all methods are present. Even in the Typescript RetailProxy for POS all methods are present but not in the Commerce Proxy created using /application:typescriptmoduleextensions

Proxies are correctly generated through /application:typescriptextensions

I am using Microsoft.Dynamics.Commerce.Tools.CoreProxyGenerator.10.13.20107.3

I even tried CrossLoyalitySample Extension and generated Commerce module proxy for that, even for that the Method is not generated.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Retail Server Extension APIs not All APIs generating in Typescript Proxy

    Hi Oriol,

    I am using the command described in the following link:

    docs.microsoft.com/.../call-retail-extension-api

    And this is the command I am using

    <RetailSDKPath>\References\Microsoft.Dynamics.Commerce.Tools.CoreProxyGenerator.10.13.20107.3\tools\CommerceProxyGenerator.exe <RetailSDKPath>\References\Microsoft.Dynamics.Commerce.Tools.ExtensionsProxyGenerator.9.21.20122.12\build\Microsoft.Dynamics.Retail.RetailServerLibrary.dll <RetailSDKPath>\References\EdgeAXCommerceLink.RetailServer.Extensions.dll /application:typescriptmoduleextensions

    And this is the method that is not generated

    [HttpPost]

               [CommerceAuthorization(CommerceRoles.Customer, CommerceRoles.Employee)]

               [System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "DR1721:AssertSdkExtensionMethodsNotCalledInProductCode", Justification = "Suppressed since its a known issue.  Bug 3907330 has been logged for this issue.")]

               public decimal GetCrossLoyaltyCardDiscountAction(ODataActionParameters parameters)

               {

                   if (parameters == null)

                   {

                       throw new ArgumentNullException("parameters");

                   }

                   string loyaltyCardNumber = (string)parameters["LoyaltyCardNumber"];

                   GetCrossLoyaltyCardResponse resp = this.CommerceRuntime.Execute<GetCrossLoyaltyCardResponse>(new GetCrossLoyaltyCardRequest(loyaltyCardNumber), null);

                   return resp.Discount;

               }

  • OriolMachin Profile Picture
    OriolMachin on at
    RE: Retail Server Extension APIs not All APIs generating in Typescript Proxy

    Hey Hannan Ayub,

    I will have to let the community answer this question, however if you could provide more details it may be helpful.

    What is the exact command they are running? Also, which method is missing?

    CommerceProxyGenerator.exe C:\\RetailSDK\\References\\Microsoft.Dynamics.Commerce.Tools.ExtensionsProxyGenerator.9.21.20042.5\\build\\Microsoft.Dynamics.Retail.RetailServerLibrary.dll C:\\RetailSDK\\References\\Microsoft.Dynamics.RetailServer.CrossLoyaltySample.dll /a:typescriptextensions

    Refer: https://docs.microsoft.com/en-us/dynamics365/commerce/dev-itpro/typescript-proxy-retail-pos#generate-the-typescript-proxy

    Best Regards,

    Oriol Machin
    Support Engineer / Microsoft Dynamics 365 Commerce
    North America Customer Services and Support

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans