Skip to main content

Posts

Integrating HubSpot with Dynamics 365: Native Connector vs. Custom Azure Functions

If your marketing team lives in HubSpot and your sales team lives in Microsoft Dynamics 365, getting those two platforms to reliably share data is one of the most important integration decisions you'll make. There are two main paths to connect them: a native connector available directly in the HubSpot App Marketplace, or a custom-built integration using Azure Functions. Choosing the wrong one can mean months of frustration. This post walks through both options in detail so you can make the right call for your team. The Native HubSpot Connector The Microsoft Dynamics 365 integration is a first-party app built and maintained by HubSpot, available in the HubSpot App Marketplace and Microsoft AppSource. It's powered by HubSpot's Data Sync engine — part of Data Hub (formerly Operations Hub) — and supports bidirectional sync across 12 object types: Contacts ↔ Leads / Contacts Companies ↔ Accounts Deals ↔ Opportunities Products ↔ Bundles Meetings ↔ Appointments Task...
Recent posts

Lookup In Select of URL For Power Pages

 While working on a Power Pages implementation I was consume the Power Pages API to get a Lookup table so I could show and hide information on the form using jQuery.  One issue I was having is I couldn't get a lookup field to return even though I had it as a field in the site setting for the table and included it in the my select statement in the URL.  I kept getting an `unexpected error occurred`. This issue is caused because lookup's are made up using 3 fields. 1) Formatted Value = The information you see in the lookup field (i.e. the record name) 2) Logical Name = The table the related record is a part of 3) Id = The id of the related record In the api there is a 4th field that is returned that is the Associated Navigation Property and it is the logical name of the lookup field. When setting up our select and even saying what columns can be returned in the API, we have to think how the OData endpoint will return the data to us.  ...

Reusable Method To Get Record By Id

I have a handful of reusable code that I use when creating plugins or external process (i.e. Azure Functions) for working with DataVerse. The first one I am providing is Getting a Record By Id: 1: private static Entity GetFullRecord(string entityName, string primaryKey, Guid recordId, IOrganizationService service) 2: { 3: using (OrganizationServiceContext context = new OrganizationServiceContext(service)) 4: { 5: return (from e in context.CreateQuery(entityName) 6: where (Guid)e[primaryKey] == recordId 7: select e).Single(); 8: } 9: } entityName = The logical name of the entity primaryKey = The primary key field for the entity. If using late binding you can create this dynamically by doing: $"{target.LogicalName}id" recordId = Guid of the record to get service = Service to interact with DataVerse

Power Pages Update Last Successful Login Using JavaScript and Power Pages API

 Recently while working on a Power Pages implementation for a client, I had the requirement to show the last time a user logged in on their profile page.  I thought this would be easy to do as there is already a field on the contact record for "Last Successful Login" (      adx_identity_lastsuccessfullogin).  This use to update when a user logged in, but it appears Microsoft has removed that automation. While searching I came across a few different ways of achieving this task.  One used application insights in Azure and another one used an HTTP endpoint setup in Power Automate.  I thought, this needs to be simpler.  What I came up with is to use Liquid with JavaScript to tell if a user is logged in or not.  Then use the new Power Pages api to update the logged in users contact record to mark the last time they logged in. Here is the approach I setup: 1) Make sure you turn on the api for contact in Site Settings. 1) Link to Microsoft Do...

How to Render Raw HTML Column in View in Power Pages

 Recently I had a requirement for a client to convert their existing site over to Power Pages.  One of the items I needed to convert was a "Recent Announcements" page.  This is a pretty straightforward page with only a title of "Recent Announcements" and a grid showing the announcements.  The grid only has two columns, 'Created On' and 'Message'.  The problem I had to solve was I used the Rich Text Editor control on the 'Message' field.  This means that raw HTML was stored in the field.  Out of the box Power Pages can't render the raw HTML in the column.  This means in the Power Page would have raw HTML showing instead of a nicely formatted message.  This is easily solved with a small JavaScript function. The first thing I did was create a custom entity in DataVerse called Announcement.  Here is the layout of the fields: Changed the primary name field from 'Name' to 'Subject'. Added a multi-line text field called 'Mess...

Understanding Managed and Unmanaged Solutions in Dynamics 365

Dynamics 365, Microsoft's robust suite of business applications, boasts a myriad of features that can be customized to cater to the specific needs of any business. A vital concept to grasp when working with Dynamics 365 is the difference between managed and unmanaged solutions. This blog post aims to clarify these two types of solutions, providing a comprehensive analysis of the advantages and disadvantages of each. Unmanaged Solutions Unmanaged solutions act as a dynamic development environment, enabling direct alterations and additions to system components. They are often employed during the development and testing phase of a customization project but are equally effective when implemented in production instances, particularly for internal organizational operations. Pros of Unmanaged Solutions: Flexibility : Unmanaged solutions provide a high degree of adaptability, permitting developers to modify system components, introduce new elements, or discard those that are no longer nece...

Effective Logging in Microsoft Dynamics 365 Plugins: Best Practices and Examples

Microsoft Dynamics 365 is a powerful suite of business applications that provides organizations with tools for managing customer relationships, sales, and operations. One of the essential aspects of developing custom plugins for Dynamics 365 is proper logging to ensure smooth functionality and easy debugging. In this blog post, we'll discuss best practices for logging in Microsoft Dynamics 365 plugins and provide examples to help you implement effective logging in your custom solutions. Understanding the Plugin Trace Log Microsoft Dynamics 365 provides a built-in logging mechanism called the Plugin Trace Log. The Plugin Trace Log can be used to record custom messages, exceptions, and other information for debugging purposes. To enable the Plugin Trace Log, follow these steps: Navigate to Settings > Administration > System Settings. Under the Customization tab, locate the "Plugin and Custom Workflow Activity Tracing" section. Set the option to "All" or ...