Category Archives: Dynamics 365
Creating an Email activity in MS CRM through WebApi
Introduction: This blog explains how to Create an Email activity in MS CRM through WebApi Request: Post URL: <your instance url>/api/data/v9.1/emails Header: Content-Type: application/json Prefer: return=representation Body: 1. Creating Email with resolved emails (To field of email is record in MS CRM). { “description” : “Email Created”, ///Email Body “regardingobjectid_account@odata.bind” : “/accounts(69C38067-EDB7-E811-A961-000D3A363C81)”, “subject” : “Test Email Creation”, “email_activity_parties” : [ { “partyid_systemuser@odata.bind” : “/systemusers(CED2E02D-188E-4AA8-B6E2-D746E9B370C1)”, “participationtypemask” : 1 ///From Email }, { “partyid_account@odata.bind” : “/accounts(69C38067-EDB7-E811-A961-000D3A363C81)”, “participationtypemask” : 2 ///To Email }] } 2. Creating Email with unresolved emails (To field of email is not record in MS CRM). { “description” : “Email Created”, “regardingobjectid_account@odata.bind” : “/accounts(69C38067-EDB7-E811-A961-000D3A363C81)”, “subject” : “Test Email Creation”, “email_activity_parties” : [ { “partyid_systemuser@odata.bind” : “/systemusers(CED2E02D-188E-4AA8-B6E2-D746E9B370C1)”, “participationtypemask” : 1 }, { “addressused”:”vvyas@cloudfronts.com”, “participationtypemask” : 2 } ] } 3. Creating Email with multiple unresolved emails (To field of email is not record in MS CRM). { “description”: “Test Email”, “regardingobjectid_account@odata.bind”: “/accounts(69C38067-EDB7-E811-A961-000D3A363C81)”, “subject”: “Update Your Phone Number”, “email_activity_parties”: [ { “partyid_systemuser@odata.bind”: “/systemusers(CED2E02D-188E-4AA8-B6E2-D746E9B370C1)”, “participationtypemask”: 1 }, { “addressused”:” vvyas@cloudfronts.com”, “participationtypemask”: 2 }, { “addressused”:” smahato @cloudfronts.com”, “participationtypemask”: 2 } ] }
Share Story :
Time entry using model driven PowerApps
Introduction: Managers and employees need a good time entry application to record worked hours for billing, payroll, or operations. That information is used to automate payroll, invoice clients, and keep a business operating efficiently. While there are many good off the shelf time entry applications, the pre-built time entry capabilities of the model-driven approach in PowerApps provides a no-code or low-code component-based approach to facilitate the development of such an application development atop the Common Data. Model-driven apps run with the new Unified Interface client, which provides a responsive and accessible design running in browsers and on popular mobile devices. This app type composes multiple component types including dashboards, forms, views, charts, and business processes which together form a great UI. In this article we will explore the steps to set up your own time entry application in PowerApps using the existing Time Entry entity. Steps Select the environment you want or go to the PowerApps admin center to create a new one. Go to solutions, click on the “+ New Solution” button and enter the required details for creating a new solution and then click on “Create” option. In the solution, click on “New” and go to “App” and select “Model Driven Apps“. Enter the app name, description, image and the link to access the app designer. Add components to the app: Select the “Open the Site Map Designer”arrow to open the sitemap designer. On the sitemap designer select the new subarea and in the right pane select the properties tab. Then select the following properties: Type: Entity Entity: Time Entry On the app designer canvas select “Forms”, and then on the right pane under the Main Forms group select the “Time Entry Form”. On the app designer canvas select “Views”, and then select “My Time Entries By Date”. On the app designer toolbar, select “Save“. The App can now be validated to check for any error. The time entry entity is dependent on many other entities which will be shown as dependencies to be added during the validation process. All these entities need to be added so as to indicate all the resources, projects, tasks for each project and ensure they are shown properly. Now save and publish the application and you can directly execute the app from the app designer itself, by clicking on the “Play” button. Working with the new app: To work with your new time entry app, download the on your mobile device and login with the credentials into the time entry application as shown below. You can enter a new time entry by clicking on the “New” button, which can be accessed within the menu area. A message box is displayed and the status of the time entry changes to submitted. An existing time entry can be recalled for modification using the “Recall” button icon and a message box is displayed and the status of time entry changes to draft. For time entries such as absence or vacation, manager approval is required. Thus, when you type in absence or vacation it is mandatory to enter the manager name and an approval request is sent to the manager. When the manager name is included, the time entry is submitted and the approval request goes to the manager, who can either approve or reject the request. The status of the time entry changes to approved, when the manager completes the approval process. All the respective time entries managed via your Time Entry app are reflected in the Dynamics 365 Project Service Automation first-party app if it is in use. To share the model-driven application among multiple users, go to the solution and on the app select the share option. Conclusion Pros for model-driven PowerApps: The model-driven application approach for building PowerApps is much simpler as compared to the canvas apps. Model-driven apps can be from the Dynamics 365 first-party applications, which also makes it easy to use. It is helpful in creating your own data source from scratch, using the Common Data Service as the foundation. The Unified Client Interface means your app will look the same whether it is being viewed on a phone, tablet or desktop. Cons of model-driven PowerApps: The model-driven approach does not have a flexible interface, thus in such cases where we need to customize, the canvas PowerApps approach is recommended. It does not provide flexibility with development of functions and controls. There are still problems to solve with the time entry app described in this article. In particular, the time entry has a field date of the data type Date-Time which is set to the UTC time zone, thereby resulting in time entries based on UTC time zone. The solution to the above problem is as follows: Set the field as time zone independent. The change is permanent. Enter the time along with the date so as to get the entries on their proper day.
Share Story :
Ability to send to Unresolved Email Address in D365 Email
Most new users get stuck with issues saying ‘Email address of the recipient was not resolved’. Like in case you want to send out an email from D365 but you don’t have the same saved in the system as a Contact/Lead or any other record. And it resulted in this the big red cross like the one below – There’s a simple setting for this in Settings > Administration > System Settings, under Email tab. You can simply flip the switch on ‘Allow messages with unresolved email recipients to be sent’ to Yes. And, now simply enter the Email address in the Recipient (To) field and let the email go! Hope this quick tip was helpful!
Share Story :
Delete those records which were imported by mistake
Introduction: One of the most common blunders often made in Data Import are importing whole lot of records without finalizing. And when you import, you realize you needed to add something more to the Import or some things were pending in the Excel file and you ended up uploading them all! Delete Imported Records: Assuming your Import was successful and you want to now just revert what all was imported, navigate to Settings > Data Management > Imports. Open the Import job and look for the option under Delete which says ‘All Records Imported to This Entity During This Import’ And the button label is self-explanatory. Once you click on it, a Delete Job is triggered once you fill in the below information And once you click OK, a Delete Job will run in the background to delete the data that was imported. Navigate to Settings > Data Management > Bulk Record Deletion and open the Delete Job that you started in Step #3 above – Also, if you selected ‘In addition to deleting imported records, delete import job history’, the Import Job record will also be deleted. So, it will be No. of records imported + 1.
Share Story :
Migrating Activities Of Type ‘Case Resolution’ Between Two Microsoft Dynamics CRM Environments
Introduction: While migrating Cases, the migration of activities of type ‘Case Resolution’ is necessary. However, the complexity in migrating this increases due to the fact that when the status of a case is updated, a blank case resolution activity is created automatically by the system. This system-generated case resolution needs to be deleted as this would result in each case having two case resolution activities after migration – one system-generated and one with the correct migrated data from the source. Solution: To tackle this issue, one must follow the following steps during migration: 1. Send all Cases (no matter what the status in the source environment) to the target with their status as ‘Open’. 2. Send all related activities to the target environment. 3. Update the case status in the target environment to its status as in the source environment. 4. For cases with status ‘Resolved’, a system-generated case resolution activity will be created. 5. In your case resolution migration map, first add a step to delete the existing case resolution in the target and then insert the case resolution from the source environment. 6. Now your case with status ‘Resolved’ will have only one case resolution and that will be the one migrated from the source environment with the correct data. Conclusion: Above steps shed some light on how to preserve the integrity of case resolution activity data in your target environment during data migration.
Share Story :
Issue : Database Sync Error while applying deployable packages or Updates.
Issue : Database Sync Error while applying deployable packages or Updates. Usually the Database sync error occurs at step 11:GlobalUpdate script for service model: AOSService on machine: —- Follow the steps to resolve the issue and resume the deployment. In this environment, go to Environment Monitoring –> SQL INSIGHTS –> ACTIONS tab In List of Actions, choose “Drop index” In Parameters, input “I_6640RECID” and “BANKIBANCOUNTRYACCOUNTSTRUCTURE” in Index name & Table name respectively. Choose Execute to drop the index then resume deployment.
Share Story :
Issue: Void Transaction Appears in show journal in POS for Dynamics 365 for finance and Operations 8.1
Issue: Void Transaction Appears in show journal in POS for Dynamics 365 for finance and Operations 8.1 When the system is upgraded to dynamics 365 finance and operation version 8.1 the user will observe that all the void transactions appear in Show journal. This bug is resolved as “By Design” means this is the expected behavior to show voided transaction with return button disabled If the voided Transactions are being returned you need to apply the APPMU general application 8.1.2 update and this will resolve the issue! On application of this update the user will not be able to return the voided transaction.
Share Story :
Rename Dynamics 365 Sales Entity
Introduction: This blog explains how to rename the Dynamics 365 Sales Entity Scenario: In this we will rename Account Entity To Company. Steps: 1. Rename the Entity. Go to your solution. Select the entity and change the Display Name and Plural Name of entity. Save and Publish your Customizations. 2. Export Translations Click on Translations –> Export Translations. Extract the downloaded .zip file. Open the CrmTranslations.xml file in Excel 3. Now we have to make changes in CrmTranslation file. Steps: a. Unprotect all the sheets. Go to Review tab –> Click on Unprotect Sheet button Repeat this for all the sheets. Information Display Strings Localized Labels b. Go to Display Strings Sheet Highlight the whole column C Find and Replace (or press Ctrl-H) Open Options on the Replace window and ensure that Match Case is ticked You need to replace the plural names first and then the singular names. Find – Accounts, Replace with – Companies Find – accounts, Replace with – companies Find – Account, Replace with – Company Find – account, Replace with – company c. Go to Localized Label sheet. Highlight the whole column D and repeat the steps performed in Display Strings sheet. d. Save the file. 4. Import Translation File Create .zip file. Make sure you select both the files and zip them rather than zip the folder. Go To solutions. Click on Translations -> Import Translations. Choose your .zip file and click import. Publish your Customization after Successful Import. Now you can see changes Account entity is renamed as Company.
Share Story :
Filter Customer Type field to display only Accounts in D365 V9.0 using JavaScript
Introduction: In this blog we will see how to filter customer type field in Dynamics 365 to only show Accounts/Contacts dropdown. Implementation: Step 1: For demonstration purpose we will filter to only show Accounts. In the below image we can see that we have a Customer type field which allows to choose from Contacts as well as Accounts. Note: Here accounts are called as Companies. Step 2: To display only Companies in the dropdown we register an event on Form Load. Here we are working on the Contacts form, hence we first write a JavaScript code to filter the lookup to show only companies. Below shown in the code: Code: var oContactFormCustomization = { setCustomerLookupToShowCompany: function (execContext) { var formContext = execContext.getFormContext(); if (formContext.getControl(“parentcustomerid”)) { var company = formContext.getControl(‘parentcustomerid’); if (company.getEntityTypes().length > 1) { company.setEntityTypes([‘account’]); } } }}; We add this script in CRM JS Web resource and add the library on the Contact form Properties Below shown is the Handler Properties Once this is done we can see when the form loads the scripts executes and we can now view only the Companies and not the Contacts Hope this helped!
Share Story :
Default Teams of other Business Unit can’t be added
I would like to share a consideration I take while designing Teams that you might need to make certain records shareable. I faced an issue once when users started to use Default Teams created on Business Units. And after several months, it occurred that some users from other Business Units too needed to be on that Team. And several records were already assigned to BU provided Default Teams. Scenario Priyesh belongs to Southeast Asia BU and Somesh belongs to North America BU. Some records were assigned to North America team which is the Default Team created by BU. Priyesh wanted to be in the North America team and hence the user tried to add him in that Team. So adding North America to Teams under the user Priyesh, but I get the below error – That is because you cannot add Default Teams to users in some other BUs. As a workaround, I only created a new Team and named it “<BU Name> – Shareable” team and assigned records to this team so that I know where I want the records to be visible as per my Security Roles setup. And hence, added the North America – Shared team for Priyesh. I would also like to hear your suggestions and any workarounds you may have. Thanks! 😊
