Category Archives: Blog
Power BI Platform
Introduction: Microsoft has introduced a new platform to access the different app and analytics. You can access your different environment. 1. Power BI 2. Power apps 3. Flow Currently you might have opened few cases using this platform but there are lot more than that we can do. This is in preview mode can be available soon. Description: You can open the portal using below given URL “https://admin.powerplatform.microsoft.com/.” Once you open the portal you will be able to see the default page shown below. As you seen in the above screen shot it show open cases. Navigation menu As you can see the navigation menu contains the familiar components. Help and support This contains the cases open with Microsoft. Analytics This shows the analytics or various apps Environments User can easily navigate to the respective environment, as you can see in the below. Analytics Below details which can be viewed from the Common Data Service. Common Data Service Microsoft Flow As I don’t have any flow it is not showing anything. PowerApps Data policies You can develop your own data policies. Admin center You can navigate to the various application from the admin Center. Dynamics 365 Thi will navigate you to the Dynamics 365 instances. Microsoft Flow This will take you to the Microsoft Flows apps. Power Apps This will take you to the Apps associate with you organization. PowerBI You can view your PowerBI Reports.
Share Story :
Create Notes Attachment using WebAPI
Introduction: After the introduction of web API in CRM, user can execute all the requests which is possible through C# or JavaScript. In this blog I will explain how to attach a document to record using the postman. Description: Notes attachments has been tested with a custom entity and tested on Postman. To work this, you can follow the below blog to get the Access code. https://www.magnetismsolutions.com/blog/johntowgood/2018/02/12/dynamics-365-online-authenticate-with-user-credentials METHOD: POST URL: https://instancename.crm.dynamics.com/api/data/v9.1/annotations Authorization: Header: Content-Type:application/json In Authorization select the type Bearer Token Type and pass the token value which we got before. Body: You need to pass the below 4 parameters with value. Key Value subject Filename objectid_cf_document@odata.bind documentbody Json Body: { “subject”: “Test From Web API”, “filename”: “Untitled2.png”, ” objectid_cf_document@odata.bind “:”/cf_documents(23e6ee7c-5812-e911-a96b-000d3a3638df)”, “documentbody”:”iVBORw0KGgoAAAANS……….” } CODE: Postman Description: Image attached you need to pass it as base64 string as document body. var settings = { “async”: true, “crossDomain”: true, “url”: “https://instancename.crm.dynamics.com/api/data/v9.1/annotations”, “method”: “POST”, “headers”: { “Content-Type”: “application/json”, “Prefer”: “return=representation,odata.include-annotations=\”OData.Community.Display.V1.FormattedValue\””, “Authorization”: “Bearer eyJ0eXAiOiJKV1QiLCJhbGci………………………..”, “cache-control”: “no-cache”, “Postman-Token”: “b57b2d5b-c8d5-4f26-abf0-a3ea1f499637” }, “processData”: false, “data”: ” {\r\n \t \”subject\”: \”Test From Web API\”,\r\n \”filename\”: \”Untitled2.png\”,\r\n \”objectid_cf_document@odata.bind\”:\”/cf_documents(a60fbc96-f00f-e911-a96b-000d3a3638df)\”,\r\n \”documentbody\”:\”iVBORw0KGgoAAAANSUhEUgAAAe8AAAE8CAIAAABmQa4bAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAM2SSURBVHhe7P0HtCTHeSaIVqUtb2/dquu9ap+9JywAz87LbUdPubNjmbNzmatjmatxZHhxDAthtnMPDSe51EU1C52S3dcjAwMDA8L4hx9qM9Vj3FhQwdK20PKXEZw1D453rlLydl8RAtathuyPWJoXqpHCdo67TWdcteEJEiZtBzN+YPX1JSgy5wijzzx33aq5oC8xKr3THqD8k0Ab576aVAZTjfpqoHTyJwJBq6cCvlXgufY+1px6+rqallZ2djPfhiZ7Eon3JHmn+Qdbrb7Lgd+/9PFjWruLHG+8X89zn7vmT8EV82uF37isV6e+OdfhyZv/pJig5D1w5L/ut/Q8RPvpStR4bjzxf+BzJN/+E1ofNTgaRXa/r7imDP+T/+wOtCefkM05TGGwW8ZBF1VoOl9x/5hezVPr1IoFArlEWEbNT9z5nR69WvBbN72G3UUykNNJEKHOigPO1vfFkKhUCiURxGq5hQKhfJtgKo5hUKhPPoYDP8fI9Uy7N6b03EAAAAASUVORK5CYII=\”\r\n }” } $.ajax(settings).done(function (response) { console.log(response); }); In the above code I have posted- Post Request Response
Share Story :
Share SharePoint document programmatically
Introduction: Sometimes it is required to share the certain documents with outside users. It is possible that user can share that document as hard copy. If that document is hosted on SharePoint user can make a shareable link. Description: Sharing a document to the outside users are possible via directly going to SharePoint and creating a shareable link. But what if you want to generate a shareable link using the C# code. You can follow below code to generate shareable link in Online SharePoint. 1. Get the link You need to pass the document link to below function as shown. currentLink = https://organization.sharepoint.com/cf_car/JTN_89330b3c-beb5-e811-a968-000d3a324f4c/Untitled2.png 2. Get the base url of your SharePoint and generate the service context using (var context = new ClientContext(Model.SharePointBaseURL)){} 3. Authenticate the user foreach (var c in Model.AdminPassword) passWord.AppendChar(c); context.Credentials = new SharePointOnlineCredentials(Model.AdminUserName, passWord); 4. CreateAnonymousLink method which will generate the shareable link var orgEditLink = Web.CreateAnonymousLink(context, currentLink, true); 5. Execute the query context.ExecuteQuery(); 6. Finally get the public link editUrl = orgEditLink.Value; Complete code: private static string UpdateLinkTOShareable(string currentLink, Entity document) { string editUrl = string.Empty; using (var context = new ClientContext(Model.SharePointBaseURL)) { var passWord = new SecureString(); foreach (var c in Model.AdminPassword) passWord.AppendChar(c); context.Credentials = new SharePointOnlineCredentials(Model.AdminUserName, passWord); try { var orgEditLink = Web.CreateAnonymousLink(context, currentLink, true); context.ExecuteQuery(); editUrl = orgEditLink.Value; } catch (Exception ex) { } /*Code to make link Public End*/ return editUrl; } }
Share Story :
Sending Email from Admin on behalf of sender in Business Central using MS Flows
Introduction: In Business Central, to send an Email the sender Email is always the user in SMTP Setup. But, what happens when you are sending email from <admin@yourorganization.com> but should be going department wise ie. <sales@yourorganization.com> and <marketing@yourorganization.com>. Thus in this blog I’ll be showing how to send email from the department email using the admin email. Pre-requisite: 1. VS Code. 2. Office 365. 3. Microsoft Dynamics Business Central. 4. MS Flows. Demonstration: 1. Setting Up MS Flows: Creating the HTTP request: Using Sample Payload as : [{ “sender”:”Test Sender”, “recepient”:”Test recepient”, “subject”:”Test Subject”, “body”:”Test body” }] Add the Send an Email action: Save the MS Flow and copy the trigger URL in Postman and passing JSON, check if you the email. Check mail box for delivery of Email 2. Enable email delegation in Office 365. In portal.office.com, navigate to Admin > Admin Center > Exchange > Mail boxes > <–Admin Email–> > Delegate Add you department email here. In this cas Cloudfronts@xyz.com is admin email and olisterr@xyz.com is department email. 3. Call the MS Flows from Business Central. Code: 4. Output Conclusion: Thus in this way we can use MS Flows Webhooks to actually trigger an email passing the data through JSON as an POST http request.
Share Story :
Power BI Custom Visual Sorting
Sorting can be used for defining an order direction for your Custom Visual. There are 3 different ways using which you or a user using your visual can sort your visual. They are as follows: Default Sorting: This is the easiest sorting option and gives users the ability to sort the visual by any field used in the visual. The following code needs to be added to the capabilities.json file. “sorting”: { “default”: { } } After this the user will get the below sorting option: Implicit Sorting: Implicit Sorting can be used for pre-defining your sorting order in your capabilities.json file. Here, the user cannot manually change the sorting order. This can be done with the following code block where direction 1 is ascending and 2 is descending. Role is the data mapping name for which you would like to define your sorting. “sorting”: { “implicit”: { “clauses”: [ { “role”: “category”, “direction”: 1 } ] } } Custom Sorting: Custom sorting can be used for defining sorting in your visual.ts file and not in the capabilities.json file. Since you are defining your sorting order in your code, you can use various different logics to define your sorting(For example, you can define a formatting toggle option in the format pane that will sort the visual when turned on). A simple codeblock that can be used for sorting your datapoints in ascending order is as follows. sort((obj2, obj1) => { if (obj2.category< obj1.category) return -1 else return 1; }); With so many options available, it is pretty easy create a visual just the way the user wants.
Share Story :
Outlook appointment/Meetings to be allocated on Schedule board in PSA using MS Flow
Business Use Case: Often there are team members who share the need of getting allocated on schedule board in PSA directly as soon as they book an appointment or have a meeting invite. One of the reasons for the same is for the team or anyone concerned about allocation to understand that the said team member is either having a meeting with someone or has an appointment. Hence, they do consume some time of the day. This is one of the reasons that I get when I think aloud. Since there is a lot of argument and justification the team needs to provide for these additional non-billable time that they spend. There can be many other reasons as to why this is needed by other organizations. Mitigation: Though there is an (Out of the Box) OOB solution for marking an appointment in Outlook calendar from Schedule Board, vice-versa is not provided OOB. MS Flows helped me here. I created a flow between Bookable Resource Booking entity and Outlookentity in Flows. I have explained the steps as to how to do the same: Steps: Step 1: Login to https://portal.office.com with your credentials. Step 2: Click on Flows as shown in below image Step 3: This will take you to the portal where you can manage and create all your Flows: Step 4: Click on +New Step 5: Click on Create from Blank Step 6: Click again on Create from Blank Step 7: Select the Outlook connector by searching the Outlook 365 Connector from the search box as shown in the image below. Also, select the Triggering event on when the flow should be triggered. So we selected When a new event is created (v2) Step 8: Select Calendar id as Calendar Step 9: click on next step Step 10: Select the target connector i.e. Dynamics 365 by searching in the connectors. Step 11: Click on create new records Step 12: Select the Organisation and the Entity where you want to create a record. Since the booking that shows up on the schedule board comes from Bookable Resource Booking, we shall select Bookable Resource Booking. Step 13: Add the mappings to the fields as shown below, by searching them from the right pane. Step 14: Once done, click on save and your flow is ready. Step 15: Once created do not forget to Turn it On. Test it by creating an event in the calendar and see in the event history of the flow whether it is successful or not. The End. This blog reflects my personal findings and based solely on my experience of using PSA for the last 3 years. For those who are looking for a platform that can track and manage the entire procedures of sales and project management, I would highly recommend them to try Microsoft dynamics 365 for project service automation. According to my opinion, the implementation of Microsoft dynamics 365 for project service automation is one of the best things that we did in Cloud Front Technologies. We have gained a lot with this implementation because we save time and money due to easy access resources and ability to manage them.
Share Story :
How you can write Customization just specifically to create a profile
Introduction: Have you ever wondered how you can customize Business just for a specific profile and how tedious it can be for each and every profile? Well the answer is here and its simple than you expect. In this blog I’m going to how you can write Customization just specifically for the profile. Pre-requisites: 1. VS Code 2. Al Language Extension 3. Business Central Demonstration: 1. Creating a Profile Object: There are two different profile objects. i. Sales Manager Profile ii. Business Manager Profile. 2. Creating Page Customization for the Profile Object: There are two different Page Customization. i. SalesManager : Here, the ‘No.’ field on Customer List is hidden. ii. BusinessManager: Here, the ‘Name’ field on Customer List is hidden. 3. Linking between Profile Object and Page Customization: The name of the PageCustomization is the customization defined in the profile. Note: No variables, procedures and triggers are allowed on Page Customization. 4. Output: In My Setting > RoleCenters. You get two new Profiles. For Sales Manager Profile: No. field is hidden. For Business Manager Profile: Name field is hidden. Conclusion: Thus, in this way we can customize the app for specific profiles.
Share Story :
Adding Notifications in Microsoft Dynamics 365 Business Central
Introduction: Notifications provide a programmatic way to send non-intrusive information to the user interface (UI) in the Microsoft Dynamics 365 Business Central. Their purpose is to provide users with some information about a current situation without any necessity to perform or block an action. Pre-requisites: 1. Microsoft Dynamics 365 Business Central Steps: 1. Create a global variable of the type notification: LoadsNotification: Notification; 2. The different functions used in notification are as follows: Message: It includes the message to be shown in the notification Scope: Specifies the scope where the notification appears. AddAction: To add an action to notification SetData: To set the data property value in a notification GetData: To get the data property value in a notification Recall: To recall a sent notification Send: To send the notification to the user. 3. In this case I have used the notification function to be displayed if the ColorVar is unfavorable i.e. red and the day is Thursday, Friday, Saturday or Sunday. If the above condition is satisfied then the notification is displayed with an action to schedule Loads otherwise no notification is displayed. The code is as follows: if ((ColorVar = ‘Unfavorable’) and (UnscheduledLoadsCount > 0)) then begin LoadsNotification.Message(‘There are ‘ + Format(UnscheduledLoadsCount) + ‘ loads yet to be scheduled.’); LoadsNotification.Scope(NotificationScope::LocalScope); LoadsNotification.AddAction(‘Schedule Loads’, Codeunit::EventHandlingCU, ‘OpenUnscheduledLoadsByVendor’); LoadsNotification.send; end; The Procedure OpenUnscheduledLoadsByVendor is created in the codeunit EventHandlingCU to open the page when action is triggered. procedure OpenUnscheduledLoadsByVendor(LoadsNotification: Notification): Text begin Page.Run(50139); end; Conclusion: Thus, this way notifications can be created in Business Central to notify the users some important information without blocking actions of the users.
Share Story :
Shortcut to Settings from Unified Interface: D365
If you’re spending time looking and wondering that you always need to go to the app switcher to go the Settings from the Unified Interface, you need to do the following – Once you are in the Unified Interface, click on the Gear icon next to the help icon on top-right corner as shown below and click Advanced Settings – Right on the next tab, Settings with the classic UI is shown – And there’s nothing else on the SiteMap. Hope this helps!
Share Story :
Dynamics 365 Finance and Operations : Picking and Receiving – Transfer In Process in Retail POS
Steps to Perform Transfer In in Dynamics 365 for Retail on POS Go to Picking and Receiving –> click on + icon and click Transfer In Select the store from where you want to transfer in, Delivery date and mode of delivery. Add or scan all the products and its quantity. Click on + icon to add more products to the transfer order You can save the products added by clicking on Save icon. The status of the order will be in Draft. You can continue adding products when it is in Draft state by clicking on + icon. Once you are done adding all the products click on commit icon. Once the order is committed the status will change to created and you will not be able to add products. Once the Order is created, the Order will reflect in the store from where the order is requested. Perform the following steps in that store. For example the warehouse. [Products can be shipped from Finance and Operations as well] Select the transfer In order and click the update icon. Click on ship all icon to ship the products. This will change the ship now column with values to ship. Then click on commit. This will change the status of the order to shipped. When the status is changed to shipped the same status will reflect in the store 101 as well. On store 101 User must click on the transfer order and click on update. Click on receive all icon and click on commit icon. This will complete the process.