Saturday, April 14, 2018

Issue while Installing Adxstudio Portal 7.0.0026 in Dynamics 365


When you are going to install  Adxstudio Portal 7.0.0026 in Dynamics 365, you may get the following error. It means that you are not allowed to update the Marketing List canmodifymobileclientreadonly attribute due to it is being restricted in AdxstudioPortalDependencies Solution.


Error :
[entity] List - The evaluation of the current component(name=Entity, id=efd3a52d-04ca-4d36-a54c-2a26a64f5571) in the current operation (Update) failed during managed property evaluation of condition: The evaluation of the current component(name=Entity, id=efd3a52d-04ca-4d36-a54c-2a26a64f5571) in the current operation (Update) failed during managed property evaluation of condition: Managed Property Name: canmodifymobileclientreadonly; Component Name: Entity; Attribute Name: canmodifymobileclientreadonly;

Solution :
  1. Go to Adxstudio Portal Installed Location. Let say: I have installed it in C:\Program Files (x86).
  2. Navigate to C:\Program Files (x86)\Adxstudio\XrmPortals\7.0.0026\Customizations\Components.
  3. Extract the AdxstudioPortalsDependencies.zip solution to some other location.
  4. Now open the Customization.xml file.
  5. Modified following values from 0 to 1 under Marketing List Entity.
    <IsVisibleInMobile>1</IsVisibleInMobile>
    <IsVisibleInMobileClient>1</IsVisibleInMobileClient>
    <IsReadOnlyInMobileClient>1</IsReadOnlyInMobileClient>

  6. Select all the folder and Zip it again to create the updated AdxstudioPortalsDependencies solution.
  7. Import the solution in Dynamics 365.
Now you can install the Portal (Basic, Community, Customer etc).



Monday, April 9, 2018

Level up for Dynamics CRM/365

I found a very useful Chrome extension :  Level up for Dynamics CRM

There are so many useful features which saves developers time.
You can visit following URL and see all the available featurs.

https://github.com/rajyraman/Levelup-for-Dynamics-CRM/blob/master/README.md

When you open a CRM, the extension enables for you and when you click it will show following options. Those options are described in the given link before.


If you have open a record form, it'll show additional options as below.


Thursday, April 5, 2018

Dynamics 365 Share and Un-Share Records Programmatically C#

Please refer to these codes, to Share Records, and Unshare Records.
/// <summary>
/// Shares the record.
/// </summary>
/// <param name="service">The service.</param>
/// <param name="tracingService">The tracing service.</param>
/// <param name="targetEntity">The target entity.</param>
/// <param name="targetUser">The target user.</param>
private void ShareRecord(IOrganizationService service, ITracingService tracingService, EntityReference targetEntity, EntityReference targetUser)
{
    //no delete access
    GrantAccessRequest grant = new GrantAccessRequest();
    grant.Target = targetEntity;

    PrincipalAccess principal = new PrincipalAccess();
    principal.Principal = targetUser;
    principal.AccessMask = AccessRights.ReadAccess | AccessRights.AppendAccess | AccessRights.WriteAccess | AccessRights.AppendToAccess | AccessRights.ShareAccess | AccessRights.AssignAccess;
    grant.PrincipalAccess = principal;

    try
    {
        service.Execute(grant);
    }
    catch (Exception ex)
    {
        tracingService.Trace("Exception: {0}", ex.ToString());
        throw ex;
    }
}

/// <summary>
/// Un shares the record.
/// </summary>
/// <param name="service">The service.</param>
/// <param name="tracingService">The tracing service.</param>
/// <param name="targetEntity">The target entity.</param>
/// <param name="targetUser">The target user.</param>
private void UnShareRecord(IOrganizationService service, ITracingService tracingService, EntityReference targetEntity, EntityReference targetUser)
{
    //no delete access
    ModifyAccessRequest modif = new ModifyAccessRequest(); ;
    modif.Target = targetEntity;

    PrincipalAccess principal = new PrincipalAccess();
    principal.Principal = targetUser;
    principal.AccessMask = AccessRights.None;
    modif.PrincipalAccess = principal;

    try
    {
        service.Execute(modif); ;
    }
    catch (Exception ex)
    {
        tracingService.Trace("Exception: {0}", ex.ToString());
        throw ex;
    }
}

Wednesday, April 4, 2018

Errors importing marketing list entity in Dynamics 365 v9

When you try to move your customization in  marketing list entity in Dynamics 365 v9, you may receive an error importing the customization.

By default "Read-only in mobile" is selected. Since "Enable for mobile" is not selected, "Read-only in mobileis not included in the exported solutions customization XML.

You can fix this issue by following  below steps. 
  1. Extract the solution and open the customization XML file
  2. Locate the List entity in the XML file
  3. Add the following tag in the XML file:<IsReadOnlyInMobileClient>1</IsReadOnlyInMobileClient>
  4. Zip the solution and import it again