Search This Blog

Friday, June 23, 2017

Click Phone Number on HTML page calling with Skype as similar to Dynamics CRM Phone Number

Click Phone Number on HTML page calling with Skype as similar to Dynamics CRM Phone Number

On CRM, we are embedded the HTML page in the contact screen. In HTML page there is a phone number link(anchor tag) button.

When user click the field need to call with Skype as similar to Dynamics CRM.




On the HTML page we have to create a anchor tag

  <a href="callto:768-555-0156" id="iAnchor"  onclick="return Test();" use_skype_protocol_grid="True" country_code="+91" title="Prefix the number with &quot;+<country code><area code>&quot; and install Skype to make calls from Microsoft Dynamics 365.">768-555-0156</a>

Attribute Definitions:
href= callto:Phonenumber
use_skype_protocol_grid= call in skype or skypeBusiness/Lync(Administrator->SystemSetting->Set the telephone provider)
country_code= (Administrator->SystemSetting->Default country/code region)



 function Test() {
  //Syntax        //Mscrm.Shortcuts.openPhoneWindow(phoneNumber,LOCID_COUNTRY_CODE,LOCID_USE_SKYPE_PROTOCOL)

    parent.Mscrm.Shortcuts.openPhoneWindow("768-555-0156", "+91", "true")
 }

The below is the original method in the Dynamics CRM  "_static/_grid/action.js"
//_static/_grid/action.js
function openPhoneNumberFromGrid(e)
{
    try
    {
        var o = e.target || e.srcElement;
        if(!IsNull(o))
        {
            while(o.tagName != "A")
                o = o.parentNode;
            var phoneNumber = XUI.Html.GetText(o),
                LOCID_COUNTRY_CODE = "",
                LOCID_USE_SKYPE_PROTOCOL = "";
            if(!isNullOrEmptyString(phoneNumber))
            {
                if(o.hasAttribute("country_code"))
                    LOCID_COUNTRY_CODE = o.getAttribute("country_code");
                LOCID_USE_SKYPE_PROTOCOL = o.getAttribute("USE_SKYPE_PROTOCOL_GRID");
                Mscrm.Shortcuts.openPhoneWindow(phoneNumber,LOCID_COUNTRY_CODE,LOCID_USE_SKYPE_PROTOCOL)
            }
        }
    }
    catch(e)
    {
    }
    return false
}




Click phone number in CRM automatically call go in Skype or Skype for Business

Click phone number in CRM automatically call go in Skype or Skype for Business
Whenever click the skype icon or phone number, we want to call automatically through skype for business or skype.




There are two ways we could achieve it
1)Default CRM method call
2)Using javascript

1) Default CRM method call

Code:

Mscrm.Shortcuts.openPhoneWindow('789-852-987','+1','true');

Output:


 Behind the code  "Mscrm.Shortcuts.openPhoneWindow" in CRM

openPhoneWindow = function (phoneNumber, countryCode, useSkypeProtocol) {
    var $v_0 = "tel";
    $v_1 = (new parent.Mscrm.PhoneUriBuilder).buildUri(phoneNumber, countryCode, $v_0),
    $v_2 = parent.Mscrm.CrmUri.createForOrganization($v_1, null);
    $v_2.checkParamsNoEqual = true;
    safeWindowOpen($v_2, "", "")
};
function safeWindowOpen(url, name, features, replace, disablePopupWarning) {
    var $v_0 = null;
    //if (!IsNull(url))
    $v_0 = url.toString();
    //  else $v_0 = "";
    //if (IsNull(features))
    features = "";
    parent.Mscrm.PerformanceTracing.write("Navigate", $v_0);
    var $v_1 = null;
    try {
        if (parent.Mscrm.CrmWindow.$3C && parent.Mscrm.Utilities.isChrome()) features = $7x(features, "status=1");
        parent.Mscrm.CrmWindow.$3C = true;
        var $v_2 = new Date;
        if (window.name === name)
            //The below line of code only open skype window.....
            $v_1 = parent.masterWindow().open($v_0, name, features, replace);
        else
            $v_1 = window.open($v_0, name, features, replace);
        attachErrorHandler($v_1);
        try {
            $v_1.focus()
        } catch (e) { }
        var $v_3 = new Date;
        $9p($v_1, $v_2.getTime(), $v_3.getTime());
        $v_1._masterWindow = masterWindow()
    } catch ($$e_9) { }
    //IsNull($v_1) && !disablePopupWarning && handlePopupBlockerError($v_0);
    return $v_1
}

function Test() {
    openPhoneWindow("768-555-0156", "+91", "false")
}
 

2) Using Javascript:

Code:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>
    <script type="text/javascript" src="http://www.skypeassets.com/i/scom/js/skype-uri.js"></script>
<body>
    <a href="tel:23456789">Call</a>
</body>
</html>

Output:



Thursday, June 22, 2017

Change the Federation Service Name of ADFS

If you change federation service name in the ADFS server. GoTo AD FS Management, click

"Edit Federation service properties". Change the federation service name and click "Ok" button.



Dynamics CRM Attachment table in SQL

In the CRM attachment are classified in to two.


  • Notes-where your attachment can save
  • Email- Adding your attachment on the email


Notes:
select DocumentBody,FileName, * from AnnotationBase

DocumentBody- base64 string where your attachment details contains


Email:


select * from ActivityMimeAttachmentBase ->Table

select Body, * from ActivityAttachment ->View

Attachment are save in the attachment table

select Body, * from AttachmentTable ->Table

Wednesday, June 21, 2017

Change service account of CRM,ADFS and SSRS and their permission-Part2

Change service account of CRM,ADFS and SSRS and their permission-Part2

In the last post we saw permission that are need to provide service account of CRM(IIS),ADFS and CRM service account.

This post we are going to see how to change service account.

CRM -IIS:
To change the service account of IIS application pool, we have to repair the Dynamics CRM. Go to Control panel->un-install program->Select the Microsoft Dynamics CRM->Right click uninstall/Change and repain

Dynamics CRM services:
The above process will also change the CRM service account.

ADFS:
After you provide permission to the ADFS service account. Goto services.msc->right click the ADFS service and click logon tab and provide new service account user name and passwor.

Tuesday, June 20, 2017

Change service account of CRM,ADFS and SSRS and their permission-Part1

Once you installed CRM,ADFS and SSRS in the server. If you want to change the service account of CRM,ADFS and SSRS. The below permission are needed for the service account while changing directly in the service.msc window.

IIS Application Account
  • Create a service account for IIS.
  • It must be a domain user.
  • Add the service account in the following Local Group Membership
    • Performance Log users
  • Provide “Log on as service” rights in the Local Security Policy Rights

ADFS Service Account
  • Create a service account for ADFS.
  • It must be a domain user.
  • Provide “Log on as service” rights in the Local Security Policy Rights
  • Add this service account in the CN= 409390d6-e4d1-4159-a6a7-f6ef0d939b48 on ADSI. Please below the steps to add user in the corresponding AD
    • In the AD sever, type “ADSIEdit.msc” in the run command
    • ADSI window will open, in that right click Top node of the left pane and click connect to. Connection settings window  will be open in that click ok button.
    • A new node will be add in the left pane. Expand it DC->CN=ProgramData->CN=Microsoft->CN=ADFS
    • In the right pane find ADFS starting with CN= 409390d6-e4d1-4159-a6a7-f6ef0d939b48, right click that object click properties.
    • A new window will be opened. In that click security tab and add ADFS service account and give "Full control"


To Get the the ACTIVE Directory Federation Service id:
Run the below command in the power shell where you install ADFS.
Get-ADFSProperties



  • Provide permission dbowner permission to access the ADFS internal database(
    • Open the SQL and connect \\.\pipe\MICROSOFT##WID\tsql\query in the ADFS server
    • security->logins->Create new login as windows authentication
    • In the  user mappings click adfsArtifactStore,AdfsConfiguration check box and Provide db owner and dbpublic permission.
  • Provide administrator permission to that service account

SSRS Service Account
  • Create a service account for ADFS.
  • It must be a domain user.
  • Provide “Log on as service” rights in the Local Security Policy Rights.
  • Create this service account  in the CRM database logon as windows authentication(Security->Login->Create user)

  • The service account needs to add in the following groups
    • ReportingGroup
    • SQLAccessGroup
    • Priv user group

CRM Service Account

  • Create the service accounts for the below services with the suffix as “PROD” . For E.g.:-    Crm_App_Svc_PROD (Application Service)
    • Application Service
    • Deployment Web Service
    • Sandbox Sync Service
    • Async Processing Service
    • VSS Writer service
    • Monitoring service
  • Provide “Log on as service” rights to the above service accounts in the Local Security Policy Rights
  • The following permissions are needed for the service account
    • Create, delete and manage user accounts
    • Read all user information,
    • Create, delete and Manage Groups
    • Modify the membership of a group
    • Performance Log Users group in the groups (System Tools > Local Users and Groups > Groups)

Tuesday, June 6, 2017

Types of Display group in Host Control

https://msdn.microsoft.com/en-in/library/dn865006.aspx?#Panels
Panel
Description
MainPanel
The main work area in the bottom right.
ChatPanel
The typical location of the chat window. It is under the agent scripting control.
HiddenPanel
A nonvisible panel generally used for component without a user interface (UI).
LeftPanel1
A panel just under the WorkflowPanel on the left.
LeftPanel2
A panel just under the LeftPanel1 on the left.
LeftPanelFill
A panel just under the LeftPanel2. This panel expands to fill the rest of the area available to the bottom edge of the left panel.
RightPanel
A panel located on the right side.
CtiPanel *
A panel located in the top right, it is the default location for softphone controls. This is a stack panel so more than one control can be added and will show up next to each other.
SessionExplorerPanel *
A panel located just under the session tabs where you typically display the session lines.
WorkflowPanel *
A panel located just under the SessionExplorerPanel and usually contains the agent scripting control.
ToolbarPanel *
A panel at the very top just to the right of the Unified Service Desk logo, and typically holds the Toolbar.
RibbonPanel
For internal use only.
StatusPanel *
A special panel located on the status bar at the bottom of the application.

Unified service Desk: An unsecured or incorrectly secured fault was received from the other party. See the inner FaultException for the fault code and detail.

This problem usually occurs due to date and time problem.

If you are connection on-premise environment then check your CRM installed server and your PC time must be same. If it is different this issue will occur.

Monday, June 5, 2017

Difference between CRM Action Navigate and FIND in USD

Navigate 

  • When you choose "Navigate" the "Active contact" displays with New button NAV bar


Action
url=main.aspx?etn=contact&extraqs=%3fpagemode%3diframe%26sitemappath%3dSFA%257cCustomers%257cnav_conts&pagetype=entitylist&viewid=%7b00000000-0000-0000-00AA-000010001004%7d&viewtype=1039

Find

  • When you choose "Find" the "Active contact" displays without New button NAV bar


Action
contact