Category Archives: Dynamics 365
Open new form with fields pre-populated using Xrm.Navigation in D365
Introduction: Xrm.Navigation provides navigation related methods like openAlertDialog, openConfirmDialog, openErrorDialog, openFile etc. In this blog we will be discussing about openForm method which opens an entity form or a quick create form. There might be requirements to open a new form with certain fields pre-populated on certain conditions or to open a specific record. Implementation: Step 1: Syntax:Xrm.Navigation.openForm(entityFormOptions,formParameters).then(successCallback, errorCallback) Here the parameter entityFormOptions is an Object and is a required parameter. Step 2: In the below example taken, we have written a script on the contact form to trigger on Save which will open up the quick create form with values filled in some of the fields. As we can see in the below image we have passed the execution context as the first parameter. Step 3: The code for the same is given below: scripting={ myfunction:function(executionContext){ debugger; var formContext = executionContext.getFormContext(); var entityFormOptions = {}; entityFormOptions[“entityName”] = “contact”; entityFormOptions[“useQuickCreateForm”] = true; var formParameters = {}; formParameters[“firstname”] = formContext.getAttribute(“firstname”).getValue(); formParameters[“lastname”] = formContext.getAttribute(“lastname”).getValue(); formParameters[“fullname”] = formContext.getAttribute(“fullname”).getValue(); formParameters[“jobtitle”] = “Developer”; Xrm.Navigation.openForm(entityFormOptions, formParameters).then( function (success) { //Any Specific action to be performed console.log(success); }, function (error) { //Any specific action to be performed console.log(error); }); } }; Step 4 : After updating the value and saving the form a quick create form opens up with some of the fields filed out. We get the value of the fields using the formContext.getAttribute(“fieldname”).getValue(); The successCallback and errorCallback are optional. In the Unified Interface the successCallback and the errorCallback function will be executed only if the we are opening the quick create form. Step 5: As seen in the image below we make some changes to the contact form and save the changes. After saving a new contact quick create form opens up with the first name, last name and job title fields filled. Here in our case we have specified entityFormOptions[“useQuickCreateForm”] = true; If this property is not set a normal form open’s up with the values filled in the fields in the same window. If we want to open the new record in a new window we should specify entityFormOptions[“openInNewWindow”]= true which is a Boolean value and it is an optional field. Step 6: If we want to open a specific record we just specific the following entityFormOptions[“entityName”]=”account” entityFormOptions[“entityId”]=”Specify Guid Here” Hope this helped!
Share Story :
Commands to Create .bacpac file from Azure SQL to SQL Server
Introduction: This topic explains how to export a Microsoft Dynamics 365 for Finance and Operations, Enterprise edition database from an environment that is based on Microsoft Azure. Steps: 1. Create a duplicate of the source database. <“CREATE DATABASE MyNewCopy AS COPY OF axdb_mySourceDatabaseToCopy”> To monitor the progress of the copy operation, run the following query against the MASTER database in the same instance. 2. Run the Sql Server script to Prepare the database. –Prepare a database in SQL Azure for export to SQL Server. –Disable change tracking on tables where it is enabled. declare @SQL varchar(1000) set quoted_identifier off declare changeTrackingCursor CURSOR for select ‘ALTER TABLE ‘ + t.name + ‘ DISABLE CHANGE_TRACKING’ from sys.change_tracking_tables c, sys.tables t where t.object_id = c.object_id OPEN changeTrackingCursor FETCH changeTrackingCursor into @SQL WHILE @@Fetch_Status = 0 BEGIN exec(@SQL) FETCH changeTrackingCursor into @SQL END CLOSE changeTrackingCursor DEALLOCATE changeTrackingCursor –Disable change tracking on the database itself. ALTER DATABASE — SET THE NAME OF YOUR DATABASE BELOW MyNewCopy set CHANGE_TRACKING = OFF –Remove the database level users from the database –these will be recreated after importing in SQL Server. declare @userSQL varchar(1000) set quoted_identifier off declare userCursor CURSOR for select ‘DROP USER ‘ + name from sys.sysusers where issqlrole = 0 and hasdbaccess = 1 and name <> ‘dbo’ OPEN userCursor FETCH userCursor into @userSQL WHILE @@Fetch_Status = 0 BEGIN exec(@userSQL) FETCH userCursor into @userSQL END CLOSE userCursor DEALLOCATE userCursor –Delete the SYSSQLRESOURCESTATSVIEW view as it has an Azure-specific definition in it. –We will run db synch later to recreate the correct view for SQL Server. if(1=(select 1 from sys.views where name = ‘SYSSQLRESOURCESTATSVIEW’)) DROP VIEW SYSSQLRESOURCESTATSVIEW –Next, set system parameters ready for being a SQL Server Database. update sysglobalconfiguration set value = ‘SQLSERVER’ where name = ‘BACKENDDB’ update sysglobalconfiguration set value = 0 where name = ‘TEMPTABLEINAXDB’ –Clean up the batch server configuration, server sessions, and printers from the previous environment. TRUNCATE TABLE SYSSERVERCONFIG TRUNCATE TABLE SYSSERVERSESSIONS TRUNCATE TABLE SYSCORPNETPRINTERS –Remove records which could lead to accidentally sending an email externally. UPDATE SysEmailParameters SET SMTPRELAYSERVERNAME = ” GO UPDATE LogisticsElectronicAddress SET LOCATOR = ” WHERE Locator LIKE ‘%@%’ GO TRUNCATE TABLE PrintMgmtSettings TRUNCATE TABLE PrintMgmtDocInstance –Set any waiting, executing, ready, or canceling batches to withhold. UPDATE BatchJob SET STATUS = 0 WHERE STATUS IN (1,2,5,7) GO 3. Export the database from Azure SQL cd C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin SqlPackage.exe /a:export /ssn:.database.windows.net /sdn:MyNewCopy /tf:D:\Exportedbacpac\my.bacpac /p:CommandTimeout=1200 /p:VerifyFullTextDocumentTypesSupported=false /sp:EG=ajgU8!Fx=gY /su:sqladmin Where : ssn (source server name) – The name of the Azure SQL Database server to export from. sdn (source database name) – The name of the database to export. tf (target file) – The path and name of the file to export to. sp (source password) – The SQL password for the source SQL Server. su (source user) – The SQL user name for the source SQL Server. We recommend that you use the sqladmin
Share Story :
Keeping tasks flexible in duration in Dynamics PSA
Overview: Auto Scheduling in PSA’s WBS books the hours when you enter the dates and dates when you enter the hours. They are interlocked. I want to schedule a task which is less in no. of hours but will span across more than expected duration of period. Such requirement is when signing a support contract with the client. Scenario While defining WBS for a Project called Abby’s D365 Implementation. I want to schedule a UAT task to span across over 10 which has only 22 hours. If I select the days as 3, I get my 22 Hours. Or select hours as 22, I get 3 days. But then, I can’t change the same to extend for more days. If I select the desired 10 days, I get 80 hours.Hence, I’ll toggle the Task Mode to Manual. Now, I can keep my Effort Hours and Duration as desired. To represent Manual mode, the icon changes to Calendar with a Pencil on it. That’s how you can keep flexible hours for the tasks you want to expand over a long duration.
Share Story :
Create Record in CRM using PowerApps with Microsoft flow
A fiber optic link service organization utilizes the application to react to blackouts by dispatching specialists to issue zones. An in-home medical care specialist organization utilizes the application to timetable and dispatch medical services laborers to direct medication and other considerations to various patients. A facility manager uses the Dynamics 365 Field Service management software to deliver maintenance and repair services for heating and cooling equipment. A medical device manufacturer sells machines to hospitals and clinics and uses the application to manage maintenance services over the lifetime of the machinery. Customer Service will typically use the desktop application to prioritize different requests so that work orders and on-site visits can be created from cases. Service Managers will use the software to oversee service delivery and track performance metrics over time. Introduction: This blog explains how to create Record in CRM using PowerApps with Microsoft flow. Steps to be followed: Create Blank App. Insert Label, Text Input and Button controls.(Fields which you want to create in CRM.) Select the Button (Add To CRM) and go to Action –> Flows. Click on Create a New Flow. Click on New step –> Add an Action. Select Dynamics 365 –> Create a new record. Enter the Organization Name and Select the Entity for which you want to create record in CRM. For Last Name, click on “Ask in PowerApps”. Repeat for Email and First Name. For Description we will add text. Give Name to the flow and Create Flow. Now change the OnSelect Property of button.(here lastname, firstname and email are the name of text input control) Enter Details and Click on Button. Record will get created in CRM.Description:
Share Story :
Finally a CRM that improves my productivity!
As a Sales professional all my life I have used several CRMs. This includes my experience using Homegrown CRM, no CRM (Excel Spreadsheet), Salesforce Automation and now finally Microsoft Dynamics 365 for Sales. It has been about 2 months that I am using it and without a doubt, D365 steals the show! CRMs have been disliked by sales professional because they seem to be more of a data entry job than a one focused towards helping people become more productive, one that throws more insights and one that makes life easier. All of this is what every CRM promises to do but don’t very much end up achieving. Most of the time people end up duplicating their jobs and hence don’t find it useful. But not anymore with D365 for Sales! Let me tell you why? A sales professional spends maximum time on the below 3 tools in the following order: Email CRM and/or LinkedIn LinkedIn and/or CRM 1) Email: A lot of communication happens on email which the CRM fails to capture. One key Differentiator in D365 for sales is the Email Tracking feature. All you will have to do in your outlook is to click on ‘Dynamics 365’ and it opens the same opportunity/lead in D365 CRM. Then click ‘Track’ and all the emails get tracked against that opportunity. It is so useful that you don’t have to spend your precious time in searching old emails. Even if an account manager leaves the job, the successor can just reply on systems to track every bit of communication. 2) Another beautiful feature that will soon release is how all your contacts within the CRM will show up LinkedIn profiles. This will help to prepare for your meetings by tracking your prospects activities, likes etc. and customize your communication. Your manager too can prepare for the meetings by just looking up the CRM! A sales Leader can completely rely on CRM for reviewing his/her teams as all the information needed is present here. You can derive all the insights that you need to make data driven decisions. Your organization is now truly dependent on technology. Apart from this AI and ML are soon going to aid D365 CRM with features like Predictive Lead scoring, Relationship health and Social Intelligence all to make you a smarter than ever sales consultant! Well these features have made my life simpler. I can truly say that MS Dynamics 365 for sales is the tool that really offers Value. The seamless integration and Unified systems that we keep hearing is what you can experience for real. You may reach out to me on pkakrania@cloudfronts.com would you like to make a smarter choice for your Sales Organization and derive true productivity.
Share Story :
Error while importing solutions using Package Deployer
Introduction: Package deployer is used to simplify the deployment process. It has the ability to automate the import of one or more solution.In this blog we will discuss about the error “Verify the state of the solution in CRM” which is shown while importing solution using package deployer. Implementation: Step 1: In the ImportConfig.xml file we give the name of the solutionpackagefilename, that is the name of our solution. Step 2: Then we build the project and copy the folder containing the solution and the Package.dll file created. Step 3: Then we run the Package Deployer application and connect to the organization the below screen shows the solution is successfully unpacked. But after clicking Next when the solution is imported the error shown is as follows. Step 4: In the Log file we can see that the import was not successful due to the missing dependencies. Once the missing dependencies are added the solution is successfully imported using the package deployer . The missing components can be verified if the solution is imported manually.
Share Story :
Configure Network Printers for Print Management in D3FOE
Introduction: I faced an issue recently where I was trying to print a report directly to printer but Print Management Settings didn’t show any Printers option. In AX 2012 we had to perform setup in AX 2012 Server Configuration to print documents or report to connected printers. In Dynamics 365 for Finance and Operations, Enterprise Edition you need to install and setup Document Routing Agent in your system and activate Network Printers in D3FOE for printing. Steps: Install Document Routing Agent. Setup Printers in Document Routing Agent. Manage Network Printers in D3FOE. 1. Install Document Routing Agent. Go to Organization Administrator -> Setup -> Network Printers In Action Pane, Go to Application -> Download document routing agent installer Install downloaded setup file ‘DocumentRoutingAgentSetup’. 2. Setup Printers in Document Routing Agent. Go to Settings and enter details. Click OK. Application Id – Unique Appication Id. It is filled automatically. Dynamics 365 URL – URL of D3FOE Azure AD Tenant – Domain name of Azure Active Directory Run as Windows Service – This will configure agent as a windows service. If you want to print custom size reports then agent should be desktop app as it sends report to Printers with help of Adobe Reader instead of sending it to Target folder. Agent as service will send it to Target folder. Sign In with your logic credentials. Go to Printers. You can see the installed Printers on your device. Select the Printers you want to enable for printing in Operations. 3. Manage Network Printers in D3FOE. Go to Organization Administrator -> Setup -> Network Printers. You will see the list of Printers enabled on Document Routing Agent. Enable the printers by setting Yes for Active field. Conclusion: Once the setup is completed you can use the Network Printers from Print Destination – Printers option. Agent once installed on one machine and enabled as Network Printers can be used by anyone using the D365 Operations.
Share Story :
Quantity Adjustment – On Hand Inventory : D365 Finance & Operations
Introduction: Quantity adjust functionality is useful to adjust the Quantity of Inventory from ‘On hand inventory’ form. Steps: Navigate to Product Information management > Products > Released Product In released Product form, select the product for which you want to adjust the Quantity. On Manage Inventory action tab, click on ‘On Hand inventory’ button. On ‘On Hand inventory’ you can check available quantity. Click on Quantity adjustment button to adjust the quantity. On Counting form, select Inventory dimensions, tracking dimensions which are required. In Quantity field, specify the quantity. you can decrease the quantity by specifying it into negative and increase the quantity by specifying it into positive. Once quantity has been specified click on OK button. Now you can check adjusted quantity on ‘On Hand Inventory’ form. Conclusion: By using Quantity adjustment functionality, you can directly adjust inventory quantity on ‘On Hand Quantity’ form without using counting journal, Inventory adjustment journals.
Share Story :
Process to Provision Target Tool in Dynamics 365 Finance and Operations
Introduction: When Copying a database between environments, you will need to run the Environment Re-Provisioning tool before the copied Database is fully functional, to ensure that all the Retail Components are up-to date. Steps: Steps to Process Re-Provisioning Tool: 1. Log into your LCS Project. 2. Go to Asset Library. 3. Select “Software Deployment Package”. 4. Click on Import. 5. Select “Environment Provisioning Tool”. 6. Click Pick. 7. Once this Package is available in your Asset Library, Upload this package to your system and schedule it to run as you do for any other deployable package. 8. Go to Maintain and Apply updates.
Share Story :
Xrm.Panel in D365
Overview Xrm.Panel is a new additional to the client-side scripting in Dynamics 365. This feature is still in preview in the D365 December 2016 update. Panel is a simple static place on your D365 web client which loads a Web Page inside it. Perhaps, the best use of the same could be a Web Chat application implementation. Implementation Simple – I’ve made a JS Web Resource that has a function to call the Xrm.Panel.loadPanel(url, title); method and I’ve invoked the same on change of a Phone Number. Here’s a simple JS snippet I’ve written: oAccountCustomization = { loadPanel: function() { “use strict”; Xrm.Panel.loadPanel(“https://cft89.crm.dynamics.com//WebResources/new_SamplePage”, “Hello”); } }; And redirected it to another HTML page in my own D365. Then, I’ve added this to the onChange of the PhoneNumber on the Account record. And saved and Published the customization. Seeing it work: Now, when I change the Phone Number field on the Account, the slider appears on the right hand side of the page. You can click on the arrow to bring it in focus. Here we go! The Panel is now seen. Remember, this works only on the Web Client.