Advertisements

Archive

Posts Tagged ‘Dynamics 365’

Dynamics 365 – Read Auditing

One of the much awaited features ‘Read Access Audit‘ is being roll out in the latest version of Dynamics 365 online.

Enable ‘Read’ Audit:

  • Connect to your Dynamics 365 application.
  • To enable Audit, choose Settings > Administration > System Settings > Auditing tab

Read Audit

Access Audit Data:

  • Audit data can be viewed by connecting to the Office 365 Security and Compliance Center.
  • Connect to https://protection.office.com > Search & investigation > Audit log search and select the Dynamics 365 activities tab

Read Audit Reports

Refer this article for more info.

🙂

Advertisements

Dynamics 365 – Broken ‘Notes’ control on the form and Fix

If you have upgraded to latest Dynamics 365 version or subscribed for 30 days trail and could not add a note or attachments in ‘Notes’ tab on form, this fix is for you.

Problem statement:

  • Could not add a Note or add attachment from ‘Notes’ control on form.
  • ‘Notes’ panel rendering as below with no ‘Enter a Note’ option

Notes-1

  • It seems product issue and will be fixed in future updates.

Fix worked for me:

There is no documented fix for this, however below steps worked for me.

  • Open the entities ‘Customization Form’ which you have problem with.
  • Double click and open the ‘Notes’ tab

Notes-4

  • Under ‘Web Client Properties’, select ‘Default tab’ property as highlighted below.

Notes-3

  • Save & Publish
  • Go back to the form and refresh.
  • You should see option to add Note.

Notes-2

🙂

 

D365 – Troubleshoot and Fix connectivity issues – ‘Microsoft Support and Recovery Assistant for Office 365’ tool

April 23, 2018 1 comment

Recently, I came across a Microsoft Support and Recovery Assistant for Office 365 tool from Microsoft to troubleshoot and fix Office 365 connectivity issues. Download

This tool can fix many problems for you, or it can tell you how to fix them yourself with guided steps.

Tool - 3

It helped me fixing my Dynamics 365 free trail connectivity issue and Outlook connectivity issue.

Usage:

  • Download and open the .exe

Tool

  • Pick the App you have problem with.

Tool - 2

🙂

 

IntelliSense in Jscript/TypeScript file – Dynamics 365

In this article, lets see how to configure intellisence with XRM syntaxes in your Jscript/TypeScript files.

To enable IntelliSence, you need to install xrm npm package to your Visual Studio.

Steps to install NPM package:

  • To install npm package, you need to download and install a Visual Studio extension : Package Installer

Intelli - 5

  • Post installation, from your Visual Studio, select ‘Quick Install Package’ from Menu

Intelli - 6

  • From the popup,
    • Select ‘npm’ in the dropdown
    • In the textbox, type ‘@types/xrm
    • Click on ‘Install’

Intelli - 7

  • Post package installation, refresh the project and you should see a new folder ‘node_modules
    • Note: If you dont get the ‘node_modules’ folder, check your project’s physical location and add the folder to your Visual Studio project.

Intelli - 8

  • In above screen, ‘TypeScript’ is my project name and post above steps, I got the ‘node_modules’ project.

Enable IntelliSence in your Jscript/TypeScript file:

  • Open your script file
  • Drag and drop the ‘index.d.ts’ file from ‘node_modules’ folder on to your script file.
    • Alternatively you can also this syntax
      • /// <reference path=“../node_modules/@types/xrm/index.d.ts />

Intelli - 1

  • Start typing ‘Xrm’ and you should see the syntaxes.

Notes:

  • Those who are wondering what is a npm, it is a package manager for the JavaScript programming language.
  • www.npmjs.com hosts thousands of free packages to download and use.

 

Dynamics CE – Demystify ‘Auto Number’

April 6, 2018 1 comment

Auto Number‘ feature is available with Dynamics 365 (online) and V9.x versions. With this feature we are no longer dependent on 3rd party ISV solutions for Auto numbering.

Auto Number - 2

In this article I am going to cover a few use cases of Auto Number fields.

How to create an Auto Number field:

As of the date, we can either create a new ‘Auto number’ field or convert an existing field to ‘Auto Number’ only programmatically (i.e., using SDK call).

Creation of an ‘Auto Number’ from Application will be included in next releases.

Lets see how to create a brand new ‘Auto Number’ field and convert an existing ‘Single Line Of Text’ field to ‘Auto Number’ along with few key points.

[Code Snippet] Create a NEW auto number field:

Below is the sample code to create a new Auto Number field ‘new_studentnumber‘ in a custom entity ‘new_student

var studentNumberAttributeRequest = new CreateAttributeRequest{
EntityName = “new_student“,
Attribute = new StringAttributeMetadata{
//Define the format of the attribute
AutoNumberFormat = “STD-{SEQNUM:4}”,
// Set fields Logical and Schema Name
LogicalName = “new_studentnumber“,
SchemaName = “new_studentnumber“,
RequiredLevel = new AttributeRequiredLevelManagedProperty(AttributeRequiredLevel.None),
MaxLength = 100,
// Set fields Display Name and Description
DisplayName = new Label(“Student ID”, 1033),
Description = new Label(“Student ID”, 1033)
}
};
_serviceProxy.Execute(studentNumberAttributeRequest);

  • Make sure you ‘Publish‘ customization’s from Application after executing the code.

[Code Snippet] Convert EXISTING field to an auto number field:

Below is the sample code to convert OOB ‘new_name’ field to auto number field in the custom entity ‘new_student‘.

Important note:

  • Field you are converting has to be of type ‘Single Line Of Text’.
  • If you pass a different type of field (Ex- Whole number), code will not throw any exception but no auto number logic will get attached to the field.

// First retrieve the Attribute Metadata
var attributeRequest = new RetrieveAttributeRequest{
EntityLogicalName = “new_student”,
// Pass the attribute name
LogicalName = “new_name”,
RetrieveAsIfPublished = true
};

// Retrieve attribute response
var attributeResponse = (RetrieveAttributeResponse)_serviceProxy.Execute(attributeRequest);

// Now modify the retrieved auto-number attribute
var retrievedAttributeMetadata = attributeResponse.AttributeMetadata;
// Set the auto numbering format
retrievedAttributeMetadata.AutoNumberFormat = “STD-{SEQNUM:3}-{RANDSTRING:6}”;

// Update the auto-number attribute
var updateRequest = new UpdateAttributeRequest{
Attribute = retrievedAttributeMetadata,
EntityName = “new_student”,
};

// Execute the request
_serviceProxy.Execute(updateRequest);

  • Make sure you ‘Publish‘ customization’s from Application after executing the code.

Key Points:

  • Auto number fields will be Read-only and you cannot override the value from Form.
  • But you can override the value from code using SDK Insert call.
  • As you would notice below, Even though the ‘Name’ is an Auto number field, I could create a ‘Student’ record from code by setting ‘Name’ to ‘Rajeev’.  If you dont set a ‘Name’ field value from code, system would populate the auto number.

Auto Number - 1

  • In a single Entity, you can have multiple auto number type fields with the same format.
  • You can alter the auto number format of a field at any point of time by using ‘UpdateAttributeRequest’ SDK call (Refer 2nd code snippet above).
  • In the Auto number format, use ‘Random String’ tag (i.e., {RANDSTRING:number}) which help you to avoid duplicates or collisions, especially when offline clients trying to create auto-numbers.
    • For example, CNR-{RANDSTRING:4} format will generate an auto number with a random string of 4 character length (i.e., ‘CNR-WXYZ‘)

Auto Number - 3

  • The random string placeholders are optional.You can include more than one random string placeholder in an Auto Number Format.

🙂

 

Dynamics 365 Spring Release 2018

Microsoft has released Spring ’18 release notes for Microsoft Business Applications and can be downloaded from here

D365_Spring_18

Refer this link for all latest updates on Dynamics 365