Home » Microsoft Technologies

Update Phone Call activity when Regarding Lead field changes


My scenario is there is a company attribute(varchar) in phonecall.when ever phonecall activity is created for lead, company attribute(varchar) should capture the lead company name

the workflow i wrote is

if regarding(lead) | Company name | Contains Data


Update Phonecall activity (company attribute(varchar) as {Company Name(Regarding(Lead))}

This works fine me

my clarification if i update  company Name for the lead

the Attribute for the phone call activity should get updated automatically

what kind of workflow should i write

give me some example




2 Answers Found


Answer 1

Normally, you could write  a workflow  on the Lead to watch for a change to the company  name field  and when there is a change, call  a child workflow that updates a phone  Call workflow or see if there is an option in the Workflow to update  the Regarding Phone Call activity and update the Company Name field of the activity.  However, since there may be more than one Phone Call activity  and since the Phone Call activity status might be closed, you'll most likely need to write a plug-in or custom workflow to handle the conditions of checking multiple phone call activities and dealing with the Phone Call status.

If there is only one Phone Call, you could test writing the workflow to update the Phone Call activity when the Lead "company name" field changes.


Answer 2

Your workflow  is fine  for setting the name in the first instance, but you may need to use on-form javascript on the phone  Call to recapture it in case it has changed


You could use a variation of your workflow to update  the field  when the phone call  is updated  (or completed) to make sure it is correct

If you just want the user to see the current name of the Lead make sure the regarding field is visible to them (in a view or on the form).

Why do you want to capture  this into a text field in anay case? It may be that you  are trying to solve the wrong part of the problem.




I have added a date time field in the Activity "Phone Call" and want it to insert the date time field when the selection for direction changes from Outgoing to Incoming, so the datetime field will show when someone selects "Incoming"

I can't seen to get it to work correctly....following is the code I have done....

// Date Time Receivedif (crmForm.all.directioncode.DataValue)
  crmForm.all.hsi_datetimereceived_c.style.display = 'inline';
  crmForm.all.hsi_datetimereceived_d.style.display = 'inline';
  crmForm.SetFieldReqLevel("hsi_datetimereceived", 1);
  crmForm.all.hsi_datetimereceived_c.style.display = 'none';
  crmForm.all.hsi_datetimereceived_d.style.display = 'none';
  crmForm.SetFieldReqLevel("hsi_datetimereceived", 0);




I am encountering the following problem. I suspect that it is known issue. But, I couldn't find any articles yet. :(


When I am creating phone call activity from Incident(Case), constant string "customer" is appended to phone call activity's recipient field value.

For example, if customer(contact/account) name in case is "User1", it becomes "User1Customer" in phone call activity's recipient field value.





is it possible to stop an activity, like Phone Call or Letter etc from making a task by default (without having to save as completed)?


When I try to save a Phone Call activity, I am getting an error message. All of the other activities are working fine. The error I am getting is this:


Microsoft Dynamics CRM has encountered an error. Please tell Microsoft about this problem.....

There isn't an exact error message except for the one above. But the URL in the popup box that had the error shows it is some kind of dlg_script error.

This is happening on more than 1 machine. Any ideas why I am getting this error?



Hi, I want to display a saved view in a phone call activity in an iframe. Saved view is seraching all the phone call activities based on the phone number passed. Onchange of phonenumber field i want to call this saved view and also want to pass the phone number entered in the textfield and display the results. Thanks in advance..

Hi All,

How can we change the default value(radio button) in phone call activity to incoming instead of outgoing when we open the phone call record?

please let me know.




It appears as though the out-of-the-box 'Activities' report doesn't include details of any activities associated with leads. It shows activities related to opportunities, contacts and accounts.

I'm running CRM 4.0 with roll-up 11 (4.0.7333.2741).

I can use advanced find to display all activities, including those related to leads, but would prefer to use the built in report.

Does anyone know if this is intentional or a bug?


Best regards,



Hi everyone,

I have a scenario like Acivity1 do some action and generates some output value.I want to use that output as the input for Activity2 .some thing like nested activities .Can you suggest some guidance on this type of workflows ?

Appreciate your comments..?




MyActivity.xaml has a child activity, a CLR AsyncCodeActivity, SendMail.cs, dragged and dropped onto the 'root' activity which is a FlowChart.   SendMail.cs is in the same directory as MyActivity.xaml which is loaded dynamically like so:

    dynamicallyLoadedActivity = ActivityXamlServices.Load("("..\..\..\MyActivities\MyActivity.xaml");

At runtime, when WorkflowInvoker.Invoke(dynamicallyLoadedActivity ) is called, this exception is thrown:

    XamlObjectWriterException: Cannot create unknown type {"Cannot create unknown type '{clr-namespace:MyApp.MyActivities}SendEmail'."}

The imports on MyActivty.xaml include "MyApp"  xmlns:local="clr-namespace:MyApp.MyActivities"  and the xaml: <local:SendEmail .... looks OK.

Here is the top of the stack trace:

System.Xaml.XamlObjectWriterException was unhandled
  Message=Cannot create unknown type '{clr-namespace:MyApp.MyActivities}SendEmail'.
       at System.Xaml.XamlObjectWriter.WriteStartObject(XamlType xamlType)
       at System.Xaml.XamlWriter.WriteNode(XamlReader reader)
       at System.Xaml.XamlServices.Transform(XamlReader xamlReader, XamlWriter xamlWriter, Boolean closeWriter)
       at System.Activities.XamlIntegration.FuncDeferringLoader.FuncFactory`1.Evaluate()
       at System.Activities.DynamicActivity.OnInternalCacheMetadata(Boolean createEmptyBindings)
       at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList`1& validationErrors)
       at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack`1& activitiesRemaining, ActivityCallStack parentChain, IList`1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)
       at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)
       at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)
       at System.Activities.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstanceExtensionManager extensionManager)
       at System.Activities.Hosting.WorkflowInstance.RegisterExtensionManager(WorkflowInstanceExtensionManager extensionManager)
       at System.Activities.WorkflowApplication.EnsureInitialized()
       at System.Activities.WorkflowApplication.RunInstance(WorkflowApplication instance)
       at System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary`2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout)
       at System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions)
       at System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs)

SendMail.cs is basically the same code which is in the samples and had previously been tested and works when called from another CLR AsyncCodeActivity.

If I remove SendMail MyActivity it works fine, so it seems SendMail can't be found but the XamlObjectWriterException exception seems to imply its trying to write... perhaps the compiled CLR type!?!!

Anyone have any idea what is causing this or suggestions as to what to look for?





I have a workflow service with a Pick activity.  This has three branches - each of them has a Recieve activity in the Trigger followed by a  Flowchart with steps that perform some work.

Now somewhere along the flowchart of Branch 1, I want to invoke the function in the Recieve activity of Branch 2 using a Send activity in Branch 1.  Is this possible?  What would the settings be in the Send activity?  Would the EndpointConfigurationName and ServiceContractName be the workflow service?  As in the service is calling upon itself?




1] My SharePoint server and ASP.NET application servers are on different machines

2] In SharePoint I have excel file stored on document space. I have requirment where User will A] login to ASP.NET website B] On one web form user have link to open Excel sheet file which is stored in SharePoint (this sharepoint is on another machine)

3] Excel sheet file from SharePoint should be opened

4] User will update few columns with new data and Save the file

5] This Excel Sheet should be updated in SharePoint and the new updated values must be stored in different SQL Server database table


1] Is there a way that I can use SharePoint Excel web Service to directly open this Excel file from SharePoint? So that when I will update and save this file directly SharePoint excel file will be updated.

2] How can I read and save updated excel sheet file values into different sql server?





We have button "Dial" is added to the forms Account/Contact/Lead/Phone Call Activity.

The Dial button functionality is to use the phone number present in the respective form and call an function developed in VB .Net 2005.

i.e. How do we handle the click event of the Dial button and call the function developed in Vb .NET 2005 from Account/Contact/Lead/Phone Call Activity?

Also, Which language can i use in OnLoad and OnSave events to achieve the above requirement?


Sudhir C N


I've been asked to create a report in CRM 4 that lists all of the leads that have not been contacted in the last x (default to 6) months, and I'm experiencing some problems.

The main problem is that the Regarding field on the emails that get tracked through Outlook (CRM for outlook) do not have the "Regarding" field set, so when I use the built in report building functions (using Regarding (Lead)), they do not show up in the report.

I was wondering if anyone might be able to provide some advice or help on writing a workflow that could update the email items to fill the Regarding field with the lead that the email has been sent to.

Failing that, I was wondering if anyone might be able to provide some guidence on which tables / views I would need to use in a SQL report externally from CRM (but connected to the CRM DB) to get the information I'm after.

...I hope that is clear enough, if not, please let me know.






   I have a fully working audio application for streaming and playing music locally. However if the user makes a phone call or gets a phone call while playing it seams that the phone changes the state of the soundcard and after the phone call is over the player can't play any more music or the music quality is very low even after restarting the app. Also After an outgoing call windows media player also can not play any music as well. My question is:

<b>Is there a way to determine if a call has ended and if there is, is there a way to reinit the sound card?</b>


FYI I already have code to deal with the phone sleeping.


Thank you


I need to take the FullName field from Lead and during Convert Lead, have that name go into a custom field called Sponsor on the Opportunity Record. Sponsor, the custom field on Opp, needs to be a lookup field because sometimes the sponsor is not the original contact from the Lead entity.

I originally thought I had solved this by using the FullName field on Lead, creating a 1:M relationship with Opportunity and mapping it to my custom field Sponsor on the Opportunity record, but the Sponsor field is not a lookup field and I do not know how to change it into one.

Thank you all for your help.




I have defined a custom field type and a custom content type that has this custom field as:








ContentTypeID="0x010100ef19b15f43e64355b39431399657766e"Name="Custom Item"Group="My Custom Content Types"Description="Represents a custom item."Version="1"xmlns="http://schemas.microsoft.com/sharepoint/">








FieldRefID="{BBBA130D-6DA3-4b06-9A16-1BCD84A4D3D2}"Name="Media"DisplayName="Custom Media" />














Later on, I wanted to change the DisplayName of the custom field to "Media" from "Custom Media". Thus I edited the line:

<FieldRefID="{BBBA130D-6DA3-4b06-9A16-1BCD84A4D3D2}"Name="Media"DisplayName="Custom Media" />

to be

 <FieldRefID="{BBBA130D-6DA3-4b06-9A16-1BCD84A4D3D2}"Name="Media"DisplayName="Media" />

built a new wsp package and ran Update-SPSolution.

I now get a message saying my custom field type is not installed properly and I must delete the field.

What do I need to do to update my custom field.






I have a vanilla service call, the service and the client proxy have been generated with the SL3 tools (in other words no SL2 migration).

        void BeginLoadCompanyDetails(int id)
            if (_loadCompanyDetailsClient != null)

            _loadCompanyDetailsClient = new CompanyServiceClient();

            _loadCompanyDetailsClient .GetCompanyDetailsCompleted += new EventHandler<GetCompanyDetailsCompletedEventArgs>(CompanyServiceClient_GetCompanyDetailsCompleted);
            _loadCompanyDetailsClient .GetCompanyDetailsAsync(id);

        void CompanyServiceClient_GetCompanyDetailsCompleted(object sender, GetCompanyDetailsCompletedEventArgs e)
            _loadCompanyDetailsClient = null;

            if (e.Error != null)

            if (e.Cancelled)

            this.CompanyDetails = e.Result;

Now I took care that the call takes 10 sec and I triggered the BeginLoadCompanyDetails method a second time, while the first call was still beeing processed.

I would have expected that the first call triggered the event handler with e.Cancelled set to true. However, what i get is
e.Cancelled = false;
e.Error = System.ServiceModel.CommunicationObjectAbortedException

System.ServiceModel.CommunicationObjectAbortedException: The HTTP request to 'http://localhost:2295/services/CompanyService.svc' was aborted.  This may be due to the local channel being closed while the request was still in progress.  If this behavior is not desired, then update your code so that it does not close the channel while request operations are still in progress. ---> System.Net.WebException

if I break into exceptions when thrown, there are a lot of WebExceptions, etc. going on under the hood.

Looks like a bug in SL3?




During a communicator call,  I  receive notifications about

the users  presence's status  and the activity.   ( Busy, on-the-phone)

if one user  changes,  during the call ,  manually,  his status to available,

then I receive the notification that he is available, but without the activity.

I do not receive , in the Aggregate state, a notification like "Available, on-the-phone".

I use the ApplicationEndPoint.

What should I do in this case ?

What is the accurate way to be informed about the call termination,

via the Presence's and activity's status ?

Has something changed about this issue, in UCMA 3 ?




Hi there,

Does anyone have an idea how to put the a "potential cutomers" field in the lead form. You see i like to assign the leads
to accounts, just like the opportunities do.

Thanks in advance!



I have created an Entity called XYZ.  On this entity I have added an attribute (ABC) that determines a value to use in an external VB ASP.NET application.

On the lead form, you select the value from entity XYZ.  When the external application runs, I want to be able to get the attribute ABC and place onto a record that I am creating.

What would be the best code to use to accomplish getting the ABC value from the XYZ entity when it is selected on the Lead Entity?

Thanks for your help in advance!!

Eddi Rae



<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure