AX 2009 Enterprise Portal Error The type or namespace name “Portal” does not exist in namespace ‘Microsoft.Dynamics’

These days, I’m working on developing some new Enterprise Portal pages for GRN/ Packing slip Posting through EP. Suddenly i found a problem while building my EP Web control page.

“The type or namespace name ‘Portal’ does not exist in the namespace ‘Microsoft.Dynamics’ (are you missing an assembly reference?) ” on some of my custom developed pages.

Soultion : I had to Generate the proxies again and build the pages again.

How to Generate Proxies.

To generate the proxy open the form : Tools > Development Tools > Web development > Proxies > Generate)

In most cases the proxies directory will look like this: C:\inetpub\wwwroot\wss\VirtualDirectories\80\App_Code\Proxies

In the last you need to use the Generate Proxy option from Visual studio EP project to add the generated proxies to the project and Build the project to successfully build solution.

Debug Enterprise Portal Code in Microsoft Dynamics AX

1. Log in to the server that is running the AOS.
2. Open the Microsoft Dynamics AX Server Configuration utility. To openStart > Control Panel > Administrative Tools > Microsoft Dynamics AX 2009 Server Configuration.
3. Create a new configuration that allows debugging.
3.a. Click Manage then Create configuration. Give a name to the new configuration in the Create Configuration window then click OK.
3.b. On the Application Object Server tab, select Enable breakpoints to debug code X++ code running on this server. Click on Apply button.
4. Click on OK button to close the configuration window. You will get a message that indicates AOS is going to be restarted.
5. Actually debugger works on the server where IIS is running and Enterprise Portal is hosted. I used a single system and all the things are on the same system. If you are accessing a system remotely using Terminal Services then from the Start menu click Run. Type mstsc /console in theOpen text box and click OK This opens a console session in Terminal Services. Console session is required to debug Ax EP
6. The World Wide Web Publish Service should be enabled.6.a. Open the Services window for the system. To open it Start > Control Panel > Administrative Tools > Services.
6.b. Right-click the World Wide Web Publishing Service and click Properties.
6.c. Click the Log On tab.6.d. Select Allow service to interact with desktop as shown below.
6.e. Click on OK button to close the properties window.
7. Open the web.config file located in:\Inetpub\wwwroot\wss\VirtualDirectories\\, here the port number of the Enterprise Portal site. If you forgot the port then there is a way to check it out. Open Ax client then Administration main menu > Setup > Internet > Enterprise Portal > Web sites, here you can see the port. 8. Now do the following:
8.a. Find out the compilation element then set the debug attribute to true.8.b. Save the changes.
9. Reset IIS by typing the iisreset command at the command-line window or type iisreset in Start > Run > Open text box then click on OK button.
10. Open the Microsoft Dynamics AX Configuration utility. To open it Start > Control Panel > Administrative Tools > Microsoft Dynamics AX 2009 Configuration.
11. Set the Application Object Server Instance drop-down menu to Business Connector (non-interactive use only).
12. Create a new configuration to allow debugging.12.a. Click on Manage button then click Create configuration. In the Create Configuration window, name the new configuration then click OK button.12.b. On the Developer tab, select Enable user breakpoints to debug code in the Business Connector and Enable global breakpoints to debug code running in the Business Connector or client then click on Apply button.
13. Click on OK button to close the configuration window.
14. Open the Microsoft Dynamics AX client.
15. On the Tools menu, click Options to display the Options window.
16. On the Development tab, select When Breakpoint from the Debug mode list box, and then click Apply. This enables debugging mode on the client.
17. Close the Options window.
18. Open the Microsoft Dynamics AX client.
19. Now decide the element you want to debug. Lets say you want to debug a class method. Open the method in code editor and write breakpointswhere you want to set a breakpoint.
20. Open the Debugger window manually. To open debugger manually click on Tools > Development Tools > Debugger.
21. Now execute the web form where the method has been invoked. It should work. On my system it is working perfectly.

You will find this information on other blogs to but i am placeing here so if you come to my blog and dont go information less. Following links are good in explaining this too.

You would also needs a hotfix if you working on Windows 2008 with dyanamics ax 2009, for Ax 2012 you wont needs this.

Microsoft Dynamics AX 2012 Videos

Video1 – Developer Tools
– Stresses the importance of Models
– API’s
– Interoperability with .Net
– 3 yrs spent by Microsoft for the new Development Tools
Video 2 – Services and AIF
– Heavy investment in Services
– Mobile applications can plug in to the service model
– 90 webservices
– Simplified and Powerful Integration

Video 3 – Reporting
– Integration with Excel

Video 4 – Office Integration
– Collabration across Office, AX and Visual Studio
– Demo (Budget)

Video 5 – Usability
– End-User Simplicity
– Recruited people from the industry to test the usability scenarios
– Field Surveys
– Demo AR Customers/SO’s (Fact boxes)
– Consolidate Commands into Flexible Activity based Ribbons (Similar Look and feel as Excel, Word)
– Fast tabs
– “Go to Main Table” replaced by hyperlink lookups (cool feature)

Video 6 – Enterprise Portal
– Rich UI
– Travel Expense Demo
– Microsoft internal adoption (aka DogFooding)
– ISV’s interested to build on new add’ons for EP

Video 7 – Performance
- 20 x times faster than 2009
– Managed X++
– Leverages Virtualization
– Leverages AppFabric

Video 8 – Programmability
-Improvements in X++ Language
-Improvements in Language Performance
-Visual IDE and MorphX IDE
-Marrying C# and X++
-X++ managed language
-AOT in VS.Net

Video 9 – Security
-Improved Administration Experience for setting up Security
-Flexible Authentication (Leverages Claim Based Authentication from Sharepoint)

Video 10 – Simplicity
– Experiences for Developers, Administrators and End Users made simple
– For Developers – Goal to enrich .net and x++ developers experience
– Installation experience for Developer improved (Single Click Experience)
– Simplicity for System Administrators
– Good Feedback from Partner and Customer Channel

Video 11 – Processes and Workflow
-Graphical workflow Editor for Business Users and Application Developers
-Leverages Wofklow Foundation of .Net 4.0
-Flexible Work Item Queues
-60 Workflow Types out of the box

Video 12 – Organizational Model
-Model for External and Internal Reporting
-Policy Frameworks

Customer or Vendor import In Dynamics ax 2012 using Office add-ins

Customer or Vendor import is bit tricky now with Dynamics ax 2012. We have to follow certain steps to do that. Steps are documented below.  The reason why I am saying it is bit tricky because you have to deal with the GAB (Global address book) and its relationship with the Customer or vendor tables.  You can follow the below steps for successful import.  I am covering the blog with an example of Customer.

Minimum required fields to create the Customer records are listed below. You need to make sure that the following fields must be filled

Currency Customer account Customer group Name.Party ID Name

You also needs to be make sure that if customer table is referencing any other table record like Currency, which have stored in another table, similarly customer group and Name which are also stored in another table, so those tables must be filled in with the required information. Otherwise you would see error like below.

C000867 CustTable.createList
Line=4, Pos=4, Xpath=/CustTable/CustTable[1] The value in field Party is invalid.Creation has been canceled.The
value ‘CFA’ in field ‘Currency’ is not found in the related table ‘Currency’.The
value ‘1000’ in field ‘Customer group’ is not found in the related table ‘Customer
group table’

If you seeing the below error message then reason would be that, your number sequence for customer account would be setup as continuous. You need to change it to Manual, so that you can import customers with your defined numbers.

2 The number sequence Acco_1223 does not allow the Customer account to be

You would needs to go to Accounts Receivable/ Payable parameters. Look for the number sequence code and use View details to go to Number sequence form to Edit the specific number sequence for Customer/Vendor. Here you can change it to Manual. see the above image.

Column Party ID is very important, it is the FK record of DirPartyTable, that means the name information of the Customer would be stored in that table instead of Customer (CustTable). You also need to be sure that it should be unique for DirPartyTable records as it is PK there. If the Party ID is already there and you are trying to import it again, you may see the below error.

2 Cannot
create a record in Global address book (DirPartyTable). Party ID: 2, Radwan
Ezzeddine.The record already exists.Document Generic document could not be created. Error details: Cannot create
a record in Global address book (DirPartyTable). Party ID: 2, Radwan
Ezzeddine.The record already exists.


Create the (CustGroup) Customer group sheet should be like that. If Customer groups are not already setup.

Customer group Description
1000 Test
1010 Test
2000 Test
3000 Test

Create record in the Currency table if the currency is not already exists in the setup table.

Create record in the DirPartyTable table, sheet should be like that. Make sure that Party ID should be unique. Name should also be created correctly as the name from here will auto pick at the customer or vendor for a Party ID

Name Party ID Party type Professional suffix
Customer1 2 Organizations MR
Customer2 19 Organizations MR
Customer3 6 Organizations MR

Create Customer sheet should be like that. If you only filling the mandatory one. You can also go with the other info if needed. If you have created records in the above setup of base tables then importing data in customer or vendor would be very easy.

Currency Customer account Customer group Name.Party ID
CFA 1 1000 2
CFA 2 1000 19
CFA 3 1000 6

If you looking for How to create worksheet to publish the customer or Vendor data. Please see below information

You just needs to use the Add tables option to select the tables. After that drag the required fields from Field chooser dialog. Fill the data in the fields that you have choosen, finally use the Publish option to push data into AX.


Get every new post delivered to your Inbox.

Join 147 other followers

%d bloggers like this: