Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Can't set from in url on Phonecall Activity

$
0
0

I am trying to set "from" field in url and open PhoneCall form. I have 4 parameters that I send; 
- phonenumber
-directioncode
-callid (gets from IVR integration)(custom field)
-account 

If the account is exist in the CRM with that phonecall, somehow callid can not be set but if there is no account with that phone number I just send phone number, callid and directioncode as parameters and it works well and all parameters can be set on the form.
I wonder why I can not set callid when I need to set account too at the same time? Thanks for help!

here is my code :

                string phoneNumber = ıvrParameters.gsmNo;
                DataTable accountDt = sqlHelper.RetrieveAccountsByGsmNo(phoneNumber);

                if (accountDt.Rows.Count > 0)
                {
                    foreach (DataRow row in accountDt.Rows)
                    {//can not set call id
                        string accountName = HttpUtility.UrlEncode(row["Name"].ToString(), System.Text.Encoding.UTF8);
                        string account = HttpUtility.UrlEncode("new_callid=" + ıvrParameters.callId + "&phonenumber=" + phoneNumber + "&directioncode=0&partyid={" + row["AccountId"].ToString() + "}&partyname=" + accountName + "&partytype=1");
                        urlList.Add("111.111.11.11/.../main.aspx;newWindow=true&pagetype=entityrecord&extraqs=" + account);
                    }
                }
                else
                {//works well
                    string newPhoneCall = HttpUtility.UrlEncode("phonenumber=" + phoneNumber + "&directioncode=0&new_callid=" + ıvrParameters.callId + "");
                    urlList.Add("111.111.11.11/.../main.aspx;newWindow=true&pagetype=entityrecord&extraqs=" + newPhoneCall);
                }

                return urlList;

Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>