Category Archives: Dynamics 365
Booking resource on a Project Task or a Service Ticket in PSA
Successful and on time delivery of the project is the heart of the business for any professional services organization. Where services based projects are delivered. In order to ensure successful project delivery efficient tools and industries based practises needs to be implemented which is possible through Microsoft Dynamics 365 Project Service Automation. Project service automation is not very easy and not something that anyone can do. By using services automation project managers have been able to deliver projects of various sizes. For industries best practices and efficient project management the set up of PSA is very much required. Apart from the above aspects, project service automation also helps to manage time and budget of the billable projects as well as estimate the quote for the project. Introduction: PSA doesn’t have the capability OOB to do the allocation’s over the task. This means the resource booked are booked for a project and we cannot identify what task they are going to perform or are booked for. How to do? This is the real time scenario which a PM regularly comes up with while allocating. To this I have figured out a solution that can be worked upon. Write a Plugin to create a Resource Requirement record on creation of Project Task in the WBS. In schedule board expose Project task Entity to be visible. This will allow you to drag and drop the allocations on to the schedule board. But, the challenge here is that the Project Tasks doesn’t comes automatically in the above grid. It comes because of the Plugin written above to create a record of Resource Requirement. Ensure the plugin will take care of the updates made to the task and will update the Resource Requirement record simultaneously. In our organisation we also, allocate resource on cases that the clients have raised. For the same, we will have to write a workflow to create a task in WBS as soon as a case is created. On the creation of a task we already have a plugin written to create a Resource Requirement record. You can then allocate Resources on cases.
Share Story :
PSA – Import project lines from WBS Pre-Requisites
Introduction: I often face difficulties while trying to import project lines from WBS while using PSA (Project Service Automation). After lot of trouble shooting I try to doubt my configuration and see if they are good. What to do? To my surprise they all appear to be good. Following two things needs to be ensured to import project lines from WBS into Quote line details. 1. On Account used in the Quote, Product Price List and Project Price list is properly set. 2. The Cost Price list attached to the Organisational Unit used in the Quote should not have Organisational units for the resource roles added in the Cost Price List of the Organization unit.
Share Story :
Call Workflow directly from a button using Ribbon Workbench
Introduction: In this blog we will demonstrate how to call a workflow directly from a button without any custom JavaScript code. Implementation: Step 1: Create the required workflow. In this example i have created a simple workflow on the opportunity and remember to select the “As an on-demand process” option. Step 2: After the workflow is created store the GUID of the workflow. To get the GUID select the workflow and copy down the ID from the URL as shown in the below image. Step 3: Now create the custom button on Opportunity entity using Ribbon Workbench. Step 4: Create a new Command and click on “Add Action>JavaScript Action” as shown in the image. Step 5: In the library option write the following “/_static/_forms/form.js” and in the Function Name field “Mscrm.FormAction.launchOnDemandWorkflowForm“. Then as shown in the above image add two Parameters as follows: Crm Parameter = PrimaryEntityTypeCode String Parameter = “GUID of the Workflow”. Step 6: For the final step add the command to the newly created button by simply selecting it from the drop down in the properties section. Step 7: Now when we click on the button that we created we get the following message. On clicking OK the workflow will run. This is a helpful as it can be done quickly without using any custom code.
Share Story :
Invoice Schedule generation on Quote Lines – D365 PSA
Overview: Let’s say you have a Quote which has Quote Lines and then you generate the Invoice schedule for your Time & Materials project. What decides the number of Invoice Schedules to be generated for a Quote Line record? Let’s review. Quote Lines: Now, I have a Quote Line which has Invoicing Schedule from 28th May 2018 to 6th August 2018. How did this come to be? The reason is as below: 1. The Invoice Schedule is based on Quote’s Requested Delivery Date which is 10th August 2018. 2. Now, my Invoice Frequency is weekly. 3. On top of that, my Invoice is set to generate on Monday of the week 4. And finally, since 6th August is the last Monday before the 10th August 2018, the Invoices should be generated up until then! Hence, the last Invoice will be generated on 6th August 2018 according to Quote’s Requested Delivery Date.
Share Story :
Store Coupon Code in Dynamics 365 Finance and Operations
Introduction: In this blog we will see how to apply coupon discount on MPOS (Store) in Dynamics 365 for Finance and Operations. Steps: Step 1: Create Bar code Mask Character for Coupon Code. Step 2: Create a New Barcode Mask set up. Keep the type as Coupon. Step 3: Create Bar Code for Coupon. Assign the Mask ID which was created in step 2. Step 4: Create Number Sequence for Coupon Code ID and Coupon Number. Step 5: Set the Retail Parameters for Coupon. Assign the Mask ID that was created. Step 6: Create a New Discount. Mention the discount Price, Products in Lines, Price group, Valid Discount Account and enable coupon code required. Step 7: Create a new Coupon. Mention the usage limit, usage type, associate discount to the coupon, Create a new line for coupon. Activate the Coupon. The Bar code will be generated. Make a note of the Bar code. This is how you set up Coupon Code on Stores in Dynamics 365 for Finance and Operations. Run Jobs and flow the discount to the store. To Redeem the Store Coupon Code: Step1: Scan the product that is under Discount. Step2: Scan the Barcode or Manually inter the Barcode. Step 3: The discount will be applied to the product along with the discount name Step4: Make Payment.
Share Story :
Commands to Import .bacpac file to D3FOE SQL Server
Introduction: This blog article will explain how to import a .bacpac file to Microsoft SQL Server which is created from Finance and Operations database that is based on Azure SQL Server. You can refer steps here for creating .bacpac file. Following points are recommended for smooth and secure importing of .bacpac file Take a backup of existing database so you can revert if required. Import the database with a new name and modify it later once the entire process is completed error free. Copy the .bacpac file to local computer where you want to import the database for better performance. Steps: Run command prompt as an administrator. Run the below command to Import the database. cd C:\Program Files (x86)\Microsoft SQL Server\130\DAC\bin SqlPackage.exe /a:import /sf:D:\Exportedbacpac\SSProd.bacpac /tsn:localhost /tdn:SSProd /p:CommandTimeout=1200 where, tsn (target server name) – The name of the SQL Server to import into. tdn (target database name) – The name of the database to import into. The database should not already exist. sf (source file) – The path and name of the file to import from. Update the database: Run the following script against your database to add the users you deleted while creating .bacpac file. Update your database name in Alter Command. CREATE USER axdeployuser FROM LOGIN axdeployuser EXEC sp_addrolemember ‘db_owner’, ‘axdeployuser’ CREATE USER axdbadmin FROM LOGIN axdbadmin EXEC sp_addrolemember ‘db_owner’, ‘axdbadmin’ CREATE USER axmrruntimeuser FROM LOGIN axmrruntimeuser EXEC sp_addrolemember ‘db_datareader’, ‘axmrruntimeuser’ EXEC sp_addrolemember ‘db_datawriter’, ‘axmrruntimeuser’ CREATE USER axretaildatasyncuser FROM LOGIN axretaildatasyncuser EXEC sp_addrolemember ‘DataSyncUsersRole’, ‘axretaildatasyncuser’ CREATE USER axretailruntimeuser FROM LOGIN axretailruntimeuser EXEC sp_addrolemember ‘UsersRole’, ‘axretailruntimeuser’ EXEC sp_addrolemember ‘ReportUsersRole’, ‘axretailruntimeuser’ CREATE USER axdeployextuser WITH PASSWORD = ‘<password from LCS>’ EXEC sp_addrolemember ‘DeployExtensibilityRole’, ‘axdeployextuser’ CREATE USER [NT AUTHORITY\NETWORK SERVICE] FROM LOGIN [NT AUTHORITY\NETWORK SERVICE] EXEC sp_addrolemember ‘db_owner’, ‘NT AUTHORITY\NETWORK SERVICE’ UPDATE T1 SET T1.storageproviderid = 0 , T1.accessinformation = ” , T1.modifiedby = ‘Admin’ , T1.modifieddatetime = getdate() FROM docuvalue T1 WHERE T1.storageproviderid = 1 –Azure storage ALTER DATABASE [<your AX database name>] SET CHANGE_TRACKING = ON (CHANGE_RETENTION = 6 DAYS, AUTO_CLEANUP = ON) GO — Begin Refresh Retail FullText Catalogs DECLARE @RFTXNAME NVARCHAR(MAX); DECLARE @RFTXSQL NVARCHAR(MAX); DECLARE retail_ftx CURSOR FOR SELECT OBJECT_SCHEMA_NAME(object_id) + ‘.’ + OBJECT_NAME(object_id) fullname FROM SYS.FULLTEXT_INDEXES WHERE FULLTEXT_CATALOG_ID = (SELECT TOP 1 FULLTEXT_CATALOG_ID FROM SYS.FULLTEXT_CATALOGS WHERE NAME = ‘COMMERCEFULLTEXTCATALOG’); OPEN retail_ftx; FETCH NEXT FROM retail_ftx INTO @RFTXNAME; BEGIN TRY WHILE @@FETCH_STATUS = 0 BEGIN PRINT ‘Refreshing Full Text Index ‘ + @RFTXNAME; EXEC SP_FULLTEXT_TABLE @RFTXNAME, ‘activate’; SET @RFTXSQL = ‘ALTER FULLTEXT INDEX ON ‘ + @RFTXNAME + ‘ START FULL POPULATION’; EXEC SP_EXECUTESQL @RFTXSQL; FETCH NEXT FROM retail_ftx INTO @RFTXNAME; END END TRY BEGIN CATCH PRINT error_message() END CATCH CLOSE retail_ftx; DEALLOCATE retail_ftx; — End Refresh Retail FullText Catalogs Run the re-provision tool: To ensure Retail components are functional run the re-provision tool. Find steps here on how to run the tool. Start using the new database: Stop the below service to switch the database. World wide web publishing service. Finance and Operations Batch Management Service. Management Reporter 2012 Process Service. Once the services are stopped, rename your original database to ‘AxDB_orig’ and the new database to ‘AxDB’. Restart the service. Conclusion: This is how you can create a new database and import the data from a .bacpac file. If you face any issue then you can switch to original database or restore the copy of original database created prior to import.
Share Story :
[Solved] – Backspace not working in HTML Web Resources
Issue: When we use a HTML web resource in Dynamics 365 CRM forms or even as a separate navigation, we sometimes face issue that Backspace on Text boxes do not work. Why this happens: This happens because in Custom HTML web resources, we add reference to “ClientGlobalContext.js.aspx”. We need this library to gain access to the global context information such as the information specific to the client, organization or user for your Customer Engagement instance* When we use this library, we get issues with backspaces on text boxes where Input type is not “text”. So if the HTML Input type is “number”, “search”, “tel” or anything else Resolution: Resolution 1: This can be solved by changing the Input type as “Text” for all input textboxes. Then backspace will start working. But this may not be applicable in all scenarios, since it will remove some of the functionality that was intended. In that case, you can use Resolution #2 below. Resolution 2: I have been able to resolve this issue by running the following code on DOM ready: if (window.Sys && window.Sys.UI && window.Sys.UI.DomEvent && window.Sys.UI.DomEvent.prototype) { window.Sys.UI.DomEvent.prototype.preventDefault = function() { }; window.Sys.UI.DomEvent.prototype.stopPropagation = function() { }; } This will allow you to still use the functions that ClientGlobalContext provides, while keeping it from interfering with your key and mouse events. Credit: Stefan Boonstra * ClientGlobalContext.js.aspx (Client API reference) Happy CRMing!
Share Story :
Dynamics 365 Tip: Sending Emails using Unified Interface
Introduction: The unified client which was released D365 V9 had a very refreshing UI and lots of features. One of the best features in Unified Interface was Timeline view, but the timeline view did not have ability to send emails. The Unified client has a new Email UI with rich text controls and advanced editor. This was not released till recently. So the new environments after v9.0.1.xx have the ability to send emails using the Unified Client. Now you can send Emails using Unified Client like below: Modern Email Editor: Below are some of the features of new Email Editor: Designer, HTML and Preview tabs will allow users to view and format the content across different form factors. A bunch of controls and features provided like advanced styling, linking, find and replace, and insert images and tables will be made available on the email activity and will allow users to format the email instead of relying on external tools or solutions. Note: The Email Editor is not available on D365 Phone App and App for Outlook. It will show all other activities but not email.
Share Story :
Filtering Records on BPF unlike on Form – D365
Introduction: Working with D365 is best when you’re trying to use as much OOB stuff as possible. Simplest configurations like selecting a view for your Lookup field is easily possible on the D365 Form. However, this is not possible on the fields on the Business Process Flow Use of addPreSearch() and addCustomFilter() on BPF Fields: Now, since you have this field on the BPF and want to add filter to Lookup records, you’ll need to use JS customization to achieve this and add your filter’s criteria in the code to show results as expected. Let’s say you see all the lookup records on the field on the BPF 2. I want to see only Semi Annually type of Plans on the Lead. And I can’t simply do this from the Field’s Properties like on the form. Because, it’s not available. 3. Hence, I’ll write JS code as follows to achieve this: // JavaScript source code var oOFFormCustomization = { preFiltering: function () { “use strict”; if (Xrm.Page.getControl(“header_process_cf_defaultplan”) != null) { Xrm.Page.getControl(“header_process_cf_defaultplan”).addPreSearch(oOFFormCustomization.preSearchProductFamily); } else return; }, preSearchProductFamily: function () { “use strict”; var fetchQuery = ‘<filter type=”and”> <condition attribute=”cf_plantype” operator=”eq” value=”979570001″ /><condition attribute=”statecode” operator=”eq” value=”0″ /></filter>’; Xrm.Page.getControl(“header_process_cf_defaultplan”).addCustomFilter(fetchQuery); } }; 4. And I register the method on Page Load of the Form. 5. And I see these results once it successfully filters!
Share Story :
Filter records in gallery control based on value selected in other gallery control in PowerApps.
Introduction: This blog explains how to Filter records in gallery control based on value selected in other gallery control in PowerApps. Scenario: I am using Dynamics 365 Connection. I have data source named as Time Entry within that data source I have fields named as Projects and Project task and data type of both fields is lookup. Values in Project Task is filtered based on value selected in Project field. Implementation Steps for Filtering Project Task based on Project: We must add Projects and Project Task data source in PowerApps because their data type is Lookup.(If you don’t know how to work with lookup fields Refer: https://www.cloudfronts.com/connect-dynamics-365-use-lookup-field-dynamics-crm-powerapps/ ) Add New screen name it Project Lookup and add gallery control on that screen. Select gallery control and set its item property to:SortByColumns(Search(Filter(Projects,statecode=0 ), TextSearchBox1_1.Text, “cf_name”), “cf_name” ) Add new Screen and name it Project Task Lookup and add gallery control on that screen. Select gallery control and set its item property to:SortByColumns(Search(Filter(‘Project Tasks’, _cf_project_value =Gallery1.Selected.cf_projectid),TextSearchBox1_2.Text,”cf_name”),”cf_name”)here: Gallery1 is the name of gallery control on Project Lookup screen.
