web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How to add Account Number to Activity Form when its regarding contact?

(0) ShareShare
ReportReport
Posted on by

So I'd like to be able to add the Account Number to all our Activity Forms (Appointments, Tasks, Phone Calls)

The problem is the activity records are regarding 'Contact' so I can't get the Account Number field since the Contact is regarding the Account.

Is there some way to do this?  Maybe have a workflow put the Account number in a custom field on the Activity entity? 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi,

    Is the account the parent account of the contact it's regarding? Since you're using 2016 you should be able to do this pretty easily with a business rule on the Task, Phone Call, etc, forms. Here are details on how to write them: technet.microsoft.com/.../dn531086.aspx

    Hope this helps! I'd appreciate if you'd mark this as Answering your question.

    Thanks,

     Aiden

  • CRM Learner 88 Profile Picture
    on at

    Yes its the parent account of the contact.  I understood business rules to work on the same form... For example it would show values of a field based on what values of another field are selected.  How could it do this if this isn't on the primary entity?

  • CRM Learner 88 Profile Picture
    on at

    I just tried looking at business rules and it looks like it's If Then statements... How would I get the value into a field from another entity using this?

  • Inogic Profile Picture
    764 on at
    You can able to achieve this by writing a Script on change of regarding field of Activity Entity.
     
    So, on change of the Regarding field you can able to retrieve the Primary Account and the Account Numberrelated to the selected Contact.
     
    Thanks,
    Sam
     
  • CRM Learner 88 Profile Picture
    on at

    I don't know how to write script or code.  Does this mean that using business rules through the interface will not accomplish this?

  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at

    I thought business rules would work if you set an action and no condition (so it always runs). Turns out the limitation is setting the value - in business rules you can't pull in values from related records.

    If you don't want to write any code, the other option is a workflow. This will have a similar limitation though - you could get the value from the contact but not another hop away on the account. If you kept a copy of the account number on each contact under the account, you'd be able to pull it in to a contacts activities.

    Hope this helps! I'd appreciate if you'd mark this as Answering your question.

    Thanks,

    Aiden

  • CRM Learner 88 Profile Picture
    on at

    Thanks Aiden, so does this mean that it is possible via workflow?  I am not well versed in them yet, is it simple logic you can share that I can use to create one that does this?

  • Verified answer
    Robert Wittig Profile Picture
    1,885 on at

    If you are not looking to actually store the data, have you considered a quick view form on the regarding that includes information about the account including the account number?

  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi,

    You can do it with two workflows.

    One workflow will ensure the account number gets copied to the account. This should run on the contact record on Create of the account, and update (when the parent account field changes). You'll want to check to see if the parent account contains data. If so, set the Contact's account number field to the parent account's account number. If it's empty, clear out the account number. You can set this workflow to On Demand as well since you'll want to set it for your existing contacts - have a view of accounts with a parent account with an account number, but the contact doesn't have an account number. Run the workflow in bulk on the records until the list is empty.

    The second workflow will take the field from the contact and set it on the activity. You'll need to create the Account Number field on each type of activity you want to track it on (Fax, Phone, etc). You'll need to set up one workflow per entity type (fax,  phone) that runs on create of the activity. The workflow should be synchronous because the activity could be created and then immediately deactivated (like if somebody was sending an email). The workflow should look to see if the activity is for a contact and if the contact has an account number, and if so, set it on the activity.

    Hope this helps! I'd appreciate if you'd mark this as Answering your question.

    Thanks,

     Aiden

  • CRM Learner 88 Profile Picture
    on at

    I'm not sure I understand?  I'd like the account number to show up on the Activity Form (e.g. Phone Call) - How would that work?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans