locked
Phone call activity question RRS feed

  • Question

  • Hi,

    I am using a fresh CRM online (limited configuration and no customization) and I am trying to add a phone call to a contact.

    I added in the contact's form a subgrid with activities.

    If I add a Phone call activity through the grid then the Phone Call activity form opens without pre-filling the "Call To" filed with the Contact's lookup. On the contrary, just 2 lines below the "Regarding" field is prefilled with the Contact's lookup.

    If I use the social pane to add the phone call activity then the "Call To" field (in Social Pane has different label "Call With") is pre-filled with the contact lookup.What is the reason for the different functionality? Is it a bug or can I make it consistent in both cases?

    I think that it is exactly the same with appointment records

    Regards,

    Alex

    Friday, September 26, 2014 2:01 PM

All replies

  • You can make it consistent using javascript code executed only when the phone call activity is created.

    the code will be something like:

    function OnLoad()
    {
    if (Xrm.Page.ui.getFormType() == 1)
    {
        if (Xrm.Page.getAttribute("regardingobjectid").getValue() != null)
        {
            Xrm.Page.getAttribute("to").setValue(Xrm.Page.getAttribute("regardingobjectid").getValue());
        }
    }
    }


    My blog: www.crmanswers.net - Rockstar 365 Profile


    Friday, September 26, 2014 2:15 PM
  • Thank you for your answer.

    Are you sure that you can set a lookup value by setting only the ID?

    I thought that it is required to create a Lookup object and set all three values:

    lookup[0].id 
    lookup[0].name
    lookup[0].entityType 


    Any, thank you for the answer.

    Alex

    Monday, October 6, 2014 4:24 PM
  • the value returned by a JavaScript getValue() for a regardingobjectid is already an array (because it's a lookup) so it can be used to set the value of another lookup.

    My blog: www.crmanswers.net - Rockstar 365 Profile

    Tuesday, October 7, 2014 6:34 PM