mscrm-addons.com - Blog

IMPORTANT INFORMATION

This blog is deprecated since July 2020.The articles below are no longer maintained and might contain outdated information. 
You can find the most acutal and relevenat information in our Knowledge Base at support.mscrm-addons.com

News.mscrm-addons.com Blog

rss

Hello and welcome to our blog! What can we do for you? Are you looking for further technical information or step-by-step instructions to our products? Or would you like to read the latest news on mscrm-addons? Please feel free to browse our blog for detailed information and to share our posts!


PhoneCall from/to fields are not populated

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.




Comments are closed.