Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested answer

E-commerce Extension - Get the current product to use in a custom data action

(1) ShareShare
ReportReport
Posted on by 152

I'm working on an extension module for the e-commerce that will be inside the 'product details' page, so I need to know the current product ID to use in my custom data actions....

 

I couldn't find any example showing how to get the current product, I also tried to find an example in the 'core modules', but no success... I only could find examples using 'inputData.config.productIds', where you need to set up the product ID in the configuration of the module (or in the mock files when testing).

 

Can you guys help me with that? Probably it's something very simple/stupid, but I'm struggling a lot.

 

Thanks!

  • Community member Profile Picture
    2 on at
    E-commerce Extension - Get the current product to use in a custom data action
     
     
    The link below does not work for me.
     
    Thanks / Regards,
    Florian
  • MuraliElangovan Profile Picture
    on at
    RE: E-commerce Extension - Get the current product to use in a custom data action

    Glad to hear that. thanks!

  • Jritz Profile Picture
    287 on at
    RE: E-commerce Extension - Get the current product to use in a custom data action

    The samples you linked to are a godsend. Really helps to un-magic a lot of things. Thank you!!

  • Suggested answer
    MuraliElangovan Profile Picture
    on at
    RE: E-commerce Extension - Get the current product to use in a custom data action

    Hi Jritz,

    I dont know how one can get access to yammer anymore but while that can be figured out, i am sharing the getting started guide here for broader reach. I would also suggest taking a look at the samples that provides step by step on various common customization scenarios. 

    These samples are something we continue to build on so if you have any feedback or scenarios you would like to see, please do feel free to share. 

    Dynamics-365-Commerce-Online-Extensibility-Getting-Started-Guide.pdf

  • Jritz Profile Picture
    287 on at
    RE: E-commerce Extension - Get the current product to use in a custom data action

    I know this post is old, but ran across this post trying to better understand the Commerce SDK and data actions. Any idea how I can get access to the Yammer post or to the document that has explanatory chapters that you've quoted?

  • Suggested answer
    Diogo_STMonteiro Profile Picture
    on at
    RE: E-commerce Extension - Get the current product to use in a custom data action

    Hi Luiz,

    I saw that Sam Jarawan, answered your yammer post about the same topic.

    www.yammer.com/.../

    "In chapter 8, you will see a section on building a custom theme extension, where we have a sample of adding a "share" link to the PDP page.  In this sample you'll see how to get access to the selected product info via the props.data.product.result object specifically for the product Id you can use .ItemId property as shown in attached image."

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans