Advertisements

Programmatically Creating Outlook Appointment in Navision

Dear Friends in this post I will discuss about creating Outlook Appointment from Navision using DotNet Interop. Without going much in theory lets jump to practical approach.

To start with first we need to define some DotNet variables:

Name DataType Subtype
OutlookItemType DotNet Microsoft.Office.Interop.Outlook.OlItemType.
‘Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’
outlookApplication DotNet Microsoft.Office.Interop.Outlook.Application.
‘Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’
outlookApplicationClass DotNet Microsoft.Office.Interop.Outlook.ApplicationClass.
‘Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’
outlookAppItem DotNet Microsoft.Office.Interop.Outlook.AppointmentItem.
‘Microsoft.Office.Interop.Outlook, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c’

I have created a function CreateOutlookAppointment which takes parameters as:

 

OAP1

And the code as below:

OAP2

To call this function I use below code:

OAP3

The code is itself self-explanatory.

You can add other validations and parameters as per the requirement.

Imp Tip:- Make sure you set for all DotNet Variables RunOnClient = Yes.

On run the output will be as:

OAP4

 

OAP5

 

What you are waiting for, go create Appointment and have fun.

See you seen via my next post. Till then keep learning and growing in your career.

 

 

Advertisements

Mail Sending Option in NAV 2017 with Cover Letter & Attachments –Part 2

Continuing from previous post, further in next step we will apply same feature discussed in earlier post to our custom documents and learn where all places we need to take care development to get it working.

If you have missed First Part you can find here. Mail Sending Option in NAV 2017 with Cover Letter & Attachments –Part 1

In my Example I am using Policy Module:

I am using my Custom Table Policy where Policy Holder is setup as Customer, also few general details related to policy is stored. In nutshell we are concentration on Sending mail to customer as we have done in previous post for sending Invoice details to customer.

Step-1:

In my Policy Table I have added 2 Function as below:

MSI-07

 

MSI-08

SendRecords()

IF DocumentSendingProfile.LookupProfile(“Policy Holder No.”,FALSE) THEN

SendProfile(DocumentSendingProfile);

 

SendProfile(VAR DocumentSendingProfile : Record “Document Sending Profile”)

DocumentSendingProfile.Send(

DummyReportSelections.Usage::”Policy Issue”,Rec,”Document No.”,”Policy Holder No.”,

DocTxt,FIELDNO(“Policy Holder No.”),FIELDNO(“Document No.”));

Step-2:

In Table 77 Report Selections add new option to usage field

MSI-09

Step-3:

In Table 60 Document Sending Profile add below customization.

Add Text Constants

MSI-10

Update below function as:

MSI-11

Step-4:

In Table 9657 Custom Report Selection add below customizations.

MSI-12

 

MSI-13

Step-5:

In Page 9657 Custom Report Selection add below customization.

MSI-14

 

MSI-15

 

MSI-16

Step-6:

Create 2 Reports one for Mail Body and one for Attachment. You can use same report as attachment too, it depends on your requirement.

Step-7:

In Page Policy add below customization.

MSI-17

 

MSI-18

Step-8:

Setup your report Selection as below:

MSI-19

Now you are good to go.

Test your solution/ customization.

This is just a small idea, many lots can be done depending upon your requirements.

 

 

 

Mail Sending Option in NAV 2017 with Cover Letter & Attachments –Part 1

Generally we get demand for customized mail body to send from Navision. Normally we use templates or html etc. coding to achieve this. In NAV 2017 this feature is now available in product itself. Today we will explore this feature available for Std. documents and learn to setup, further in next step we will apply same to our custom documents and learn where all places we need to take care development to get it working.

The cover letters are created using RDLC or Word layout customization features providing visual consistency with any attached pdf document.

Document Layout for a Customer

MSI-01

For Example say we want to setup different e-Mail body for specific customer. To achieve this we will assign a specific report by customer which will enable us to process multiple formats at the same time. We will use the Customer Layout from the customer card by Document Type to do this.

MSI-02

In above example I am setting up a customized cover letter designed using selected report.

The Send To Email The e-Mail will be sent to the e-Mail provided in the customer card or you can provide an extra e-Mail in this field or you can specify at the time of sending mail if not setup automatic.

Email Body Layout Description = Modern – Email Body (Choose from the Custom Report Layouts)

Use for E-mail Body select this if you wish to include output of selected report as Cover Letter to Email body.

Send and Receive E-Mail

We can now use the Send Email window to have a preview of what our layout will look like and the using the options we can send the e-Mail.

Let’s open a posted invoice for this customer.

MSI-03

On the Posted Sales Invoice click Send, which will open a window with some options, such as:

We can choose Email Prompt for Settings or use Default Settings

We can select how the attachment needs to be attached

We can also have Disk options as PDF or Electronic Documents if we use those.

Click OK. Before e-Mail is sent, we have the possibility to verify the e-Mail address, the subject line, the attachments and as per the Email Body Template, this is how the e-Mail will look like:

MSI-04

When we click OK, an e-Mail is sent to the Customer using the e-Mail Template.

By opening the e-Mail the recipient can see the contents of the invoice which has been sent using the template and the full invoice is also available as an attachment.

MSI-05

You can switch to a manual written message:

By using the Message Content field or

If you are using a client, you can open and edit the message in Outlook

MSI-06

In our next part of this post, we will see how we can enable this feature for our custom Pages & Documents.

 

 

Multiple Line Mail Body Formatting without using Mail Templates

I came across one requirement from one of my customer, so I decided to share the solution with you all.

In today’s post we will see how we can create multi line mail body for SMTP mail.

Lets start with the solution rather than talking of logic.

Step-1: Create a codeunit for the function or decide where you wish to add this function

Step-2: Define Variables

1

you may notice that Variable CRLF is defined as Text with Size 2.

Define all other variables that you may require as per your logic.

Step-3: Write the function. Define your parameters and additional codes you may require as per your logic.

2

In above code notice that I have set last parameter of CreateMessage as FALSE for(HTMLFormatted), this is required else CRLF logic will not work.

Where ever I require New Line I just add CRLF.

3

Step-4: SMTP Mail Setup I am using as below for live.com, you check with yours SMTP details accordingly.

4

Yes we are done now you can execute the above function to generate your mails.

I will come up with more details in my upcoming posts, till then keep exploring and learning.

 

 

 

New Changes or features for Application Users in Microsoft Dynamics NAV 2017

Although it is too early to discuss on features and capabilities which we are going to get in our new release, we should wait for exact information post release of same.

Here are few extracts from available documents pre-release of the product.

You will find most of the features similar to which we have discussed in our earlier posts for Madeira Preview Project.

 

Incoming documents

New modification to the list of incoming documents. Now it will have filtered view, a new field Processed is added, and now by default filter is applied to show only unprocessed incoming documents in the list.

However you can choose to still view all incoming documents in the list using the show Show All action.

When documents are posted, the processed flag is set to Yes, such that incoming documents that have been processed into posted documents are filtered out.

Capability is added to manually switch the Processed flag.

Now OCR supports for document extracting line details, when we send PDF or image files on incoming documents to Lexmark ICS, the 3rd-party provider of OCR services.

You can now create purchase invoices with multi-line details.

Now you can easily correct OCR errors before receiving the document and at the same time configure the service to avoid the known errors in future.

You can use the new Lexmark ICS online experience to visually train and validate the OCR processing of PDF and image files for incoming documents, such as vendor invoices.

From each incoming document record, you can now link directly to the online extracted document to validate the OCR result and train the service with your corrections.

A new Role Center Cue will give users capability to monitor incoming documents that await your OCR validation.

 

 

Inventory Items

Item attributes similar to one we saw in Madeira.

Capability to add attributes to your inventory items will make it easy for you to find the right product that your customer wants by filtering on attributes.

You can define your own attribute types, such as Base Material, Colour, Size, or other product dimensions, and attach to your items as a supplement to the built-in item attribute types and values.

When you access your items on documents or list, you can view and filter on the attribute values to limit the list of items.

By using Categorize items you can create a hierarchy of item categories and assign item attributes to each item category.

When you add items to a category, they will inherit the default attributes on the category.

This will ensures to have a common set of attributes on related items, will speed up the assignment of attributes to similar items, and allow filtering and navigating related items easily based on the category.

 

 

Smarter sales and purchase documents

Now you can cancel posted sales and purchase credit memos in the same way like you can do for posted sales and purchase invoices.

After performing this action you will find the credit memo is unapplied from the invoice and creates a new invoice that is applied to the credit memo.

This action will bring you to the earlier position where you created the credit memo. (Like Undo)

Package Tracking No. and Shipping Agent Code on sales invoices Posted sales invoices now show the package tracking number and the shipping agent code by default.

 

Account Categories in the Chart of Accounts

A new capability is added as account categories and sub categories.

Now you can group G/L Accounts to adjust your need for financial reporting.

For each G/L account, now you can specify the account category so that when ledger entries are posted to these accounts they are categorized as per your category.

For each account category, you can now choose from different sub-categories, even you can also create new sub-categories as per your need.

For example, for the G/L account category Expense, you can define as many sub-categories as you need so that you can differentiate between Expenses on different sources.

 

 

Payment reconciliation

The Payment Reconciliation journal now will show you total outstanding transactions and outstanding payments.

From there itself you can now look up the list of documents that have not been applied or used in the reconciliation process.

You can now also choose to include outstanding payments and outstanding transactions information in the Payment Reconciliation report.

 

Jobs

Project Manager Role Center

A new project manager field is added to the Job Card in order to give users clear sense of job ownership.

A new list My Jobs list is added on the Project Manager Role Center which will display jobs with the status of Order by default based on the new project manager field as discussed above.

If a person is assigned as the project manager to 5 jobs and those jobs have the On Order status, those 5 jobs will default on the My Jobs list on the Project Manager Role Center.

A new cue is added to the Project Manager Role Center to Create Job Sales Invoice, so now users will have quick access to this functionality.

On the Project Manager Role Center a new drop down list for Job Reports has been added to the Actions ribbon.

Job cost

A new fact box will be available to the right side of the Job Card to display the job’s cost information.

Now the term Contract is renamed as Billable throughout the Jobs module.

On the Job Card the Allow Schedule/Billable lines and Apply Usage Link options are marked by default for new jobs.

A new report called Job Quote is available so user can send a quote to a customer. This report is available as Word Template so it can be modified using Word and emailed to the contact on the job.

 

Fixed Assets

Now setting up fixed assets is simpler. A standard setup is provided, but allows you to modify it at anytime you want.

You can register fixed asset as cards with complete information, accounting details, and reporting classification.

You can also register purchases of fixed assets through special fixed asset G/L journals where you can also dispose of fixed assets. The right accounting entries are created automatically.

 

Simplified Setup for using Dynamics CRM from inside Dynamics NAV

As you are familiar Dynamics NAV includes opportunity management and basic customer relationship management.

You can easily set up a connection with Dynamics CRM to have more benefit from the strong capabilities that Dynamics CRM offers, such as marketing and customer service capabilities.

A new assisted setup guide to the Business Manager home page will be available that will guide you through the setup process. Once you are through with this setup, you’ll have a seamless coupling of Dynamics CRM records with Dynamics NAV records.

 

 

Simplified opportunity management and CRM functionality

You will find Dynamics NAV CRM module has been simplified and improved in a number of ways:

  1. At place of CRM wizard pages now you will have card pages, so that they can now also run in the Web client with improved user experience.
  2. Worksheet pages also been replaced by list pages so now you can also use the pages in browsers.
  3. The Contact card has been simplified by marking a number of controls as Additional, so that the page default looks simpler.
  4. Mail merge have been replaced with Word reporting. Also, new Word reporting capabilities added to generate email body content based on the related report and the selected report layout.
  5. A new Sales & Relationship Manager Role Center has been added

New wizard has been created that helps users set up email logging (default public folders, rules, and job queue setup).

 

Smart notifications give you advice and recommendations

Similar to one which we discussed in our earlier post for Madeira.

 

Extensions

Microsoft provides the following extensions:

  1. Envestnet Yodlee Bank Feeds
  2. PayPal Payments Standard
  3. QuickBooks Data Migration
  4. Sales and Inventory Forecast

Similar to Madeira few of them we have discussed in our earlier posts, rest will discuss in our upcoming posts.

 

Office 365

If your organization uses Office 365, Dynamics NAV 2017 includes an add-in so you can invoice your customers based on entries in your Outlook calendar.

From the Contacts List in Dynamics NAV, you can manually synchronize your Dynamics NAV contacts to Office 365 People.

The contacts from Office 365 will sync back to Dynamics NAV as well.

There is a filter that can be applied to the synchronization process so users will only need to sync the contacts they use most often. This same filter is used during the automatic background sync as well. This synchronization process also works with Microsoft Outlook on the desktop.

We will discuss in more details in our upcoming posts. This feature is too available in Madeira.

 

 

 

US financial reports

In the US version of Dynamics 2017, added new four financial reports to the Business Manager and Accountant Role Centers:

  1. Balance Sheet
  2. Income Statement
  3. Cash Flow Statement, and
  4. Retained Earnings Statement

These reports use G/L account categories and sub-categories discussed above to group financial data.

 

Source:- https://mbs.microsoft.com/Files/partner/NAV/Readiness_Training/ReadinessTrainingNews/WhatsNewDynamicsNAV2017LimitedBeta.pdf

I will come up with more details in my upcoming posts.

 

 

 

Export Data as CSV and send as Attachment to Mail

One of my Follower/Reader have requested for this post.

This post will explain the the below steps:

  • Export the data of table to csv file format. (I am using XMLPort you can use Excell Buffer or any other method to create the file)
  • Attach to Mail and Send.

Step 1.

Create a XMLPort as below.

CSVAttachment-1

Set the Property of XMLPort.

CSVAttachment-2

Set the Property of Integer Data Item.

CSVAttachment-3

Set the Property of Table DataItem for which data to be exported.

CSVAttachment-4

Set the Captions of the Columns in CSV file.

CSVAttachment-5

Write the code to transfer the value of Table columns.

You may find some extra code adjust accordingly as per your requirement.

CSVAttachment-6

Define a function to Setfilter for data to export.

Adjust the code as per your requirement.

CSVAttachment-7

CSVAttachment-8

Step 2.

Here is the function to Export the data to csv File using above created XMLPort.

This function Saves the file to Shared folder, if required you can use TEMPORARYPATH to save your File.

CSVAttachment-9

Step 3.

Send the File as Attachment to the Mail.

CSVAttachment-10

You make required adjustment as per your requirement.

Make sure in case you are using Shared Folder give necessary rights on folder to Service Account and operating User Accounts.

Please respond did you found useful this information.

Their are other ways to achive the same, this was readyly available with me as i have used in one of my project so shared the same.

Stay tuned for more details in my Up comming posts.

Important

Most of the contents you find in this blog will be either inherited from MSDN or Navision Developer IT Pro Help. Some places images are also directly taken from these sites. Purpose is simple to try those stuffs and re-produce adding few things as per my understanding to make easy understanding for others and quick reference.

Here nothing under my own brand or authorship of the content. At any point of time we are just promoting Microsoft stuffs nothing personnel with same.

Hope stuffs used here will not violate any copyright agreement with them. In case by mistake or in-intestinally it happens and the Microsoft feels these should not be used Microsoft have full right to inform me about same and will be glad to take down any such content which may be violating the norms.

Purpose is to promote Navision and share with community.

FB Profile

Like FB Page

%d bloggers like this: