Friday, May 3, 2013

How to Close Accounting Periods (Fiscal Year) In NAV 2013?


Closing Accounting Period in NAV 2013

Follow the Steps below to close a Fiscal Year/Accounting Period in NAV
  • Open the Accounting Periods window (Financial Management --> Setup--> Accounting Periods).

Click Close Year. If more than one fiscal year is open, the program assumes that the earliest one should be closed. It displays a message identifying the year it will close and explains the consequences of closing it.
 
  • To close the year, click Yes.
Now the fiscal year is closed, and the program places a check mark in the Closed and Date Locked fields for all the periods in the year. Now the fiscal year cannot be opened again and you cannot remove the check mark from the Closed or Date Locked fields.

 
The following are the most important points we need to follow on closing a Fiscal Year in NAV
  • You cannot close a fiscal year before you create a new fiscal period.
  • When a fiscal year is closed, you cannot change the starting date of the following fiscal year.
  • Even when a fiscal year has been closed, you are allowed to post G/L entries to it. When you do this, the entries will be marked as posted to a closed fiscal year - the Prior-Year Entry field will contain a check mark.
  • Once a fiscal year is closed, make sure you close the income statement accounts and transfer the year's results to an account in the balance sheet. You must repeat the process every time you post to the closed fiscal year.
 

How to configure Management Reporter reports to Sharepoint library???

In Management reporter 2012, we can deploy the reports directly to Sharepoint library. Below are the steps to configure the Management Reporter reports to Sharepoint library.

1. Open Sharepoint site in Internet Explorer.
2. In Home Page, click View All Site Content.
3. Click Create option.


4. Click Document Library.
5. Create a library.


6. Go to Library page and Click Settings.
7. Click Document Library settings.
8. Click Advanced settings in General settings section.


9. Select ‘Yes’ in Allow Management option.


10. Click Ok to save.
11. In Document Library setting page, Click Add from existing site content types (In content Types section).


12. Select "Link to a Document" in available Site Content Types.
13. Click Add and click OK.
14. Open SharePoint Central Administration.
15. Click Operations.
16. In Security Configuration section, click Blocked file types.


17. Remove the "Url" type in the list (Only if exists).


18. Close Central Administration.
19. Open Management Reporter report definitions in Report designer.
20. Go to Output and Distribution tab.
21. Type your Sharepoint library URL (Ex: http://servername/library name).
Note: If you select Generate to multiple report library locations then you have to enter library URL in Related Report link Location.


22. Click Save.
23. Now generate and check the reports in Sharepoint library.

Hope this helps!!!

Printing reports to Excel in Dynamics NAV

Generally we use reports to view the data and print the necessary information. There are cases wherein we will be required to export the report da into an Excel file and do a comparative study.

The steps below will take us through on how to export a report into an excel sheet
Consider the scenario wherein you already have a built in report (Ex: GL Transactions), now you need to export the data for a particular period to an excel sheet

What should I do ?
1.       Create a new Boolean Variable against the report you want to work with
2.       Design a request form like the below image

3.       Assign the Boolean Variable to the “SourceExpr” of the Check box.
4.       Save and Close the report.

The request page provides you an option like Print to Excel. If the Option is checked, the report will be printed to excel and if it is unchecked excel report will not be generated.
Note:               
Consider, if there is no need of previewing the report.  Then there is no need of request form. You can directly make the section’s visibility as False (“CurrReport.Showoutput(False)”) and “processingOnly” property of the report as “Yes”.
This enables the user to print the report to excel instead of previewing.


Coding:
We can use both excel buffer and automation server for exporting/print the report to excel.
·         The Report 108 in the standard NAV will guide you on using Excel Buffer functions.
·         For Automation Server I have given a sample code below for reference. This code will be executed when the Check Box (Boolean variable) in the request form is checked or selected

<SAMPLE CODE>

IF PrinttoExcel THEN //PrinttoExcel – Boolean variable

BEGIN

  IF ISCLEAR(xlapp) THEN  //xlapp – Automation – Microsoft Excel 12.0 Object Library.Application

    CREATE(xlapp);

  //Window – Dialog variable

  window.OPEN(Text001+'@1@@@@@@@@@@@@@@@@@@@@\');

  window.UPDATE(1,0);

  //xlbook – Automation – Microsoft Excel 12.0 Object Library.Workbook

  xlbook:=xlapp.Workbooks.Add;

  //xlsheet – Automation – Microsoft Excel 12.0 Object Library.WorkSheet

  xlsheet:=xlbook.Worksheets.Add;

  xlsheet.Name:='Budget Analysis';

  RowNo:=1; // Where RowNo as integer 

//Printing report Header – Specify the report column headers here

xlsheet.Range('A'+FORMAT(RowNo)).Value:= ‘Column XXXX’

xlsheet.Range('B'+FORMAT(RowNo)).Value:= ‘Column YYYY’

xlsheet.Range('C'+FORMAT(RowNo)).Value:= ‘Column ZZZZ’

  …….

//Printing report header

END;

Note: When using automation Server, we need to increment the Row no for each record in the data item.
Hope the information was useful.
 

Dynamics SL - 32 & 64 bit OS Support

Since Dynamics SL is a 32 bit code, running Dynamics SL from the program files of a 64-bit OS is not supported from earlier versions of SL till Dynamics SL 7.0 (both SP1 & SP2). However, the following versions of Dynamics SL are supported when program files are run on 64-bit OS.
  • Microsoft Dynamics SL 7.0 Feature Pack 1 (FP1)
  • Microsoft Dynamics SL 2011
  • Microsoft Dynamics SL 2011 Feature Pack 1 (FP1)
The below article explains the Dynamics SL compliance issues with the 32 & 64 bit OS machines during the various situations and given the workarounds.

1.      Fresh SL installation

  • C:\Program files (x86)\ is the location for 32-bit programs. Dynamics SL program files should be installed in this folder of 64 bit OS machine.
  • C:\Windows\SysWOW64\ is the location for the operating system's 32-bit binaries.  The Dynamics SL Swimapi.dll file and other necessary 32 bit *.dll files of Dynamics SL should be available in this folder.
2.      Server upgrade from 32 bit to 64 bit OS & Dynamics SL:

Need to copy the 32-bit dlls from C:\Windows\System32 of the 32 bit machine to C:\Windows\Syswows64 of 64 bit machine. Also the dll’s needs to be registered using the Regsvr64 command.

                     Regsvr64 "C:\windows\system64\xxxxxx.dll"

3.      Custom SL screen development in VS 2010 64 bit

If the SL custom form is developed in VS 2010 64 bit OS and running in 32 bit OS machine, the system will throw the “Stopped working” error message. Given below are the steps to correct this.
  1. Open Project in Visual Studio
  2. Select the Project Level in Project Explorer
  3. Right click mouse and select properties -> Click on Compile -> Advanced Compile Options
  4. Change Target CPU to x86 and click OK button.

Build the executable again and run in Dynamics SL.

Hope the post helps!! 

Thursday, May 2, 2013

How to map existing SharePoint folder link to other MS CRM records:


Microsoft Dynamics CRM 2011 has the capability of uploading documents to SharePoint from within MS CRM record. In SharePoint a folder gets created when a document is clicked in CRM record and the URL is saved within CRM. But we can also use the same URL path to link more CRM records such that single SharePoint folder can be mapped with many records in CRM

In some scenario, the user would like to main documents from CRM Parent/Child records into a same folder in SharePoint. This can be programmatically achieved by linking the records to a single path to SharePoint.

Microsoft Dynamics CRM internally uses the URL of the parent object to determine the absolute URL for the child object. In this example we are not going to create any folder to child record when documents is clicked but going to link an existing path to Child records.

Once you have the Parent record created in CRM and corresponding record has a folder in SharePoint. Then the following SDK code is used to create a SharePoint document location record.

 SharePointDocumentLocation spLocation = new SharePointDocumentLocation();

        spLocation.Name = "location1";

        spLocation.Description = "SharePoint Document Location created for storing documents related to accounts";
        
         //Specify integrated SharePoint information below.

  String sharePointDocumentUrl = "http://<<sharepointserverUrl>>:<<portnumber>>/<<sitename>>/<<existing folder path>>";

        //Set the Absolute URL as above defined valid path

        spLocation.AbsoluteURL = sharePointDocumentUrl;

        //set the RegardingobjectId in which record would like to show the existing SharePoint folder 

        spLocation.RegardingObjectId = new EntityReference(<<Entitylogicalname>>, <<entityId>>);

        _service.Create(spLocation);


Hope this was helpful!!!!

Friday, April 26, 2013

How to add additional sorting options in lookup???

In Dynamics GP, all the lookup windows have some default sorting options. However, if the user wants to add more custom sorts then that custom sorts can be added using Advanced Lookups Setup window.

For example, Customers and Prospects lookup can be sorted by Customer Id, Customer Name along with some additional sorting options (Customer Class, Type, Salesperson ID, Sales Territory ID and Corporate Customer Number). 

  



To add more sorting options for Customers and Prospects window:

1. Go to Advanced Lookups Setup window (Microsoft Dynamics  GPàToolsàSetupàCompanyàAdvanced Lookups)





2.      In Advanced Lookups Setup, choose Customers from Lookup Name drop down list.


3.       Maximum of four sorting options can be added for each lookup window. Select Sort by Field drop down to choose the respective sorting options.
4.      Here, Currency ID, Balance Type, Checkbook ID and Fax have been added as Sort by Field.
5.      Click Save to save the sorting options for the corresponding lookup window.
6.      Now, Customers and Prospects lookup window will display as per the below screenshot.



7.      In Customer and Prospects lookup window, if Currency ID is selected in Additional Sorts then the lookup window will display as per the below screenshot.



Hope this helps!!!

Menu Export/Import between Groups in Dynamics SL


Given below are the steps to copy the menu from the existing group to a new group in Dynamics SL.

Step 1:
Open the Menu maintenance screen and select the Group which needs to be replicated. 

Step 2:
Go to Action - > Export menu item, to export the menu of the selected group as an XML format.

(Note: Unless you specify another location, the exported file is saved in to your My Documents folder. The default file name is Menu.xml)
 

 Step 3:

Select the group the menu needs to be imported.
Go to Action - > Import menu item, to import the XML file to the selected group.
 
 

Step 4:
Respond to the System Message 9859 with Yes to overwrite an existing menu; No to append an existing menu
 



Hope this is helpful!!