Monday, March 21, 2011

Customizing Dynamics AX EP master Pages on SP07

This post is an introduction into how to customize the branding of Enterprise Portal sites, through the use Share Point master pages.
Enterprise portal is a great way to access your Microsoft Dynamics AX environment from the web. It allows employees, customers, vendors or even prospects to connect to the environment and perform role specific tasks. However, it is no secret that the presentation of these pages is best suited for internal access, and has little or no design taste. Any company that is serious about publishing these pages to potential customers needs to at least make sure that these pages “somewhat” match the corporate branding. This post intends to give the interested a quick set of lookouts when dealing with master pages on enterprise portal.

Read More Here

Monday, January 24, 2011

New corporate web site

Hi All ,
today marks the launch of our newest corporate website.
Take a look at it here

Tuesday, January 18, 2011

Anonymous Access on an EP site

The need for anonymous Access

Enterprise portal (EP), being a combination of several standard Microsoft technologies (Dynamics AX, IIS, WSS/MOSS, AD), is intended to extend the functionality available on a Dynamics AX client onto a web-based portal. Typically, EP deployments are made either on an intranet or extranet environment. In the former case, the site aims at exposing functionality to users (typically employees) in order to allow them to participate in business processes using only a web browser, while connected to the corporate network. The later deployment is classically used in a context where employees, vendors and customers can use a web browser, without being connected to the corporate network, to perform specific actions. These users have their own accounts in AD and AX and are thus authenticated when they connect to the EP site. 

On a different perspective, an internet facing deployment does not require users to be authenticated on the AD, which means that they will be using the Dynamics AX guest account in order to interact with the system. Usually, these interactions involve browsing a product catalog, view marketing campaign questionnaires etc.  In order to allow the anonymous users to effectively interact with an EP site, several configuration steps are needed on each of the underlying technologies.

Enabling anonymous Access

“Anonymous” access at the AX Level
Non-authenticated users can access an Enterprise Portal site through the use of the Dynamics Ax guest account. The Guest user account allows anonymous Web users to log onto the Microsoft Dynamics AX Enterprise Portal customer site with limited functionality. The Guest account is created automatically during installation and is disabled by default. Administrators must enable the Guest account in order for anonymous users to have access to the Enterprise Portal customer site. To do this, follow these 4 easy steps:

  1. From a Microsoft Dynamics AX client, go to  Administration > Users 
  2. On the tab, select the Guest user account.
  3. Select the enabled check box.
  4. Close the form to save changes.


Next, you should create a guest user group, in order to organize all guest permissions.  

Anonymous access at the IIS Level
You also need to enable anonymous access at the IIS level. To do this, open the IIS manager (Start/Administrative tools/ IIS manager). Select your site collection from the sites folder, ad select authentication from the IIS Area. Select Anonymous Authentication and under the actions pane, select enable

Anonymous access at the SharePoint Level
Finally, you need to enable guest access at the Enterprise portal level (SharePoint). To do this, open the SharePoint Central Administration site and navigate to the Application management tab. Under the Application Security group, select Authentication providers and select your provider. Under Anonymous Access, select the Enable Anonymous Access checkbox.  

Once you have enabled guest access on the SharePoint central administration, you need to grant access to the anonymous users on the different SharePoint sites and libraries. Go to site administration: Site actions/advanced Permissions/ under the settings action bar select Anonymous access, and choose: entire site. Once this is done, you can then set individual access to libraries or sites by breaking the SharePoint security inheritance.

Once this is done your site is now ready to receive its first anonymous users. 


Friday, October 15, 2010

EP 64 bit machine deployment


(1)    If you are using  64 bit machine for EP, make sure getSharepointTemplatePath method of SysEPDeployment class in AOT has the below code . This is needed so that whenever you save user controls in VS, that will automatically be deployed to the EP server.

public static str getSharepointTemplatePath()
{
    xSession session = new xSession();
    int pointerSize = 0;
;
    pointerSize = System.IntPtr::get_Size();
    if (session.clientKind() != ClientType::Client && pointerSize != 4)
        return SysEPDeployment::getSharepointTemplatePathDotNet();

    return SysEPDeployment::getSharepointTemplatePathWin32();
}


If you are making change to user controls in Visual studio, then there are no additional steps to have these changes propagated to the EP Server. Whenever you make changes on already existing user control in VS, it will automatically copy it to the SharePoint folder location. If you are creating new user control, when you add it to AOT by the right click menu and save the control in VS, it will automatically copy it to the SharePoint location.
(3)    If you are making changes to Tables/EDTs/Enums/Data Sets/Classes, then you need to click the “Refresh AOD” link available to the administrators in the EP home site quick launch. This will clear the metadata cache. You can also do an “iisreset” if needed
(4)    If you are making change to proxy file/static files/resources, then you need to deploy them. User AxUpdatePortal utility http://msdn.microsoft.com/en-us/library/dd261467.aspx (Manage Deployment Option does not work in 64 bit machines,so you have to use AXUpdatePortal)

Tuesday, October 12, 2010

Missing AX EP web project in Visual Studio 2008

So you have installed the Enterprise Portal Development tools add in for Visual Studio 2008. Everything works for you, but other users are complaining that they can’t see the AX web project template: 

Here's what you need to do:

1 - Verify the installation of VS2008
The EP dev tools setup installs EP project, control templates and Visual studio Add-In for VS 2008. Remember that EP dev tools must be installed on the same machine as Enterprise Portal

The Web Site project template (AxWebProject.zip is installed in My Documents folder under:
Visual Studio 2008\Templates\ProjectTemplates\Visual Web Developer\CSharp

Page and control templates AxWebpartPage.zip and AxWebUserControl.zip under:
Visual Studio 2008 \Templates\ItemTemplates\Visual Web Developer\CSharp

The Add-in is installed in
Program Files\Microsoft Dynamics AX\50\EnterprisePortalTools 
and is added to the VS  Add-in files path and enabled.


You can check this in VS Tools->Options->Add-in you should see

  
 In VS Tools -> Add-In Manager  Dynamics AX Enterprise Portal Tools must be enabled.


To check if everything is installed correctly, when you create a new Web Site Project in VS 2008 C#, you should see Dynamics AX Web project template. 



If a user can see Microsoft Dynamics Ax Web Project template it’s because in his/her profile on system the template is available. In general the template is located on a windows 2003 server at
C:\Documents and Settings\[user id ]\My Documents\Visual Studio 2008\Templates\ProjectTemplates\Visual Web Developer\CSharp\ AxWebProject.zip 

To make Microsoft Dynamics Ax Web Project template available for other users copy the Templates folder from the user who can see template and paste it to other users’ profile.

It assumed that your templates are available in the default located as mentioned in above path 

·         Go to C:\Documents and Settings\[user id ]\My Documents\Visual Studio 2008
·         Copy Templates folder
·         Open the other users’ profile and go to C:\Documents and Settings\[user id ]\My Documents\Visual Studio 2008\
·         Paste the Templates folder. If system says to overwrite it click on yes option. 

Then, you may need to refresh Visual Studios cache of templates after copying them:
·         Open the Visual Studio command prompt (Start \ Programs \ Microsoft Visual Studio 2008 \ Visual Studio Tools \ Visual Studio 2008 Command Prompt) and type devenv /installvstemplates.

If you still don't see the template, remember that you need to select C# as your project programming language before it shows up.
  
If you can see the template but can't connect to the AX AOS from Visual Studio check the following:

·         Check that .NET Business Connector has been correctly installed and that the configuration points to the correct AOS instance.
Check that the user you run Visual Studio with, has login and proper development permissions in AX.
·         Check that the "Dynamics AX Enterprise Portal Tools" Add-in is correctly installed in Visual Studio. Open Visual Studio / Tools / Add-in Manager to verify that Add-in is correctly installed and configured. If you can't see it, you must reinstall the EP Development Tools.

Monday, June 7, 2010

InventSum - www.ms-news.net

while working on a way to reverse a transfer between warehouses in Dynamics AX 4.0, i came across this little piece of information on how invent um is updated. InventSum - www.ms-news.net. As expected, invent sum is not updated directly in code, but rather a table called inventsumdelta. the changes are committed once one reaches the top tts level.

"
In version 4, the mechanism to update InventSum has been changed.

The purpose is to prevent locking on the InventSum table.

2 new tables have been added for this purpose:
-InventSumDelta and
-InventSumDeltaDim

All changes to InventSum in a transaction are no longer applied directly to
InventSum but recorded in InventSumDelta first.

When the TTS level reaches 1, the method
InventUpdateOnhand\ttsNotifyPreCommit (triggered from
Application\ttsNotifyPreCommit) is called. This method carries out the actual
update(s) in InventSum.

One of the methods called by InventUpdateOnhand\ttsNotifyPreCommit is
updateInventSum. If only 1 InventSum record has to be updated within the
transaction, this method takes the standard way (via the method
updateInventSumSimple) using InventSum.write()

But if more than 1 inventSum record has to be updated within the transaction
(for example if you change the value in the warehouse dimension, the
InventSum record with the old warehouse has to be decreased and the InventSum
record with the new warehouse has to be increased), updateInventSum takes an
alternative route via updateInventSumAdvanced which completly ignores
InventSum.write() and uses direct SQL.

If your code does not actually need to update the InventSum records and only
needs to be informed of the event that InventSum has changed, i would
recommand calling your code from the InventUpdateOnhand\ttsNotifyPreCommit
method. Insert your call after the this.UpdateInventSum() and before the
this.deleteInventSumDelta() methods. The InventSumDelta table will give you a
reference to all the InventSum records that have changed.