Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts

Monday, May 24, 2010

How to insert records into NAV from Visual Studio

Below is a simple console application to create a customer record from the visual studio.

namespace ConsoleApplication1
{
    using Customer;
    class Program
    {
        static void Main(string[] args)
        {
            Customer_Service service = new Customer_Service();
            service.UseDefaultCredentials = true;
            Customer.Customer customer = new Customer.Customer() { No = "123491", Blocked = Blocked.Ship};
            service.Create(ref customer);
        }   
    }
}

This will insert customer record but Blocked field does not contains the correct value. This can be achieved by changing the line as below:

Customer.Customer customer = new Customer.Customer() { No = "123491", Blocked = Blocked.Ship, BlockedSpecified = true};

This is mostly required for all fields except the string type because I think web services request/responses are in xml and type conversions are required internally from string to other data type.

Tuesday, May 11, 2010

Web Reference in Visual Studio

As specified in one of the help scenario, I created a codeunit with two functions in it and published that to the web services along with the customer card and named both as ‘PageWithCapitalization’.

image

imageWhen I try to create a web reference in the Visual Studio, as the two web services I published has same Service Name, the Page web reference also has the methods of the codeunit.

image

Tuesday, March 23, 2010

Wednesday, December 16, 2009

New Report Properties in NAV 2009 SP1

Microsoft Dynamics NAV 2009 (Sp1) reports has new properties to utilize the advantages in the Visual Studio report designing.

Using the following properties, you can design the RTC reports with additional functionalities:

  • EnableHyperlinks (Useful for Drill Down from a Report to a Page functionality)
  • EnableExternalImages
  • EnableExternalAssemblies

Tuesday, December 15, 2009

Reporting for Microsoft Dynamics NAV 2009 (SP1)

Microsoft has provided a very good demo script with scenarios on how to use the new reporting functionality in Microsoft Dynamics NAV 2009.

This documents covers the following functionalities.

  • Format text and add colour
  • Interactively sort table data in a report
  • Add charts
  • Save a report as a PDF or an Excel file
  • Drill down from a report to a page
  • Please click the link to download the Demo Script from the Partner Source.

    Wednesday, December 9, 2009

    How to determine the add-in's public key token

    To register an add-in, you include it in the Client Add-in table in Microsoft Dynamics NAV. To include an add-in in the table, you must provide the Public Key Token.

    1. At a command prompt, change to the directory that contains the sn.exe utility.

    For example, the default directory for Microsoft Visual Studio 2008 is C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin. (or) the default directory for sn.ext file is C:\Program Files\Microsoft.NET\SDK\v2.0 64bit\Bin.

    2.   Type the following command:

           sn.exe –T <assembly>

    Replace <assembly> with the add-in assembly's path and file name, such as Program Files\Microsoft Dynamics NAV\60\RoleTailored Client\Add-ins\MyCompany.MyProduct.RtcAddins.dll

    3. Press ENTER and not the public token key that is displayed.

    NOTE: Please use semicolons before and after <assembly> value like the following: <assembly>