Friday, May 31, 2013

How to set a password for a field in Dynamics GP without customization?

There are scenarios in which management doesn't allow to edit sensitive fields like Item Cost, Price, etc. by a GP user without knowing a password. This is one of the most essential needs for any customer in their daily business routine.

We quite often receiving questions like,

“Is there any way I can set a password for a particular field before editing?”

“Would it be possible to hide or disable a particular field?”

“Is there any add-ons available to set the security for the fields?”

The questions may be different but the answer/solution is one which is Field Level Security tool available in GP. If the tool has been already registered then we can set the password in no time. Otherwise, purchase this tool from your Partner.

Let us see how to set a password for Standard Cost field in Item Maintenance window.

Before following the below steps make sure the Field Level Security is registered in GP.
(Microsoft Dynamics GPàToolsàSetupàSystemàRegistration)



Prompt password for editing Item standard cost for a particular user:

1. Go to: Microsoft Dynamics GPàToolsàSetupàSystemàField Level Security.

2. In the Field Level Security window, click the Add button.



3. Enter Field Security ID and Description then click the below marked lookup button to open Resource Description window.



4. In the left pane of the Resource Description window, expand Microsoft Dynamics GP then select desired product and module.



5. Then expand the Item Maintenance form and select the desired window. In the right pane double click the desired field you want to set password.



6. Select the Security Mode as “Password After”.



7. Enter the Password ID.



8. Click Add button.



9. In the Password Maintenance window enterPassword ID, Description and Password and click Save.



10. Click Save in the Field Security Maintenance window.



11. In the Field Level Security Window, select User and Company to set password protection and mark the Field Security ID then click Apply button.



12. Finally click OK button.


13. Login with the user that you had set the password protection in Field Level Security.

14. If the user tries to modify the Standard Cost then system will prompt for a password.



Other Security Features available in Field Level Security

You can select the following security modes from the Field Level Security Maintenance window to give security to fields, forms, or windows.

Password Before   You must enter a password before getting access to a field.
Password After   You must enter a password after modifying a field for the changes to be saved.
Warning Before   A warning will be displayed and access to that field will be denied.
Lock Field   You can’t use or modify the field.
Disable Field   The field will be displayed but it will not be available.
Hide Field   The field won’t be displayed.
Password Window   You must to enter a password before access to the window is permitted.
Disable Window   Enter the system administrator’s password to have access to the window.
Password Form   Users or classes must enter the correct password before access to the form is permitted.
Disable Form   You must enter the system administrator’s password to modify the form.

Hope this helps!!!

Crystal report print Engine Errors in Dynamics SL

We got one requirement to Export report into PDF format while Printing the  invoice under Flexible Billing. We did some customization in the Invoice Print screen for the PDF Export Functionality. Also we faced several issues during the implementation in Production server. Here are the workarounds to rectify the below issues.
  
Crystal report print engine: 544 Access to reports denied. Another program may be using it.

This below error has been shown during the PDF Export into specified share folder.


Solution:


Ensure the SHARE and NTFS permissions to the mapped folder for the current user.

Crystal report print engine Error: 999 – Operation not yet implemented.


Solution:

1.   To make ensure if there are custom tables without proper access rights and give proper rights to SL Users.
2.   Fonts used in the report not supported by the system and Sub reports may be causing the problem.
Cannot start print job and Crystal Print Engine Error 567
When we try to print a report in Microsoft Dynamics SL you receive the following error messages.

Error Message 1

Crystal reports Helper Application for Solomon IV
Cannot start print job.
Report: <C:\sol\Solomon\Usr_Rpts\<XXXXX>.RPT

Error Message 2

Crystal Print Engine Error 567 – Error in File <C:\sol\Solomon\Usr_Rpts\<XXXXX>.RPT>; Page header or footer longer than a page.

To resolve this problem, use either of the following resolutions.

Solution:
  • Renaming the customized reports in \USR_RPTS. This forces the standard report to be run from the module directory. If the problem still continues to occur, use the following steps.
  • If there is a backup of the report file (Xxxx.rpt), restore the file from the backup.
  • Log off the workstation and then log back on. Make sure that you have the appropriate permissions to print.

Hope this post will be helpful for solving Crystal report issues with Microsoft Dynamics SL.

Creating New Entity for Outlook Synchronization in Dynamics NAV


          This article assumes that the user already had hands on experience on the outlook synchronization with the standard entities in the Microsoft Dynamics NAV.
          
Consider a scenario of creating an entity for the customer table. Likewise you can create any table as an entity from the Dynamics NAV db.


Steps to be followed:

1.       In the Navigation pane, go to AdministrationàApplication setupàMicrosoft Outlook Integration.
2.       Select Outlook synch. Entities.
3.       Press F3 to insert a new entity. Enter the code as “CUST” also you can specify the Description as Microsoft Dynamics NAV Customer.
4.       Choose “Table No” as 18. The Table Name will appear automatically
5.       Now in the Outlook Item, Press F6 and choose Contact Item.
      
      Note: Consider creating a customer in the contact format in the outlook.



6.       Link the customer table field with the corresponding outlook property of the contact item.
7.       Select the Synch.Entity menu item and choose Fields. Now outlook Fields window open for you.
8.       Link the field with the corresponding outlook property like the image below           

9.       The Salespersoncode is the user-defined. So the outlook property needs to be typed manually

             Note:
                I have synchronized the customer based on the salesperson code. For example, the customer who           are all having Salesperson code =RS needs to be filter.

10.   Press Escape and get out of the window.
11.   Your New Entity is ready to work now.
12.   In the Navigation pane à go to outlook Synch. User Setup which is next to Outlook Synch. Entity
13.   Here you need to create a new setup for the Customer.
                 a.       Select the User ID
                 b.      Synch. Entity Code as CUST.
                 c.       The condition as Salesperson code=CONST(RS).
14.   Before proceeding further, you can check once whether we have assigned any customer as salesperson code RS. Now your screen will look like below.
       



Settings in Outlook:

1.       Click settings
2.       Now in the Connection tab. Click Test Connection for the changes will be refreshed in the settings.
3.       Now in the Folders Tab we can able to see the New Empty Text box for selecting the folder for the new entity (“Microsoft Dynamics NAV Customer”).
4.       Click browse and select any newly created contact folder. It won’t allow you to select any other folder. Since in the Navision we have configured to the Contact Item only.
5.       If you need Filters you can also apply.
6.       Click Apply and then Ok.
7.       Now Click Full synchronization.
8.       The details of the customer who is having the Salesperson code as RS will be displayed.

Keep creating more entities....

Thursday, May 30, 2013

MS CRM 2011 ExecuteMultipleRequest SDK Message

When working with Microsoft Dynamics CRM 2011 SDK, more often similar request need to be made to CRM each operation. Thus during the Microsoft Dynamics CRM 2011 Update Rollup 12 a new message request has been added ExecuteMultipleRequestwhich accepts several request to execute them once.

ExecuteMultipleRequest will behave similar as if each was executed separately but this will improve the performance drastically. Both Microsoft Dynamics CRM 2011 and Microsoft Dynamics CRM Online support this batching of requests into a single web service method call.

Below is sample scenario were Multiple Contact need to be created in CRM:

#region Execute Multiple with Results
    // Create an ExecuteMultipleRequest object.
    requestMultiple = new ExecuteMultipleRequest()
    {
        // Assign settings that define execution behavior: continue on error, return responses.
        Settings = new ExecuteMultipleSettings()
        {
            ContinueOnError = false,
            ReturnResponses = true
        },
        // Create an empty organization request collection.
        Requests = new OrganizationRequestCollection()
    };
  
for (int i = 0;i < 1000; i++){
    CreateRequest conactReq = new CreateRequest();
    
Contact ct = new Contact {
LastName = "Contact",
FirstName= "Name" + i;
};
conactReq.Target = ct;
// Add Each request to ExecuteMultipleRequest
requestMultiple.Requests.Add(ctRequest);

}

//Finally Execute the ExecuteMultipleRequest using ExecuteMethod
ExecuteMultipleResponse emResults = (ExecuteMultipleResponse)_orgService.Execute(requestMultiple);
<!--[if !supportLineBreakNewLine]-->
<!--[endif]-->

The Execute Multiple settings allow us to configure if we require responses and how to proceed when an error occurs. In Settings option ContinueOnError to true the final request is processed even if few records fail. In setting option ReturnResponses to true returns a collection of responses for each message’s response.


Hope this is helpful!

Friday, May 24, 2013

Dynamics SL 2011 – Inventory Reservations against Project


In a typical manufacturing company the risks of parts get stolen for other projects are high. Hence reserving the material against the project is very essential but challenging  with the earlier versions of Dynamics SL.
 

Goods for Project (GP)

Purchases with GP purchase type is not fully supporting the inventory reservations against Project. Given below are the factors.

  • No inventory impact during GRN though the items are physically available in warehouse till issuing to project. Inventory should be updated on the first hand to reserve it later.
  • Project commitments created during the purchase is getting relieved during the AP Voucher itself. Supposedly, the commitment should be relieved only after issuing to project which is not the case with GP type.  

Our recommendation to the customers was to create unique site id every time the new project is created in  SL and pursue the positive adjustments to the new site after GRNs. Though we achieved the reservation of parts to the project but not to the full extent due to the below hurdles.

  1. One Site ID for one Project & Task:  Site IDs increases with the number of projects & tasks causing the Site, Item site & Location table records unmanageable at times.  

  2. The IN batch creation will be handled by the customisation only during GRN. More the customisations more the maintenance cost.


Goods for Project Inventory

Microsoft is coming up with the solution to introduce the new Purchase Type “Goods for Project Inventory” with the latest release SL 2011 FP1.

This new purchase type updates inventory as the ― Goods for Inventory type does and also creates the necessary project commitments as the ― Goods for Project type does during purchases.




Inventory will now be allocated for the designated project and task and consumed only by the designated project in Sales Order Entry (40.100.00), Shippers (40.110.00), or Issues (10.020.00).

The regular inventory can be put into stock, later allocated to a project, and then only consumed by that project in Sales Order Entry (40.100.00), Shippers (40.110.00), or Issues (10.020.00).

This Purchase type claims to be the good alternate for the Inventory Reservations with Site id.
Have a wonderful day!!

How to customize module area page in GP2013

In previous versions of GP doesn't have the option to customize the contents in module area page. Also containers/Sections are fixed.

i.e. sales module area page in GP2010



In GP2013, it has a feature to customize the module area page by using Customize this Page option.

i.e. sales module area page in GP (current version-2013)


To customize the module area page,
1. Click Customize this page link.
2. It opens Customize Area Page window.
3. Select require options by clicking the check boxes.


4. Based on the options selected in the window, module area page gets reflected as shown below.

Below are few new features in the module page area.


1. Users can simply drag and set the containers in the module page area as they need.
2. Each Containers/sections (Setup, Cards, etc.,) has maximize and minimize options.


Hope this helps!!!

Keyboard Shortcuts in Dynamics NAV 2009 Versions

Many of us are fond of using Keyboards instead of mouse. The keyboard shortcuts not only helps us work faster but also more efficient.

This article will help us in using keyboard shortcuts in Dynamics NAV 2009 Versions. Most of us must be familiar with some shortcuts that are already given in the help documents or manuals.

Note: For those who are not too familiar with the standard shortcuts in NAV you can get it downloaded as a document by clicking here

The shortcuts that are listed below will not available in the standard Help document. We found these links very much helpful and sharing it across so that you can be benefited
Shortcuts
Classic Environment Action

Ctrl+ Page Down
Navigating to the next tab in the Card Form
Ctrl+ Page UP
Navigating to the Previous tab in the Card Form
Ctrl+F1
Toggle Marking the Particular object in the object designer. ( The same can also be applied in the NAV 2013 Development Environment)
Alt+F1
Display /Hide the Navigation Pane in the Classic Client( NAV 2009 or previous)
Alt+F12
Open the Navigation Pane designer
Ctrl+0..Ctrl+9
Navigate to the modules in the Navigation pane.
Ex: Ctrl+0 -> Shortcuts, Ctrl+1 -> Financial, etc..
Alt+ Space bar+ Right Arrow+ X
Maximize the Window in Classic Environment
Alt+ Space bar +Right Arrow+ n
Minimize the Window in Classic Environment
Ctrl+ Tab
Switch among open windows in Classic Environment


Keep using shortcuts!!!

Thursday, May 23, 2013

Capturing Save Event Arguments using Execution Context Parameter in CRM2011


When working with Dynamics CRM form scripting, there are several occasions where one needs to know the execution event for performing manipulation through scripting. For this reason Dynamics CRM provides execution context as an optional parameter that can be passed to a JScript library function through an event handler.
In below screenshot you can see “Pass execution context as first parameter” check box checked which passes execution context to the script function in CRM form.



There are different ways an entity record gets saved in Microsoft Dynamics CRM. This can be determined by getEventArgs() in execution context parameter as below:

function Form_onsave(executionObj) // exectuionObj passed as First Paramter
{
var eventmode=executionObj.getEventArgs().getSaveMode();

if (eventmode==2) { // returns 2 for Save and Close.
///
// Do the necessary logic
///
    }
}

The above code is an example to check “Save and Close” to perform some action. Similarly we can detect different save by return value from getSaveMode(). Below is the list of different save modes.

Entity
Event Mode
Value
All
Save
1
All
Save and Close
2
All
Save and New
59
Activities
Save as Completed
58
All
Deactivate
5
All
Reactivate
6
User or Team owned entities
Assign
47
Email (E-mail)
Send
7
Lead
Qualify
16
Lead
Disqualify
15

 Hope this was helpful!

Friday, May 17, 2013

How to disable homepage features in Dynamics GP through SQL Server???


Dynamics GP homepage can be customized for each user or role. GP don’t have an option to disable a particular or all features for all the users.



Follow the below steps to disable the homepage features for all the users: 
1. Open SQL Server Management Studio.
2. Take a backup of the DYNAMICS database.
3. Execute the following query in DYNAMICS database.


UPDATE DYNAMICS.dbo.SY08100 SET COLNUMBR = 0, SEQNUMBR = 0, Visible = 0 WHERE
    (DICTID = 0) AND ((COLNUMBR <> 0) OR (SEQNUMBR <> 0) OR (Visible <> 0)) AND USERID not in ('sa', 'DYNSA')


This script will disable all the homepage features for all users except sa and DYNSA.

Execute the below query to disable a particular feature:

UPDATE DYNAMICS.dbo.SY08100 SET COLNUMBR = 0, SEQNUMBR = 0, Visible = 0 WHERE (SectionID in (1, 2, 3, 4, 5, 6)) AND
    (DICTID = 0) AND ((COLNUMBR <> 0) OR (SEQNUMBR <> 0) OR (Visible <> 0)) AND USERID not in ('sa', 'DYNSA')

SectionID field values and the corresponding homepage feature:

à To Do list
à Quick Links
à Metrics
à My Reports
à Microsoft Office Outlook
à Connect

It is highly recommended to execute these scripts only by GP administrator. Also, during this script execution process all the users should be out of GP.

Note: If the Customize Home Page task is assigned to the User’s role then users can enable the features in Dynamics GP.

To restrict the Customize Home Page option, remove the Customize Home Page task from the corresponding user’s role by following steps

1. On the Microsoft Dynamics GP menu, click Tools, click Setup, click System, and then click Security Tasks.
2. In the Task ID area, select the <User Role> (or DEFAULTUSER).
3. In the Product area, select Microsoft Dynamics GP.
4. In the Type area, select Windows.
5. In the Series area, select System.
6. Click to clear the Customize Home Page check box to remove access to the window.
7. Click OK.


Hope this helps!!!

Dynamics SL - Customization failures and way to handle


Given below are the few thoughts on our investigation with the customization failure issue in Dynamics SL 7.0 or SL 2011.Here are the various error messages due to the customization failure.
  • “Fatal Exception occurred in VBA and was caught by .\vba.ccp at line 332”
  • “Customization has stopped working because VBA Trim function not recognize”
  • “System Message 20406 - Error loading VBA project”
             
                 

You may try the below steps.
  • Locate the APC folder (C:\Users\User Name\AppData\Roaming\Microsoft Dynamics SL\APC).
  • By default the APC folder is hidden due to some security reason. You may need to enable the visibility of hidden files / folders.
  • Delete the swimapi.kpr and swimapiex.exd files. These files are responsible for the loading of customizations prior to screen load.
  • On launching the customized screen again, these files will be recreated.

This may resolve the customizations failures in Dynamics SL.

Drag and Drop file using Control Add-Ins in Microsoft Dynamics NAV


Control add-ins for the Microsoft Dynamics NAV are built with the Microsoft .NET Framework–based assemblies that you install on computers that are running the Microsoft Dynamics NAV Windows client.        

To include a control add-in on a Role Center, you apply the control add-in on a page that is assigned to a part of the Role Center. Control add-ins are not supported by the Microsoft Dynamics NAV Web client or Microsoft Dynamics NAV Portal Framework for Microsoft SharePoint 2010

Here we will see an example of Drag and Drop a file in the text box controls. On drag and drop the text box will provide you the path of the file with the filename and extension.

Follow the below procedure for Drag and Drop a file:
    1.       Open Visual Studio.
    2.       Select C# class library and provide the name for the solution. Here we have given name as DragDrop.
    3.       A New Class file will open.
    4.       Add the following references:
  • System.Drawing
  • System.Windows.Forms
  •  Microsoft.Dynamics.Framework.UI.Extensibilty.dll, by default, it is available in Program Files\Microsoft Dynamics NAV\60\RoleTailored Client folder.
   5.   Type the below code

using System.Drawing;

using System.Windows.Forms;

using Microsoft.Dynamics.Framework.UI.Extensibility;

using Microsoft.Dynamics.Framework.UI.Extensibility.WinForms;

using System.IO;

 

namespace DragDrop

{
    [ControlAddInExport ("DragandDrop3.5")]
    public class DraGDroP:WinFormsControlAddInBase

    {

        TextBox txt;

        protected override Control CreateControl()

        {

            txt = new TextBox();

            txt.MinimumSize = new Size(50, 0);

            txt.MaximumSize = new Size(500, Int32.MaxValue);

            txt.DragEnter += new DragEventHandler(txt_DragEnter);

            txt.DragDrop += new DragEventHandler(txt_DragDrop);

            txt.AllowDrop = true;

            return txt;

            throw new NotImplementedException();

        }

        private void txt_DragEnter(Object Sender, DragEventArgs e)

        {

            if(e.Data.GetDataPresent(DataFormats.FileDrop,false))

            {

                e.Effect =DragDropEffects.All;

            }

        }

        private void txt_DragDrop(Object sender, DragEventArgs e)

        {

            try

            {

                int index = 0;

                string data;

                string[] filecollection =(string[])e.Data.GetData(DataFormats.FileDrop );

                foreach (string file in filecollection )

                {

                    //this.txt.Text = Path.GetFileName (file);

                    this.txt.Text = Path.GetFullPath(file);

                    }

                data=this.txt.Text;

            }

            catch (Exception ex)

            {

            }

        }

    }

}
 
 
  6.    Now we need to Sign the Add-In assembly
  7.       Go to Project propertiesàsigning.
  8.       Select the checkbox “Sign the assembly”. Now choose a String Name key.
  9.       Click New. Specify the name and protect your assembly with Password.
  10.   Save and Build the Solution.
  11.   Copy the assembly dll from the folder you have saved. By Default, C:\My Documents\Visual Studio\Projects\[Addin Project name]\bin\Debug.
  12.   Paste the dll in the Add-Ins folder of the Role Tailored client. By default, C:\Program Files\Microsoft Dynamics NAV\60\RoleTailored Client\Add-ins.
  13.   Now we need to create a Public Key token.
  14.   Follow the link for creating public key token. http://msdn.microsoft.com/en-in/library/dd983825.aspx
  15.   Copy the Public key token created.
  16.    Now Open table Client add-in(2000000069) in Dynamics NAV.
  17.   Type the Control Add-in name as “DragandDrop3.5”.
 18.   Paste the copied Public Key.
  19.   Now Exit from the table.
  20.   Create a New Page in Page Designer. Like Below image.
 
 
21.   Go to the Control Add –in Property of a Field “Drag a File and Drop” and Choose the Public key token that created for this add-in.
22.   Save, Compile and Run the Page.
23.   Now drag a file from any of your folder and place in the text box.
24.   Refer the below image
 
Hope this helps in dragging a file and retrieving its full path by dropping the file.