8. October 2015 13:56

PhoneCall from/to fields are not populated

Filed Under(CRM 2013 | TelephoneIntegration 2013) By pkorosec

When you open a new PhoneCall activity (without the always store option), the TelephoneIntegration (TI) Client automatically fills the from and to field with the actual sender and the recipient. The functionality is provided with the TelephoneIntegrationServerCore2013.16 solution.

If it does not work, you must check the checkSender function.

To do so, open the PhoneCall Information Form. Make sure, that in case of an OnLoad event the checkSender function is called from the ptm_PhoneCallDirection.

Figure 1: PhoneCall Information Form

 

The content of the checkSender function must look like this:

function checkSender()
{
    try
    {
        if (!(window.location.search.match('&id=')))
        {                                                          
                    if (window.location.search.match('actualdurationminutes=-'))
                    {
                           if (Xrm.Page.data.entity.attributes.get("directioncode").getValue())
                           {
                                  var from = Xrm.Page.data.entity.attributes.get("ownerid").getValue();
                                  Xrm.Page.data.entity.attributes.get("from").setValue(from);
                           }
                           else
                           {
                                  var from = Xrm.Page.data.entity.attributes.get("ownerid").getValue();
                                  var to = Xrm.Page.data.entity.attributes.get("to").getValue();

                                  Xrm.Page.data.entity.attributes.get("from").setValue(to);
                                  Xrm.Page.data.entity.attributes.get("to").setValue(from);
       }
               
     name = "actualdurationminutes";
     var regex = new RegExp("[\\?&]" + name + "=([^&#]*)");
                           var results = regex.exec(window.location.search);                                                                      
                           var dur = parseInt(results[1].replace(/\+/g, ""));
                           Xrm.Page.data.entity.attributes.get("actualdurationminutes").setValue(dur * -1);                    
                    }
        }
    }
    catch (e) {}
}

Please do also check the PhoneCall Standard form.

That’s it! We appreciate your feedback! Please share your thoughts by sending an email to support@mscrm-addons.com.

Tag Cloud

This will be shown to users with no Flash or Javascript.

Page List