Blog Archives - Page 142 of 169 - - Page 142

Category Archives: Blog

Procedure to call an External API from Microsoft Dynamics NAV

Introduction: In this article, I will be giving the procedure to call an External API from Microsoft Dynamics NAV. The external API which I am going to call from Microsoft Dynamics NAV is ‘TIBCO Cloud Integration’ as I want to perform real-time integration between Dynamics NAV and Dynamics CRM. Pre-Requisites: 1. Microsoft Dynamics NAV 2. External API which will be called i.e. in this scenario, TIBCO Cloud Integration Mapping. Procedure: JSON syntax will be used for storing and exchanging data from Microsoft Dynamics NAV. I have created the following variables: ‘StringBuilder’ of datatype: DotNet and Subtype: System.Text.StringBuilder.’mscorlib’ ‘StringWriter’ of datatype: DotNet and Subtype: System.IO.StringWriter.’mscorlib’ ‘String Reader’ of datatype: DotNet and Subtype: System.IO.StringReader.’mscorlib’ ‘Json’ of datatype: DotNet and Subtype: System.String.’mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=***’ ‘JsonTextWriter’ of datatype ‘DotNet’ and Subtype: Newtonsoft.Json.JsonTextWriter.’Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=***’ ‘JsonTextReader’ of datatype ‘DotNet’ and subtype: Newtonsoft.Json.JsonTextReader.’Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=***’ I have created a function ‘Initialize’ which upon calling will initialize StringBuilder, StringWriter and JsonTextWriter variables as below: StringBuilder := StringBuilder.StringBuilder; StringWriter := StringWriter.StringWriter(StringBuilder); JsonTextWriter := JsonTextWriter.JsonTextWriter(StringWriter); I have created a function ‘StartJson’ where I am calling the ‘Initialize’ variables function and then calling the ‘WriteStartObject’ of JsonTextWriter DotNet variable. Now create a function ‘AddToJson’ which accepts two parameters as below: The first parameter accepts the name of the Scribe field mapping   i.e. name of the External API field mapping. The second parameter is the field value which is passed from Microsoft Dynamics NAV. Create another function ‘EndJson’ and call the ‘WriteEndObject’ as below:       JsonTextWriter.WriteEndObject; Create a function ‘GetJson’ where the JSon content is converted ToString.       JSon := StringBuilder.ToString; Next I have created a function ‘UploadJSon’ which will upload and POST the parameter values from Dynamics NAV. The UploadJson has the following parameters: The Subtype of DotNet variable ‘String’ is ‘System.String.’mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=***’ WebServiceURL is the URL which will be called, in this case I will be passing the Scribe map URL which will be hit on a particular condition to perform real time integration. I have created two local variables for the UploadJson function as below: ‘HttpWebRequest’ variable of DotNet DataType and SubType : System.Net.HttpWebRequest.’System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=***’ ‘HttpWebResponse’ variable of DotNet DataType and Subtype: System.Net.WebResponse.’System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=***’ The following code is written in the UploadJson function: The CreateWebRequest, SetRequestStream, DoWebRequest and GetResponseStream functions are as below: The CreateWebRequest accepts two parameters from which the second parameter is the HTTP request method i.e. ‘POST’ or ‘GET’. I have used ‘POST’ as this method submits data to be processed by a specified resource. You can set the timeout required during which the External API should be called. Now in my codeunit’s OnRun() function I have written the following code so that the External API URL i.e. Scribe map is hit and the real time integration between NAV and CRM takes place. I am passing five field values from Dynamics NAV. Note: AddToJSon(‘Car_Stage’,CarStageGlobal) where ‘Car_Stage’ is the name of the Scribe field mapping and ‘CarStageGlobal’ is the NAV field value. I have passed the Scribe map URL to UploadJson function and the Json DotNet variable. Conclusion: In this way, an External API can be called from Dynamics NAV. The External API URL i.e. Scribe map URL in this case is hit within seconds and real-time integration is performed quickly. The field values changed in Dynamics NAV are immediately reflected in Dynamics CRM.

Share Story :

Connection Entities in Dynamics 365

Overview: Connection entities provision an easy way to connect and describe relationships between two records in D365 CRM. This is supported across most Entity types in Dynamics 365. Some of the features of Connection entities are as follows: All Business and Custom entities can be enabled for Connections. Provision to add descriptive information between the relationship between the 2 records. Enabling Connections for an Entity: In my example below, I’ll enable Connections for 2 custom entities – I have a custom entity called Family Members and have these records details of Family Members like their blood groups and medical history. This entity is a child entity of another customer entity called Patient. Connections must be enabled for this custom entity at the entity level as shown below: Connections need to be enabled on both entities between which connection is to be made. Once Connections have been enabled, navigate to the record and navigate to the related records, you’ll see Connections is now available. Connection Roles: Connection Roles are the description that defines in what way is record A related to record B. Connection Roles can be added to a Solution or even created as below: In a solution, look for Connection Roles on the left hand menu Then, create a Connection (Existing ones in an Unmanaged Solution can be added as well) I am creating a new Connection Role by the name Father and I’ve enabled the same only for Patient entity. and Family Member After saving the record, I’ll create a Matching Connection Role to the role Father I just created. Now, I’ll create a matching Role called as Son Now, the two roles have been created which match each other Associating Records: Once my Connections have been enabled on source (connection from entity) and target (connection to entity), I’ll associate the two records as follows: I will navigate to the Family Member entity I created above and will associate a record with a record to Patient entity. This way, I can derive what is the relation between the family member and the patient. In the Connection Associated View above, I’ll associate the Family Member Gary to the Patient. So I’ll select To Another in the connection menu as shown in #1 above. Then, find the Patient Alexander James which I created in the Connect To tab as shown below. And then I relate the current record to the target record as the Father. Note: As soon as Father was selected in the Connected To tab, the Details tab auto-filled Son as it was the only role associated with the Father when we created Connection Roles in above section in this blog. In case there are multiple Connection Roles associated with one Role, the Details section’s As This Role field will be empty for you to select the related role from. And the record is saved as below. Likewise, a record can be connected to multiple other records as well. Retrieving Connections: Connections are useful if you want to draw reports, graphs or charts.

Share Story :

Set up gift cards

Posted On July 5, 2017 by Admin Posted in

Introduction: This blog explains you setup of gift card in Dynamics 365 retail, which can be issue and redeem in store. In POS gift card can be use as payment tender. Just like loyalty Card Casher can check the balance, he can add balance (Money) to the gift card and issue the gift card from POS. Before you setup gift card in Dynamics 365 retail, you should Set up a retail service product to represent gift cards. If cards have bar codes, make sure that the correct bar codes are associated with the gift card product. Let’s begin. Step 1: Open the Dynamics 365. Go to the Retail and Commerce > Headquarter setup > Parameter > retail parameter Click on Posting. Step 2: In the Gift card product field, select the gift card product. This this case “9999” is gift card product No. you can select your gift card no. Gift Card Company: the legal entity that holds the liability for gift cards. In the Journal field, enter the name of the journal to use when intercompany journal entries are created. Journal entries are creating during the statement posting process. In the Serial number templates fields, enter the start date, end date, and gift card numbering template to use when generating electronic gift cards. If the gift card template doesn’t expire, leave the End date field blank. Conclusion: By following above steps you can setup gift card in Dynamics 365 retail.  

Share Story :

To run a batch to check for visa expiry date of employees and send an email if visa expires in a month in Dynamics NAV

Introduction: This article focuses on to creating a batch to run everyday to check for employee’s visa expiry date. If the visa expires in a month an email notification is sent to the HR Manager about the visa expiry of the respective employee. Pre-requisites: Microsoft Dynamics NAV 2017 Steps: Create a new codeunit with id and name. Set up the SMTP mail setup in NAV. 3. In the Globals (Ctrl+G),create a record for employee table. 4. Create a function and call it on run. 5. Here in the above code calculate the previous months date of the visa expiry date and if the the date is today then an email is send using smtp mail 6. Create a job queue to run every day. Set the start time and end time. 7. An email is sent if today’s date is the previous month date of visa expiry.  

Share Story :

Dynamics CRM behaviour on deletion of User

Introduction: Have you ever wondered what happens to the user owned records in CRM when the user itself is deleted from CRM? Will the records get deleted? Or Will it be assigned to some other user? What will happen to the existing system jobs? Let us see in the below example. Description: Suppose there is a user named “Somesh Siripuram” and this user has its own account records. The owner of this records is “Somesh Siripuram”. Now the user is being deleted from the admin portal and no longer has access to Office 365 and CRM. Login with system administrator and check for the deleted user. The user will be listed in “Disabled User” view. When you open the user the email address and the user name of the user will be changed and some number appears Now, it’s time to check the deleted user owned records Thus, we can see that records neither gets deleted nor the owner of the records get changed. Manual assigning of records to another user is required. Other effects: Waiting jobs will remain as waiting until it is cancelled. New system jobs (where workflow owner equals to disabled user) will fail. You need to change the owner manually, they are not auto assigned to system  

Share Story :

Working with SSIS Configurations and Deployment Model

Posted On July 3, 2017 by Jayant Patel Posted in

Package configurations is very important to achieve flexibility SSIS package, easy configurations allow used to changes and reuse the solutions in different environment with them customize settings and rules. SSIS package supports different types of configurations, these package configurations is also depended on deployment model. In this blog we will discuss about the Project Parameter configuration using the Project Deployment model. Let’s make the SSIS package Solution to Project Deployment model. Right Click on the SSISProject Solution Name, Click Project Deployment Model. Follow the Wizard: Click Next: This will provide you list of packages that you need to convert, then click next. Next will be setting up the protection Layer for the Package: Then Click on Next and then it will convert your Solution to Project Deployment model. Project Deployment Model allows you to configure the package at project level, it groups the Package configurations together that allows user to easily configure Parameter.

Share Story :

Power BI new updates: Data bars for new table & matrix preview

Posted On July 3, 2017 by Admin Posted in

In this blog article, I will explain about the new updates of Power BI related to Data bars for new table & matrix (preview). These are the new type conditional formatting to the table and matrix visual called as data bars. Data bars are a quick way to format data and to make it easier to compare. There are two ways two ways to turn on data bars.   1) From the Field itself and   2) From Menu Select Data bars on any numeric measure from your matrix or table. This launches a dialog for customizing the data bars. We can set the properties for data bars like we can set the bar color , min and max value. See below screen captured: Once you confirm with settings, you’ll see the data bars applied to the visual. You can also turn on color scales and data bars from the formatting pane by selecting Conditional formatting. Set Color scales or Data bars to On to apply the default settings or, to customize the settings, select Advanced controls.

Share Story :

Physical Negative Inventory Dynamics 365 for Operations

Physical negative inventory functionality is mainly used for issuing the stock for insufficient inventory. If Physical inventory checkbox is selected then system will allow to issue an item though stock is not available into inventory. Path: Inventory Management > Setup > Inventory > Item Model Group Below is example how to issues stock if there is insufficient inventory. You can see the below item for which On Hand inventory is not available though I want sale these stock. Create the sales order and enter item, quantity, Unit cost and confirm the sales order. Post the Packing slip to sell or issue the stock. Check the On hand inventory after posting Packing slip. You can check On Hand Quantity is showing negative. Conclusion: These functionality helps to issue stock through sales order, Production order, adjustment journal though stock is not available or insufficient.  

Share Story :

Smart Notifications in NAV 2017

Partially built using the Notifications in the UI the smart notifications gives you advice when you use the application. As an example; if you create a new sales invoice for a customer that have an overdue balance you will see the below notification. Another example is when you close a sales order you receive a message saying that the order has not been posted (I am a bit skeptical to this one since in my world posting a sales order is not done by the same person that’s entering it). Luckily this is configurable and each user can turn the features off and on through the My Notifications setup where conditions also can be applied. I think this is a cool concept and I see a potential to create custom notifications to support how the business wants to operate and to reduce common user mistakes.

Share Story :

Sharing Schedule Board in D365 Field Service

Introduction: This blog explains options available for sharing of Schedule Board in D365 Field Services Pre-requisite: Latest Field Service Solution of D365. Procedure: Open Schedule Board, Field Service -> Schedule Board. Open a specific Tab Setting on Schedule Board for e.g. Facility as highlighted below. Click on field “Shared With” dropdown. Schedule Board can be shared with below 3 options Everyone – Schedule Board is shared with all Users. Just Me – Schedule Board is shared with Login User Only. Specific People – Schedule Board is shared with Specific People. Steps to Share Schedule Board with Specific People: Select “Specific People” option in Shared With field of Tab Setting on Schedule Board. Open “Schedule Board Settings” entity records from Advanced Find. Open Schedule Board of Specific People record from the results. Click on “Share” button in ribbon. Add new User by Clicking on “Add User/Team” option and provide privileges as per need. Conclusion: This blog explains the options to share Schedule Board and, also how a Schedule Board can be shared with specific Users only.  

Share Story :

SEARCH BLOGS:

FOLLOW CLOUDFRONTS BLOG :


Secured By miniOrange