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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

phone calls, accounts and workflows oh my!

(0) ShareShare
ReportReport
Posted on by

I am having a really hard time figuring out what to do.

When I created the campaign activity (phone call) I had to assign it to a specified user (owner user), but now it is overriding the actual owner that I would like to show up as a cc: in an email in a workflow. To further complicate things, I did not do this from "Contacts", but from "Accounts" as a marketing list>campaign activity and the Account field in my phone call form is locked. So, I cannot point to "Accounts" and then "Owner" in my workflow because the phone call field Account is actually in "Call To." 

I've tried Regarding(Accounts) Owner, Owner User etc. I can;t find my way around this. 

Any help would would appreciated. 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at
    RE: phone calls, accounts and workflows oh my!

    THis was great - albeit a bit above my limited ability. For now, we are just forgoing it and hope to do it differently the next campaign. I really appreciate all of your timely responses and tips!

  • Verified answer
    Community Member Profile Picture
    on at
    RE: phone calls, accounts and workflows oh my!

    That's not a problem, happy to try and help.

    If you create a custom workflow assembly you can use the Target.

    Entity target = (Entity)workflowContext.InputParameters["Target"];

    EntityReference entityRef = new EntityReference();

    entityRef.Id = target.Id;
    entityRef.LogicalName = target.LogicalName;

    From here you can query the entity

    //Create a request
    RetrieveRequest retrieveRequest = new RetrieveRequest();
    retrieveRequest.ColumnSet = new ColumnSet(new string[] { "fieldshere" });
    retrieveRequest.Target = entityRef;

    //Execute the request
    RetrieveResponse retrieveResponse = (RetrieveResponse)service.Execute(retrieveRequest);

    //Retrieve the result Entity
    entity = retrieveResponse.Entity as Entity;


    The 'fieldshere' should be the call_to field.

    Don't have time to write the code for you, but you should be able to take the values of the call to field and work with them, you can then search for Accounts that match with the result set and then from there do another retrieve request to pull back the owner and from there get the owner email address. You then will need to set the output parameter. 

    [Output("Description")]
    public OutArgument<string> CCFieldString { get; set; }

    this.CCFieldString .Set(executionContext, errorString);

    One registered you need to call your cwa and then your email create comes after and then you can add the string into the cc line.

    Hope this helps, might be one of those fiddly ones around the format the call to is given as. You just need to make sure you handle all of the other circumstances that a phone call can be created to ensure there are no errors.

    Cheers

    Andy

  • Community Member Profile Picture
    on at
    RE: phone calls, accounts and workflows oh my!

    Hi Andy,

    Wow, you have been great and super responsive.

    Yes to the above explanation. That is correct.

    The reason why I need to separate the two is because the "Account owner" is a sales manager and the phone call owner is an internal customer service rep, so the phone call has to be assigned to the inside and the cc has to go to the sales manager when the phone call is completed so they know that the member in their territory was contacted and they don't need to repeat the phone call.

    The answer in that post for stackoverflow says,

    "The problem is that Call To is not guaranteed to be a Contact (in my case it's an account name or company name) so the CRM Workflow designer doesn't allow you access to the fields. Personally, I wish it worked differently and treated that field as the same as the Regarding field but that is not how it was implemented."

    It looks like I need to create a custom code activity and refer the "account" to the "call to" but the owner for the cc has to be the "Account" owner, not the phone call owner, so I'm not sure there is a way to set that up. That's why I was thinking maybe if I went outside the campaign activity and tried to pull the data from the marketing list that was A PART of the campaign, but even those fields don't jive.

    Insights, suggestions, jabberwocky? I'm open to anything at this point. Our sales managers are not getting cc'd and it's creating an uproar of WWI proportions.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: phone calls, accounts and workflows oh my!

    Can I ask what it is you are actually trying to achieve, in case there is another way to meet the requirement.

    You have a Campaign Activity associated to a list of Account, the activity of type Phone Call is distributed and you have chosen to send to an individual (as supposed to the owner of the related record, which would be the Account Owner). Then when the phone call is created, you want to send an email to somewhere cc to the owner of the account from the owner of the phone call record.

    Is there a reason that the account owner isn't also the phone call owner.

    I have done a little research and came across the following.

    http://stackoverflow.com/questions/23057854/linking-phone-call-to-account

    Is this what you also are trying to achieve, in which case a fairly simple custom workflow activity should do it.

  • Community Member Profile Picture
    on at
    RE: phone calls, accounts and workflows oh my!

    account_5F002900_3.jpgaccount_5F002900_3.jpg

    No. It's not working. The issue I think here is that the process entity is a phone call for a workflow and when I assigned the campaign activity phone calls, I selected specific users, so now the phone call entity only sees them as the owning user and no other.

    I can't figure my way around this and it's losing me hours and hours.

    I saw in one instance maybe I could pull the marketing list as an entity in a process and say if the marketing list, was in a campaign activity and the phone call was completed then tell me the original owner of the account on the marketing list, but I am not finding enough fields as options for accounts and conditions to make this happen. 

    I think in simplest terms, I need the phone call activity workflow initiate an email to several people and in that email it should list the original owner AND the phone call owner. RIght now the email is sent and it the "To" file instead of the owning user has the owner of the phone call. The "account-owner" produces the same result. 

  • Community Member Profile Picture
    on at
    RE: phone calls, accounts and workflows oh my!

    No problem let me know how you get on.

  • Community Member Profile Picture
    on at
    RE: phone calls, accounts and workflows oh my!

    account_5F002900_1.jpg

  • Community Member Profile Picture
    on at
    RE: phone calls, accounts and workflows oh my!

    Thanks Andrew - the Account ID field in the Call phone - had a key on it and now it doesn't - see attached form field info. I am going to see if this works in our workflow now. Thanks for the help.

  • Community Member Profile Picture
    on at
    RE: phone calls, accounts and workflows oh my!

    In terms of the workflow, you can customise the form temporarily to make the lookup field to account edittable (not read only) - If you click on the field you should be able to see Read Only tick box (de-select) then publish.

    Then if you go in your workflow you will now be able to set the field, once done you need to go back into the form change back to read only , save and publish.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#2
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans