D365 V9 Alert Dialog
Introduction: This blog explains how to show alerts in D365 V9. Details: We often get requirement to show alerts in D365 V9 Forms and can be achieved using below syntax. Xrm.Navigation.openAlertDialog(alertStrings,alertOptions).then(closeCallback,errorCallback); Example: 1. Alert with no callbacks. var alertStrings = { text: “successfully checkedin.” }; var alertOptions = { height: 120, width: 260 }; Xrm.Navigation.openAlertDialog(alertStrings, alertOptions).then( function () { } ); 2. Alert with callback method. var alertStrings = { confirmButtonLabel: “Yes”, text: “This is an alert.” }; var alertOptions = { height: 120, width: 260 }; Xrm.Navigation.openAlertDialog(alertStrings, alertOptions).then( function success(result) { console.log(“Alert dialog closed”); }, function (error) { concole.log(error.message); } ); Note: Xrm.Utility.alertDialog(message,onCloseCallback) is been deprecated.
Share Story :
Calculated Currency Field doesn’t support Min or Max values
Introduction: This is an observation I made when one of our clients wanted to have a limit on the calculated fields. Let’s say, a lower limit of the currency field that is expected to throw an error (or somehow not allow) the currency going in negative values for a calculated field. Observation: Now, I want to keep the Minimum Value as $0. I’ll keep the Minimum value as 0 so that when I can make it as Calculated Field, the Minimum Value gets locked by $0 I’ve entered. See screenshot below: But, as soon as I make it as Calculated Field and click on Save, this happens- It still appears that I will save it as 0 But, it creates the field, locks the minimum field and then defaults it back to the original minimum value. Bottom line: We cannot have our own Minimum Value on the Calculated Currency fields. But however, I found that this is allowed for other calculated fields. Like the Whole Number.
Share Story :
Error During Email Activity Migration: ActivityPointer Does Not Exist
Introduction: While migrating Email Activities from D365 v8.2 to v9, I came across the following error: “Operation failed. Label: Create email, Name: emailCreate2, Message: -2147220969: ActivityPointer With Id = XXXXXXXXXXXX Does Not Exist” This can cause some confusion as activitypointers do not need to be migrated before you begin migrating emails. What are ActivityPointers? The activity pointer (activity) entity represents any activity or task that is performed, or to be performed by a user. An activity is any action for which an entry can be made on a calendar. Whenever you create an activity record in Microsoft Dynamics 365, a corresponding activity pointer record is created. This indicates that the activity record and the corresponding activity pointer record have the same value for the ActivityId attribute. For example, if you create an Email record, the attribute values of Email.ActivityId and the corresponding ActivityPointer.ActivityId will be the same. This should not be confused with ActivityParties which represent a person or group associated with an activity. An activity can have multiple activity parties. Cause: Upon inspection, I discovered that those emails are linked to themselves, having the ‘parentactivityid’ field populated with its own activity GUID. The error was being caused because Scribe could not find the parent activity in the Target environment (since it had not yet been created). Solution: Remove the ‘parentactivityid’ mapping from the ‘Create Email’ block. Add an If-Else Block below the Create block to check if the Email has been created, and if true, use an Update block to update the Email with the ‘parentactivityid’. Now, the Email activity will be created with the correct GUID and once created, will be updated with the required GUID as ‘parentactivityid’. This solution resolved the above issue and email activities can now be created without this error occurring.
Share Story :
Enable IIS to deploy Web Service
Introduction: In this blog, we will have a look on how IIS can be enabled for Web Service Deployment Steps to be followed: 1) Search for Windows features in your PC. 2) Check the box for Internet Information Services and click OK. A confirmation screen appears. Sometimes there are cases after the above procedure that it does not works. At such times, check all the options in windows features under IIS.
Share Story :
How to Setup POP3/SMTP email configuration in Dynamics CRM
Introduction: This blog explains how to Setup POP3/SMTP email configuration in Dynamics CRM. Steps to be followed: Step 1: Create new Email Server profile. a. Go to Settings –> Email Configuration –> Email Server Profile. b. Click on +New –> POP3/SMTP server. c. Fill Details in the form. Name: Gmail Incoming Server Location: pop.gmail.com Outgoing Server Location: smtp.gmail.com Now Go in Advanced Tab and Provide this Port values for Incoming and Outgoing Port. Incoming Port: 995 Outgoing Port: 587 d. Save. Step 2: Go to Email Configuration settings and then change Server Profile. Step 3: a. Go to Mailboxes. b. Select the user for whom you want to activate. c. Add following details. Email Address: Enter your Gmail’s Email Address. In Credentials Allow to use Credentials for Email Processing and Provide your Gmail User Name and Password. d. Click on Approve Email e. Click on Test & Enable Mailbox. You may get following error. REASON: Due to hidden settings within Gmail that may be blocking connections from third party apps. SOLUTION: a. Make sure you access these links while logged into the Gmail account, and make sure they’re turned on/enabled. https://www.google.com/settings/security/lesssecureapps https://accounts.google.com/DisplayUnlockCaptcha b. After enabling again go to mailbox and Click on Approve Email and Test & Enable Mailbox. c. Incoming and Outgoing Email Status is Success.
Share Story :
Calling unbound actions using Xrm.WebApi in D365 v9
Introduction: In this blog we will be demonstrating how to call an unbound action using Xrm.WebApi which provides properties and methods to use Web API to create and manage records and execute Web API actions and functions in Customer Engagement The available methods are createRecord, deleteRecord, retrieveRecord, retrieveMultipleRecords,execute and executeMultiple.The execute method executes a single action, function or CRUD operation. Implementation: The syntax for execute method is as follows: Xrm.WebApi.online.execute(request).then(successCallback,errorCallback); Note: This method isn’t supported for Unified Interface and it is only for online mode hence we have to use Xrm.WebApi.online object to execute the method, else it will fail. Step 1: First we create an unbound action. Here in our example we have created an action with the name “new_ActionTest” and we have activated it. In the action steps we have written a step to create a new contact with the name “Jessy David”. Here in our action we an Integer parameter. Any steps can be added as required. Step 2: Below shown code is function used to call the unbound action. Here “boundParameter” parameter is an optional String parameter, we have specified it as null as our action is not bound to any entity. “operationName” is an optional String parameter which is the name of the action.“operationType” is an optional Number parameter which indicates the type of operation we are executing is an Action hence we have specified 0. We can specific 1 for Functions and 2 for CRUD operations. When we run this, the action is called and a new contact is created according to the steps mentioned.
Share Story :
Pin Embedded Power BI Reports to Workspace in Dynamics 365 for Finance and Operations
Introduction: In this blog article, we shall see how to pin the power BI reports to Workspace. How to pin? Power BI reports can be added to any workspace that contains a Links section. Once the Power BI reports have been deployed successfully you can pin them to your Dynamics 365 Finance and Operations Workspace. Steps: Open a workspace in Dynamics 365 For Finance and Operations In the workspace, click the Options tab Click Open Report Catelog The list of reports comes from the reports that you have in your Power BI account Click on Ok and those reports will be on your workspace Similarly any customized or out of the box reports can be pinned to your workspace.
Share Story :
How to restrict an action button based on time in Microsoft Dynamics NAV
Introduction: Scenario- The requirement was such that on click of the action button a payment transaction is done. The time at which transaction was done is stored in the database. A restriction shouldto be applied to disallow the customer to make payment for the same amount till a certain time E.g. A transaction was done by customer A at 11.40 a.m for amount $100. This customer will be disallowed to make the transaction of the same amount $100 till suppose 5 mins. This time is mins will depend on the client requirement. Pre-requisites: Microsoft Dynamics NAV 2017 Steps: A field is added in the Sales & recivable setup for Time Check in mins. Here, time in minutes is entered say 5 mins. So the payment will be restricted for 5 mins. I’ve written the code on the action button. EFTTransaction.RESET; EFTTransaction.SETRANGE(“Store No.”,’xyz’); EFTTransaction.SETRANGE(“Terminal No.”,’TERM01′); EFTTransaction.SETRANGE(“Sell-to Customer No.”,Rec.”Sell-to Customer No.”); EFTTransaction.SETRANGE(“Account Number”,Rec.”Account Number”); EFTTransaction.SETRANGE(“Transaction Amount”,Rec.”Transaction Amount”); EFTTransaction.SETRANGE(“Transaction Status”,EFTTransaction.”Transaction Status”::Approved); IF EFTTransaction.FINDLAST THEN BEGIN time1:=EFTTransaction.”Transaction Time”; Create Integer variables Hours, Minutes and Seconds and Milliseconds as Decimal variable. Get the transaction time. Time by default is stored in the system in milliseconds. The below code will convert time and store the hour in Hour variable, minutes in Minutes variable and same for seconds. //Code written to convert time to hr min and sec **ST** Milliseconds := time1 – 000000T; //MESSAGE(‘%1 total mili’,Milliseconds); Hours := Milliseconds DIV 1000 DIV 60 DIV 60; Milliseconds -= Hours * 1000 * 60 * 60; Minutes := Milliseconds DIV 1000 DIV 60; Milliseconds -= Minutes * 1000 * 60; Seconds := Milliseconds DIV 1000; Milliseconds -= Seconds * 1000 ; //Code written to convert time to hr min and sec **EN** Get the Time check in mins from Sales & recivable setup and add it up with the Minutes variable. “Rec_Sales&Rec”.GET; Minutes+=”Rec_Sales&Rec”.”Time Check for Credit Card(min”; Now we have till which the transaction should be restricted but the time is stored in Integer variables. Write the below code to convert the integer/decimal variable to time. Milliseconds+=Seconds*1000 +Minutes * 1000 * 60+Hours * 1000 * 60 * 60; //convert time to milliseconds Milliseconds:=Milliseconds/1000; //convert milliseconds to seconds tim := 000000T; tim := tim + (Milliseconds MOD 60) * 1000; // get the seconds Milliseconds := Milliseconds DIV 60; // keep the minutes tim := tim + (Milliseconds MOD 60) * 1000 * 60; // get the minutes Milliseconds := Milliseconds DIV 60; // keep the hours tim := tim + (Milliseconds MOD 60) * 1000 * 60 * 60; // get the hours Here we get our time in time variable. Add the restriction condition. IF (EFTTransaction.”Transaction Date”=TODAY) AND (TIME < tim) THEN ERROR(‘The Transaction for the account number %1 can be only done after %2 mins’,Rec.”Account Number”,”Rec_Sales&Rec”.”Time Check for Credit Card(min”) ELSE BEGIN Submit; “Submit&Settle”; Conclusion : Thus using the above logic time can be converted to Integer variables and then convert Integer variables to time again.
Share Story :
Design Views in App Designer – D365
Introduction: Create and edit public or system views by using the app designer Description: Dynamics 365 sales app designer allow us to create/edit system view using the app designer. In this example we will use the sales app and account entity for view design. Design: Go to Setting > select My Apps. And open the sales app in app designer. We can define the filter criteria with and/or condition. Select the account view and click on the create new view from the components tab. Adding Column: Now you will able to see the designer page of a view. You can add the column to the view from the components tab I have added the account number column. You need to drag and drop. After adding few columns. Adding Filter: We can add the filter criteria which will show only related record. We can define the filter criteria with and/or condition Save the view: Provide the view name and save it Column Sorting: You can define the primary and secondary sorting column Publish: Finally, you need to publish the view as shown Conclusion: So, this is another quick way you can create Views than just traditionally creating from within Solutions in D365.
Share Story :
Call Management in D365 Field Service
Dynamic 365 for field service is an end-to-end solution to manage inventory, manage service orders, track assets as well as handling complex service agreements. It also boots your business by quickly identifying and dispatching resources in turn gaining the intelligence that is required to provide support to the business. Dynamic 365 field service management software helps your business to automate and improve scheduling in order to get the most out of your resources and by dispatching the right technicians. The software proactively detects, troubleshoots and resolves issues to enhance your service experience. This software is able to provide a dedicated self-service portal to its customers with proactive updates and tracking of technicians so that customers get positive impact on their business at every step Introduction: This blog provides a solution to requirement of Client for Call Management in D365 Field Service. Scenario: Most clients specify an requirement where Customers gives a Phone Call to Call Center or send email to Customer Care department and how to design this requirement in Field Service. Resolution: We need to provide solution to requirement as detailed below 1. Create a record of Case from Service Module by Customer Care Representative User as shown below 2. Client has first level of Support team who provide phone support and provide resolution to Customer, then can continue using OOB BPF to Resolve the Case. 3. Other Scenario is Client First Level Support Team is not able to resolve the issue and needs to create an Work Order for Case then User needs to below steps. Set Incident Type on Case and save record, otherwise this will restrict User from Creating Work Order by OOB Validation as shown below. Click button on ribbon with “Convert to Work Order” this creates an Work Order populating all data from Case to Work Order. Note: By Creating Case record below are advantages: First level Support team can review KB articles to resolve the Case. Origin type of record is saved like Phone Call , Email , Web etc. OOB feature to convert Case to Work Order. Conclusion: This blog explains how Phone Calls and email from Customer can be recorded in system and on need basis we can create Work Order from Case record by using OOB feature.