Welcome to MSDN Blogs Sign in | Join | Help

Custom Bound Fields in FieldGroup

You could make the AxBoundFieldGroup use the CustomBoundField (http://blogs.msdn.com/solutions/archive/2009/04/20/ax-custom-bound-fields.aspx) instead of the regular bound field by hooking into the OnCreatingBoundField event (KB971547) of the  AxBoundFieldFactory.

 For example create an assembly with the below code and put it in GAC.

public class AxSampleBoundFieldFactory
{
 public
void OnCreatingBoundField(object sender, CreatingBoundFieldEventArgs eventArgs)
 {
   if (eventArgs.Field.Name == "Date")
     eventArgs.BoundField =
new AxSampleDateBoundField();
 }
}

Then modify the master page (C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES\DynamicsAxEnterprisePortal\defaultax.master) and add the below code to invoke this eventhandler in page init. Now any page that displays a fieldgroup will use the AxSampleDateBoundField for any field with the name "Date". You can add any logic that you want here for example you may want to use other field meta data properties instead of the name.


  private AxSampleBoundFieldFactory customBoundFieldFactory;
   
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);

        // Subscribe to the bound field factory event
        this.customBoundFieldFactory = new AxSampleBoundFieldFactory();
        AxBoundFieldFactory.Instance.CreatingBoundField += this.customBoundFieldFactory.OnCreatingBoundField;
    }

    protected override void OnUnload(EventArgs e)
    {
        // Unsubscribe to the bound field factory event
        AxBoundFieldFactory.Instance.CreatingBoundField -= this.customBoundFieldFactory.OnCreatingBoundField;       
       
        base.OnUnload(e);
    }

Posted by meysun | 1 Comments
Filed under:

Inside Microsoft Dynamics AX 2009 book RTM'ed

Inside Microsoft Dynamics AX 2009 book RTM'ed

http://blogs.msdn.com/microsoft_press/archive/2009/05/20/rtm-d-today-inside-microsoft-dynamics-ax-2009.aspx

I wrote two chapters in Inside Dynamics AX 2009 book about Enterprise Portal and Role Centers. I also contributed to the Architecture Chapter and upgrade. Thanks to the entire EP team who implemented these great features and contributed in many ways to the content of these chapters. These chapters have wealth of info for developers and I would recommend strongly for EP / Role Center developers :) :) .

 

Posted by meysun | 2 Comments
Filed under: ,

Kerberos configuration for Clients accessing Role Center from outside of intranet

If you have EP/Role Centers rolled out in your intranet with Kerberos configured ( refer to Kerberos configuration document )  and now would like to expose this to your domain users outside of your corpnet, for example employee would access their role center from home, then you need to additionally configure Kerberos protocol configuration. You might have got enabled your firewall settings to allow them to access the EP and Reporting servers from outside network. Since the user comes outside of the network, IE will prompt them to enter the user account / password even though IIS authentication is set to windows integrated authentication. In this case, for Kerberos to work you need to configure protocol transition in Kerberos. To do that
1. Open up your “Active Directory Users and Computers” admin tool on your domain controller and locate the user account that you are using as business connector proxy and right click and open up its properties window.
2. Navigate to the “Delegation” tab and change the setting to “Trust this user for delegation to specified services only” and “User any authenticate protocol”.
3. Click the add button in the “Delegation” tab. It will bring up the “Add Services” dialog.
4. Click on the “Users or Computers” button. It will bring up the “Select Users or Computers” dialog.
5. Enter the account that is used as business proxy account ( This is the same account that the EP and report web site use as the application pool and the SSAS window service logon account).
6. Click “OK”. This will close the “Select Users or Computers” dialog and list the services (SPNs registered for Kerberos for the bc proxy account) in the “All Services” list of “Add Services: dialog.
7. Click “Select All” and then “OK” in “Add Services” dialog. This will close “ADD Services dialog” and list them in “Services to which this account can present delegated credentials” list in the “Delegation” tab.
8. Click “OK” to save this setting to the user account.
9. Do “IISReset” on the EP server



The alternate approach could be to use ISA 2006 as the firewall and let ISA collect the user account/password using a form over ssl and ISA will user Kerberos constrained delegation.
http://technet.microsoft.com/en-us/library/bb794858.aspx

Posted by meysun | 3 Comments
Filed under:

Move EP site from one machine to another

Microsoft Dynamics AX 2009 provides simple way to import your changes to pages into AOT and use the AX xpo mechanism to export/import the page/web control and other aot changes to the other machine and deploy them.

 But there amy be cases where you have heavily customized your SharePoint site not just the pages but the theme, added content , links, libraries etc and if you need to take a back of this customzied EP SharePoint site and restore it in another machine for testing, here are the steps

Let us say you are planning to move the site from MachineA to MachineB. In MachineA you have the site with the url http://MachineA/Sites/DynamicsAX and you want to create the same site in MachineB with the url http://MachineB/Sites/AX , then

(1) In Machine  A, open up a command prompt and navigate to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

(2) Execute the below command

stsadm -o backup -url http://MachineA/Sites/DynamicsAX -filename c:\axep.bak

(3) Copy c:\axep.bak from MachineA to MachineB to c:\

(4) Make sure the AOD files in MachineB are the same as in MachineA

(5) Make sure EP is deployed in MachineB. ( You don't need to create the EP Site, but EP must have been deployed)

(6) Open up AX Client in Machine B And navigate to Administration->Setup->Internet->Enterprise Portal->Web Sites and delete any site entry that may already be there with http://MachineB/Sites/Ax ( Since this is the site url that you are going to use to restore).

(7) In Machine  B, open up a command prompt and navigate to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN

(8) Execute the below command

stsadm -o restore -url http://MachineB/Sites/AX -filename c:\axep.bak

(9) Open up AX Client in Machine B And navigate to Administration->Setup->Internet->Enterprise Portal->Web Sites and Click the "Register Site" button. This will add a new row to the Websites grid. Enter http://MachineB/Sites/Ax as the internal url and external url and Type as "Full". Click on the "General" tab and check the "Company independent" check box ( or uncheck it if you want this site to be specific to a particular company in AX) and save.

(10) Now navigate to http://MachineB/Sites/AX and this should have all the changes that you made in http://MachineA/Sites/DynamicsAX

 

Posted by meysun | 2 Comments

Passing parameters from Managed code to X++ in dataset

In the user control code behing add an event handler to the CreatingDataSetRun event on the AxDataSource control

protected void Page_Init(object sender, EventArgs e)
{
this.AxDataSource1.CreatingDataSetRun += new EventHandler<CreatingDataSetRunEventArgs>(AxDataSource1_CreatingDataSetRun);
}

Set the param value  to the event arugments

void AxDataSource1_CreatingDataSetRun(object sender, CreatingDataSetRunEventArgs e)

{

e.DataSetRunArgs.parm = "4000";

}

 

In AOT override or add method in the data set and use element.args().parm() to received the paramter  

public void executeQuery()
{

 QueryBuildRange             custRange;
 ;
        custRange = SysQuery::findOrCreateRange(this.query().dataSourceNo(1), fieldnum(CustTable, AccountNum));
        custRange.value(element.args().parm());
   super();

}

You can also pass an Enum. For example

void AxDataSource1_CreatingDataSetRun(object sender, CreatingDataSetRunEventArgs e)
{
e.DataSetRunArgs.parmEnumType =
EnumMetadata.EnumNum(this.AxSession, "EPFormAction");
e.DataSetRunArgs.parmEnum(2);
}

 

public void init()
{
    super();

     if (element.args().parmEnumType() == enumnum(EPFormAction) && element.args().parmEnum() == EPFormAction::CreateMode)
    {
        //do somethign here

    }
}

Posted by meysun | 1 Comments
Filed under:

Setting Up EP with host headers

Host headers are used either to provide a user-friendly name to the web site address ( and not expose the actual machine name of the web server) or to have multiple IIS websites running on the same port but distinguished by different names.

For example, you may have a machine with the name abcxyz but you want the website url to be http://contoso and not http://abcxyz or you want to have two websites running in port 80 one going to c:\inetpub\wwwroot\folder1 and another going to c:\inetpub\wwwroot\folder2. In these scenarios host headers are useful.

To install EP with host headers

(1)    Create an IIS Web site and configure host header http://support.microsoft.com/kb/190008

(2)    Create a web application in SharePoint Central Admin tool and choose existing IIS Website and pick the one that is created in the above step

(3)    Change to NTLM authentication for HTTPWebRequest in Version 3.5 SP1 http://msdn.microsoft.com/en-us/library/cc982052.aspx

(4)    Install EP and select the IIS Web site / SharePoint Web application created in step 2

Refer to the attached document for screenshots

Posted by meysun | 1 Comments
Filed under:

Attachment(s): Setting up EP with host headers.docx

EMEA AX support team's blog

EMEA AX support team's blog http://blogs.msdn.com/emeadaxsupport/ has many useful EP deployment related posts.

Great job team!!!

Posted by meysun | 1 Comments
Filed under: ,

Channel 9 - EP deployment webinar screen cast

The EP deployment webinar that I conducted on May 4th is now available in Channel9. There were audio interruptions during the webinar. So I redid it and captured it as a screen cast and posted it to Channel9.

http://channel9.msdn.com/posts/meysun/Microsoft-Dynamics-AX-2009-Enterprise-Portal-Deployment/

Posted by meysun | 1 Comments
Filed under:

Enterprise Portal Webinar Content

Below is the powerpoint that I am going to use for May 4th Webinar on Enterprise Portal deployment. The link to the attachment is at the bottom of this blog post below the comments link.
Posted by meysun | 3 Comments
Filed under:

Attachment(s): Enterprise Portal Setup.pptx

Follow me on twitter

It's interesting to see the dynamics folks on twitter. You can follow me at http://www.twitter.com/meysun
I will try to tweet at least once a day

Posted by meysun | 1 Comments
Filed under:

Upcoming EP Webinars

We are having four webinars on Microsoft Dynamics AX EP development and deployment , one each in North America and EMEA time zone. This is open to all partners, customers and Microsoft employees.

Session 1 : EP Development ( repeated) – 28th April by Diwakar Bedekar ,  Microsoft

 

Here is another opportunity for you to join a developer oriented deep-dive technical session on Enterprise portal for Microsoft Dynamics AX 2009. We will cover how to build and customize EP pages, user controls for lists/tasks/wizards, and common programming tasks. You are invited to participate in this virtual meeting bringing your experiences with Dynamics AX to the table, your questions and feedback, too. The discussion will be facilitated by our key R&D folks responsible for this part of the solution.

 

Please use the LiveMeeting invitation details below to join the meeting. If you have any questions about this meeting or others like this, please send us an email at dynresch@microsoft.com.

 

Session 2 : EP Deployment ( repeated) – 04th May by Mey Meenakshisundaram,  Microsoft

 

Here is another opportunity for you to join an administrator oriented Deployment and Setup discussion on Enterprise Portal for Microsoft Dynamics AX 2009. We will dive into some key “how-to” points on deploying and setting up EP, understanding the infrastructure, etc. You are invited to participate in this virtual meeting bringing your experiences with Dynamics AX to the table, your questions and feedback, too. The discussion will be facilitated by our key R&D folks responsible for this part of the solution.

 

Please use the LiveMeeting invitation details below to join the meeting. If you have any questions about this meeting or others like this, please send us an email at dynresch@microsoft.com.

 

We look forward to you joining the call!

Kind regards,

The Dynamics AX Team

 

 

Session

EP Development – EMEA time zone

EP Development – North America time zone

EP Deployment – EMEA time zone

EP Deployment – North America time zone

Date

28 April 2009

28 April 2009

04 May 2009

04 May 2009

Time

7:00-8.30 AM PST (GMT-7)

4:00-5:30 PM CET ( GMT+1)

11 AM -12:30 PM PST (GMT-7)

8:00 -9:30 PM CET( GMT+1)

7:00-8.30 AM PST (GMT-7)

4:00-5:30 PM CET ( GMT+1)

11 AM -12:30 PM PST (GMT-7)

8:00 -9:30 PM CET( GMT+1)

Live Meeting link

Join the meeting

Join the meeting

Join the meeting

Join the meeting

Conference ID

2306579

708791

582045

3648902

Passcode

Passcode is not required

Passcode is not required

Passcode is not required

Passcode is not required

Presenter

Diwakar Bedekar

Diwakar Bedekar

Mey Meenakshisundaram

Mey Meenakshisundaram

Conference call number

Region

Number

Available Languages

Australia, Adelaide

+61882177462

English (Australia), English (United States)

Australia, Brisbane

+61732187088

English (Australia), English (United States)

Australia, Canberra

+61261224772

English (Australia), English (United States)

Australia, Melbourne

+61383205995

English (Australia), English (United Kingdom)

Australia, Perth

+61894208469

English (Australia), English (United States)

Australia, Sydney

+61298702923

English (Australia), English (United Kingdom)

Belgium, Zaventem

+3227043888

English, French, German

Canada, Montreal

+15148465858

French, English

Canada, Vancouver

+16042476417

English

China, Beijing

+861058968008

English, Chinese

China, Chengdu

+862886208008

Chinese, English

China, Guangzhou

+862085108008

Chinese, English

China, Hong Kong

+85228044336

Chinese, English

China, Shanghai

+862161518008

Chinese, English

China, Shenzhen

+8675586118008

Chinese, English

China, Wuhan

+862759608008

Chinese, English

England, London, TVP

+441189093000

English

France, Les Ulis

+33169864554

French, English, Italian

Germany, Munich

+498931763500

German, English

Ireland, Dublin Atrium

+35312797777

English, Italian, Spanish, German, French

Israel, Herzeliya

+972747112400

English (United Kingdom), English (United States)

Japan, Tokyo Shinjuku

+81344135200

Japanese, English

Korea, Seoul

+8225318999

Korean, English

Malaysia, Kuala Lumpur

+60321707377

English, Chinese

Mexico City, Mexico

+525552672500

Spanish, English

Netherlands, Amsterdam, AMS

+31205002500

English, German, French

New Zealand, Auckland

+6493625577

English (Australia), English (United States)

Philippines, Makati

+6328608711

English (United Kingdom), English (United States)

Singapore, Singapore OMB

+6568888007

English, Chinese

Switzerland, Zurich

+41442055797

German, English, French

Taiwan, Taipei

+886237253488

Chinese, English

Thailand, Bangkok

+6622574944

English, Chinese

Turkey, Istanbul

+902123705222

English (United Kingdom), German, English (United States)

United Arab Emirates, Dubai

+97143917744

English (United States), English (United Kingdom)

USA - Redmond Campus

+14257063500

English

+18883203585

English

 

Make sure the Office Live Meeting client is installed before the meeting:

·         I am connecting from inside the Microsoft network

·         I am connecting from outside the Microsoft network

TROUBLESHOOTING

Unable to join the meeting?  Start Office Live Meeting and join the meeting with the following information:

 

 

 

Meeting 1

            Meeting ID:        a5a08f70db8642e68f256f26c3790f68

            Entry Code:        6540

            Location:           meet:sip:billcl@microsoft.com;gruu;opaque=app:conf:focus:id:a5a08f70db8642e68f256f26c3790f68%3Fconf-key=6540

 

Meeting 2

            Meeting ID:        dac511da45d24b239c4687ada3611871

            Entry Code:        1075

            Location:           meet:sip:billcl@microsoft.com;gruu;opaque=app:conf:focus:id:dac511da45d24b239c4687ada3611871%3Fconf-key=1075

Meeting 3

            Meeting ID:        7ac194cde40341ffadb90e245a85f703

            Entry Code:        2596

            Location:           meet:sip:meysun@microsoft.com;gruu;opaque=app:conf:focus:id:7ac194cde40341ffadb90e245a85f703%3Fconf-key=2596

Meeting 4

            Meeting ID:        267d2944f7c24bc9810a46ac4acd0ace

            Entry Code:        0411

            Location:           meet:sip:meysun@microsoft.com;gruu;opaque=app:conf:focus:id:267d2944f7c24bc9810a46ac4acd0ace%3Fconf-key=0411

If you still cannot enter the meeting, contact support:

·         Inside the Microsoft network

·         Outside the Microsoft network

NOTICE

Office Live Meeting can be used to record meetings. By participating in this meeting, you agree that your communications may be monitored or recorded at any time during the meeting.

Posted by meysun | 1 Comments
Filed under: ,

AX Custom bound fields

A new code sample demonstrating the flexibility to customize the boundfields in Microsoft Dynamics AX 2009 EP is released in http://code.msdn.microsoft.com/axcodesamples. Here is the link directly to the sample download file. To try out these samples, download this zip file and follow the instructions given in readme.txt file  http://code.msdn.microsoft.com/Project/Download/FileDownload.aspx?ProjectName=axcodesamples&DownloadId=5497

EP comes with a rich set of bound fields. This code sample demonstrates how to extend and add bound fields in EP for specific user interface requirements. This sample contains three types of bound fields:

  • Multi-line text
  • Day/month/year dropdown
  • Foreign key lookup that displays a description instead of an ID


Data binding provides an easy and powerful way to create a read/write link between controls on a Web page and the data in an application. With ASP.NET data binding, you can bind any server control to an AxDataSource control in EP and read and write data from Microsoft Dynamics AX seamlessly with little or no server code.

NOTE : These are code samples are not intended for production use as is. You should use them as samples and build your own solutions and test it before using it in production system. These sample bound fields do not work with BoundField designer in VS. You should work in the markup directly to use these boundfields or make the code deal with the boundfield designer.

Posted by meysun | 3 Comments
Filed under:

Integrating EP Web Parts to non-EP SharePoint sites

If you already have SharePoint sites ( not based on EP site templates) and if you would like to use some of the AX web parts in those sites, it's easily doable in Microsoft Dynamics AX 2009.

Here are the steps to do.


(1) Integrating EP web parts to other sites requires install EP on the SharePoint server. To do that run setup and select Role Centers and Enterprise Portal component and go through the setup wizard. ( Uncheck the Auto create site option) since you don’t need a new site.

(2) Then  you need to add a script manager to the master page (for example C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\GLOBAL\default.master)of your site.
For example add
<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI" TagPrefix="asp" %>
Just above the HTML tag ( Search for <HTML)

And add the below just inside the Form tag ( search for <form)
                <WebPartPages:SPWebPartManager id="m" runat="Server" />
   <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" />

If you don’t have permission to change the master page, then you can create a user control that contains this script manager and create a SharePoint feature that adds this UserControl to our AdditionalPageHead delegate control. For example refer to http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.delegatecontrol.aspx

(3) Then Go to AXClient -> Administration->Setup->Internet -> Enterprise Portal and add the website and register the site with type “Web Parts only”. You also need to specify a company.

Once the script manager is added , EP is installed and the Site is registered in AX , then you can start using EP webparts on any SharePoint site.

For example, in the below screenshot, I am using AX web parts ( Cues and Unified worklist) in a wiki SharePoint site


Posted by meysun | 1 Comments

Always keep the Filter section expanded in AxGridView

During AxUG Webinar, I got a question around how to keep the filter section always expanded in a gridview in Microsoft Dynamics AX 2009 EP. Unfortunately we don't have a simple property to do that in the AxGridView control. Since it's all ASP.NET and javascript, I mentioned that there should be an easy workaround available.
If you add the below javascript code to your user control at the bottom of the markup file ( .ascx file) then the filter section will always be in expanded mode both during initial load as well as during subsequent postbacks. Since the below code uses lot's of internals such as ids and stylesheet names, it is not guaranteed to work in subsequent releases of EP. But if you need this capability in  Ax 2009 and specific pages, this may be useful.

 

<script type="text/javascript">

function ExpandFilter(sender, args) {

var elem = document.getElementById('div_<%=this.AxGridView1.FilterControl.ClientID%>');

var parentDiv = elem.parentNode;

var filterArea = DynamicsFilter.GetFilterArea(elem);

if (DynamicsCommon.IsNull(filterArea)) return;

elem.style.display = '';

var applylink = DynamicsCommon.FindInstance(parentDiv, "applyfilter");

var resetlink = DynamicsCommon.FindInstance(parentDiv, "resetfilter");

var editfilterlink = DynamicsCommon.FindInstance(parentDiv, "editfilter");

if (!DynamicsCommon.IsNull(applylink) && !DynamicsCommon.IsNull(resetlink) && !DynamicsCommon.IsNull(editfilterlink)) {

editfilterlink.style.display = 'none';

applylink.style.display = '';

resetlink.style.display = '';

}

}

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(ExpandFilter);

ExpandFilter();

</script>

Posted by meysun | 0 Comments
Filed under:
More Posts Next page »
 
Page view tracker