Create your first Adaptive Card Extension

POSTED ON

Using the Microsoft SharePoint Yeoman generator (for a quick review of the tool you can check this blog post) you can create your first ACE project.

To create your first ACE with Yeoman you have to execute the command:

yo @microsoft/sharepoint

and provide various values to it:

What is your solution name? Your-Custom-Solution-Name

Which type of client-side component to create? Adaptive Card Extension

Which template do you want to use? Generic Card Template

NB: The latest Microsoft SharePoint Yeoman generator (version 1.18.0) is a bit different than the previous version, if you have an older version you will not see the “Generic Card Template” option, instead you will see a selection of ACE template.

What is your Adaptive Card Extension name? Your-Custom-ACE-Name

Once the tool has finished to scaffold the solution you will be welcomed by the result:

As the message reads: congratulations! You’re ready to start developing your newly created ACE!

As the message says you will simply have to execute gulp serve but, there’s always a but, before doing that you have to specify either the target URL in the serve.json file or the SPFX_SERVE_TENANT_DOMAIN OS variable.

In the serve.json file you will find as the initialPage property the value:

https://{tenantDomain}/_layouts/workbench.aspx

The placeholder {tenantDomain} gets replaced by the OS variable SPFX_SERVE_TENANT_DOMAIN, in case you don’t have it specified you can manually replace the placeholder with your target development site URL.

Once that you have replaced your initialPage URL or declared the SPFX_SERVE_TENANT_DOMAIN OS variable you are ready to go and execute

gulp serve 

The resulting default ACE will be something like, for the card view:

for the quick view

and the property pane will look like the following

You can now start customizing your Adaptive Card Extension!

If you want some hint on how to interact with it you can check here.

Hope that helps!


Discover more from I am GuidoZam

Subscribe to get the latest posts sent to your email.

4 responses to “Create your first Adaptive Card Extension”

  1. Introducing LineChartCardView: the new Adaptive Card Extension for SPFx – I am GuidoZam Avatar

    […] creating a data visualization card template solution (check here if you never created an ACE solution) you will find that the card view control will contains a […]

    Like

  2. Introducing the new PieChartCardView for Adaptive Card Extensions – I am GuidoZam Avatar

    […] your SPFx solution for an Adaptive Card Extension with the SPFx toolkit extension for VSCode (or using the Yeoman generator), you will have to update the @microsoft/sp-adaptive-card-extension-base import inside the card […]

    Like

  3. Introducing the new BarChartCardView for Adaptive Card Extensions – I am GuidoZam Avatar

    […] your SPFx solution for an Adaptive Card Extension with the SPFx toolkit extension for VSCode (or using the Yeoman generator), you will have to update the @microsoft/sp-adaptive-card-extension-base import inside the card […]

    Like

  4. Using geolocation in an Adaptive Card Extension – I am GuidoZam Avatar

    […] This post is not meant to instruct you how to create an ACE. If you’re interested on getting started you can check my previous article here. […]

    Like

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.