Tuesday, May 21, 2024
- Advertisement -
More

    Latest Posts

    Resolving Error While Creating Target Entity Issue on Realtime Marketing Form Submissions

    I’m hoping this helps people who have scratched their head for ages wondering why their Leads or Contacts are not being created when someone submits a Realtime Marketing Form. This has actually occurred for two different clients in a given week, so time for a post about. All you see is that the form submission for someone has failed, and the failure description shows ‘Error while creating target entity’. In this blog, I will show how you can figure out what is causing it, but then the most likely culprit at the end.

    First, this is what I am referring to. Your form submission has a Failure result, with the description showing that the target entity (Lead or Contact) could not be created. Before you go any further, make sure that the Form is owned by someone with the right permissions, and check this out if you are not sure.

    Resolving Error While Creating Target Entity Issue on Realtime Marketing Form Submissions
    Click to view in detail

    Usually the first indication something is wrong is seeing the Number of failed submissions in red at the top of one of your forms in the marketing app.

    Click to view in detail

    In reviewing the submissions tab, you will then see this wonderful description. How do you figure out why this happened?

    Click to view in detail

    First thing, you will need to go to the System Settings panel which is in the Advanced Settings area (or legacy settings if you access it via the Power Platform Admin Center. Then go to Settings > Administration > System Settings. Then click on the Customization tab. Check to make sure the logging to plug-in trace log is enabled. Then close out of this window.

    Click to view in detail

    If you needed to turn it on, you might need to refresh a few times, but you should then be able to access the Plug-In Trace Log section.

    Click to view in detail

    You might want to create yourself a custom view first of all, but make sure you have this window open so you can quickly find the right log file. The Message Name on the log you are looking for is msdynmkt_createentityfromsubmission.

    Click to view in detail

    Now you need to cause a new log file to be created so you can review the issue. Go back to your marketing form and select one of the form submissions, then click the Resubmit button at the top.

    Click to view in detail

    Now go back to the Plugin Trace Logs and you should see a new one generated. Go ahead and open that then scroll down to the bottom of the Message Block. It’s likely that the last couple of lines will give you what you are looking for. The key bit for my issue is ‘Attribute ‘address1_city’ cannot be NULL’.

    Click to view in detail

    Now I don’t have the City field required on my Lead table… so what’s up? The next logical thing to consider should always be Business Rules, which most times (and by default) are set to run on the entity rather then only on specific forms. When this happens, the steps to create the Lead or Contact are to get all of the fields submitted then try and create the record, but then if a business rule kicks in, that’s going to stop the process. On my form example, I had Zip/Postal Code on it, so when it’s filled out, that means the business rule below will be fired and PREVENT the Lead from being created.

    Click to view in detail

    Turn your business rule off, then try resubmitting the failed form submission. Chances are, it will run successfully. Now you can go and reassess that business rule and figure out if it really is needed, or if some adjustments can be made so it can live in harmony with your Realtime Marketing Forms!!!

    Latest Posts

    - Advertisement -

    Don't Miss

    Stay in touch

    To be updated with all the latest news, offers and special announcements.