Skip to main content

Posts

Showing posts with the label ENTERPRISE PORTAL

Print Report in PDF in EP Site in MSD axapta 2009,4.0

If you are trying to print and display report in Enterprise portal in axapta then you need to add some code in class EPSenddocument on new method. case tablenum(CustPackingSlipJour): mailAddress = SalesTable::find(record.(fieldnum(CustPackingSlipJour,SalesId))).Email; if (record.(fieldnum(CustPackingSlipJour,InvoiceAccount))) StrVarialble1 = record.(fieldnum(CustPackingSlipJour,InvoiceAccount)); else StrVarialble1= record.(fieldnum(CustPackingSlipJour,OrderAccount)); documentTitle = fileName("SalesPKSLP"); reportName = reportstr(SalesPackingSlip); break; Here its example of sales packing slip report print . You need to add new case in switch statement.

How to set debug for Enterprise portal in MSD axapta

X++ code can be used in various parts of a page, such as Web forms, reports, and Weblets. You can debug X++ code for elements that display on pages by using the debugger for Microsoft Dynamics AX. You can debug Enterprise Portal code only on the system that is running Internet Information Services (IIS). Setting Up Debugging for Pages -------------------------------------------------------------------------------- To set up debugging for pages 1.Log into the server that is running the AOS. 2.Open the Microsoft Dynamics AX Server Configuration utility (Start > Control Panel > Administrative Tools > Microsoft Dynamics AX 2009 Server Configuration). 3.Create a new configuration that allows debugging. a.Click Manage and then click Create configuration. In the Create Configuration window, name the new configuration, such as "DAX Debugging". Click OK. b.On the Application Object Server tab, select Enable breakpoints to debug code X++ code running on this ser

Create Web Modules in Enterprise portal in MSD axapta

Create Web Modules in Enterprise portal in axapta 1. Create your module as a sub module to Home. Do not create it as a sibling to Home module. 2. Set the Quick-launch and MenuItemName property. Both are required for the module to work 3. To get this new module in an existing EP site, mark that EP site as the Dev AOT site in the websites form in AX client and right click on the newly created module and deploy. Note you can only deploy the web module once. It won’t redeploy if that subsite already exists. 4. After deploying reset IIS and AOS for it to appear in the top nav.

Things which need to learn in Enterprise portal in Microsoft dynamics axapta

If you want to become master in EP then you need to cover following topics in your learning. 1. Enterprise Portal Components 2. Enterprise Portal Architecture 3. Enterprise Portal Requirements 4. .NET Business Connector 5. Create Business Connector Proxy 6. Add Proxy to IIS 7. Configure IIS Application Pool 8. Install Enterprise Portal Framework and Role Centers 9. Install Enterprise Portal Developer Tools 10. Configure Enterprise Portal 11. Deploy Role Centers 12. The AOT Web Node 13. Creating a User Control in Visual Studio .Net. 14. Creating a Web Form in AOT. 15. Creating a Header Line Form in .NET. 16. Creating a Web Report and displaying the Contents Graphically. 17. How to filter a grid in EP on the click of a button. 18. Customizing and Personalizing Enterprise Portal 19. Creating Proxies in Ax 20. Defining Methods in Data set and calling them in EP 21. Filtering a Web Report through a Dialog Box in EP 22. Linking of 2 Web Parts and transferring data fro

Solution for Error unable to load usercontrols and .ascx file not found in MSDAX

1. Create a Directory called “usercontrols” in the root of your share point web site on the file system E.g. C:\Inetpub\wwwroot\wss\VirtualDirectories\moss.litwareinc.com80\UserControls 2. Open IIS manager and in the root of your Share Point site create a Virtual Directory called “_controls” and point it to that newly created directory. 3. Put your user control in that newly created directory on the file system 4. Open the web.config file and add the following: 5. In your ASPX page add the following: <%@ Register src="~/_controls/SomeControl.ascx" mce_src="~/_controls/SomeControl.ascx" TagName="somecontrol" TagPrefix="uc2" %"> 6. Run your ASPX page and your control should render correctly.

Configure the HTTP Service Principal Name in MSD axapta

Configure the HTTP Service Principal Name Use this procedure to create an HTTP SPN for each Enterprise Portal and SQL Server Report Server computer. You can perform this procedure from one computer. It is not necessary to perform this procedure locally on each server. 1. Open the Windows Support Tools command prompt (Start > All Programs > Windows Support Tools > Command prompt). 2. At a command prompt, type the following command and press Enter: Setspn.exe -A HTTP/{server name} {application pool account} For this command, remove the braces {}, replace server name with the name of the server computer, and replace application pool account with the domain\name used for the IIS application pool. Here is an example of this command: Setspn.exe -A HTTP/EnterprisePortal1 contoso\WebAccount 3. Type the following command and press Enter: Setspn.exe -A HTTP/{the server fully-qualified domain name} {application pool account} For this command, remove the braces {}, replace the

Customer Portal in MSD Axapta

Customer Portal in Axapta Customer Portal gives service customers access to their service related data over an enterprise portal whenever required, thereby providing a new 365 days a year,24 hours a day kind of interaction between the service company nd the customer. A decrease in the tasks associated with giving service customers access to the data through other communication channels (telephone, e-mail messages, and so on) is expected. Basically, Customer Portal helps the Service customer who has two groups of requirements: • The need to view the data relevant for the service operation done on service items • The need to connect to the service company to initiate a service request

Install Role Centers and enterprise portal in MSD axapta

1. Insert the Microsoft Dynamics AX 2009 DVD into the drive. If the Microsoft Dynamics AX Setup Wizard does not launch automatically, double-click Setup.exe in the root directory of the DVD. If installing from a network location, share the installation files and connect to the shared location from the computer where the program will be installed. 2. On the Select maintenance mode screen, select Add or modify components and click Next. 3. Select Role Centers and Enterprise Portal, and then click Next. 4. Complete the installation wizard. Please refer below website to know more .

Exceptions in Enterprise Portal in MSDAX

Exceptions in Enterprise Portal are divided into three categories • NonFatal   The exception handling code should respond appropriately and allow the request to continue normally. • AxFatal   Indicates that an unrecoverable error has occurred in Enterprise Portal. Enterprise Portal content will not display. Content not related to Enterprise Portal should display as expected. • SystemFatal   Indicates that a serious error, such as out of memory, has occurred and the request must be aborted. Errors of this kind often cause an HTTP error code 500. E.g. Try { // Code that may encounter exceptions goes here. } catch (System.Exception ex) { AxExceptionCategory exceptionCategory; // Determine whether the exception can be handled. if (AxControlExceptionHandler.TryHandleException(this, ex, out exceptionCategory) == false) { // The exception was fatal and cannot be handled. Rethrow it. throw; } if (exceptionCategory == A

Programmatically reading data from AxDataSourceControl in EP Axapta

To get details about Programmatically  reading data from AxDataSourceControl you can refer below code privatevoid GetData() { DataSourceViewSelectCallback callback = newDataSourceViewSelectCallback(PrintData); AxDataSource1.GetDataSourceView("CustTable").Select(DataSourceSelectArguments.Empty,callback); } privatevoidPrintData(IEnumerable data) { IEnumerator i = data.GetEnumerator(); while (i.MoveNext()) { Response.Write(DataBinder.Eval(i.Current, "AccountNum").ToString() + “<BR/>”); } }

Code for Proxies in Enterprise portal of Axapta

Code for Proxies in Enterprise portal of Axapta If you would like to use your table methods or X++ classes or Enums in managed code, you should add them to proxies file under AOT\Web\Web Files\Static Files\Proxies. Typically Proxies are used if you need to access or update data that’s outside of Dataset or you would like to reuses some business logic in both Client and EP. /table:EmplTable /method:EmplTable.find /enum:TrvExpType /class:EPTrvItemization /method:EPTrvItemization.insertItemizedLines After changing the Proxies file, you can generate the proxies file using Tools->Development Tools -> Development Tools-> Web Development -> ProxiesOr by clicking the Update button in Manage deployment UI. Create the complete URL in code (based Oneb Menu Items) protected override void OnPreRender(EventArgs e) { // Gets the current view to the record selected in the dropdown DataSetView view = dsSales.GetDataSourceView(ddSales.Data

Access the Current Row and Field value in Enterprise portal

Access the Current Row and  Field value in Enterprise portal private DataSetViewRow CurrentRow { get { try { DataSetView dsv = this.CustomersDS.GetDataSet().DataSetViews["EmplTable"]; return (dsv == null) ? null : dsv.GetCurrent(); } priviate Test() { using (IAxaptaRecordAdapter EmplTable= this.CurrentRow.GetRecord()) { customerName = custTable.GetField("EmplTable").ToString(); } }

Code for Conditionally Making Grid Row Editable in Enterprise portal

Code for Conditionally Making Grid Row Editable in Enterprise portal public partial class AxWebUserControl : System.Web.UI.UserControl { void Page_Init(object sender, EventArgs e) { this.AxGridView1.SelectedIndexChanged += new EventHandler(AxGridView1_SelectedIndexChanged); } void AxGridView1_SelectedIndexChanged(object sender, EventArgs e) { this.EnableGridEditing(this.IsCurrentAccountNumberEven()); } private void EnableGridEditing(bool enable) { if (enable) { this.AxGridView1.AllowEdit = true; this.AxGridView1.EditIndex = this.AxGridView1.SelectedIndex; } else { this.AxGridView1.EditIndex = -1; this.AxGridView1.AllowEdit = false; } } private bool IsCurrentAccountNumberEven() { DataSet dataSet = this.CustomersInfoDS.GetDataSet(); DataSetViewRow currentRow = dataSet.DataSetViews[this.AxGridView1.DataMember].GetCurrent(); if (currentRow != null) { string accoun

Code to get Get the Bound field in Enterprise portal

Code to get Get the Bound field in Enterprise portal static AxBoundField GetField(DataControlFieldCollection fields, string name) { foreach (DataControlField field in fields) { AxBoundField boundField = field as AxBoundField; if (boundField != null && String.Compare(boundField.DataField, name, true) == 0) return boundField; } return null; } AxBoundField parentCaseId = (AxBoundField)GetField(this.GeneralRight.Fields, "editParentCaseId**")

Code to Call AX class in .Net

Code to Call AX class in .Net using Microsoft.Dynamics.BusinessConnectorNet; namespace InsertAxRecord { class Program { static void Main(string[] args) { Axapta ax; AxaptaRecord record; try { // Create AX object and logon to AX ax = new Axapta(); ax.Logon(null, null, null, null); // Create a new AxaptaRecord object with // the name of the table as input parameter using (record = ax.CreateAxaptaRecord("ABCTable")) { // Remember to clear the tablebuffer if you are inserting inside a loop record.Clear(); record.InitValue(); // Set the fields in the table record.set_Field("ss", "dd"); record.set_Field("dd", ddg); record.set_Field("dd", "dd"); record.set_Field("df", "dff"); record.set_Field("dfd", dfdf); // Insert the record record.Insert(); } // End the AX session ax.Logoff(); } catch (Exception e)

How to tackle Enterprise portal update problems in axapta

 As we know business connector is main links which connect ssrs,WF,EP,AIF etc to ax or aos (application object server) and aos ,database and domain controller is another strong part of dynamics axapta. some times when we made changes to any web user control then changes did not reflect immediate its reflect after some times. following point you keep in mind if you are developing any EP application. 1. add user control to aot if its newly created. 2. If changes not reflecting then you need to change source code on all three places .net project ,ax aot and ep folder files. 3. If still changes not reflecting then deploy your page again using aot and use iisreset command in command prompt. 4. Instead of restarting iis you need to restart application pool. 5. At last you can use all three opton of refresh aod refresh , data dictionary etc which comes on your ep home menu. I think those all ideas will help you to develop your application of enterprice portal. your feedback

Conditionally Making Grid Row Editable in EP Axapta

This is code hint to Conditionally Making Grid Row Editable in Enterprise Portal in  Axapta . public partial class AxWebUserControl : System.Web.UI.UserControl { void Page_Init(object sender, EventArgs e) { this.AxGridView1.SelectedIndexChanged += new EventHandler(AxGridView1_SelectedIndexChanged); } void AxGridView1_SelectedIndexChanged(object sender, EventArgs e) { this.EnableGridEditing(this.IsCurrentAccountNumberEven()); } private void EnableGridEditing(bool enable) { if (enable) { this.AxGridView1.AllowEdit = true; this.AxGridView1.EditIndex = this.AxGridView1.SelectedIndex; } else { this.AxGridView1.EditIndex = -1; this.AxGridView1.AllowEdit = false; } } private bool IsCurrentAccountNumberEven() { DataSet dataSet = this.CustomersInfoDS.GetDataSet(); DataSetViewRow currentRow = dataSet.DataSetViews[this.AxGridView1.DataMember].GetCurrent(); if (currentRow != null) { string accountNum

Managed Code Custom Lookup in Enterprise portal axapta

This is code hint for Managed Code Custom Lookup in Enterprise portal of axapta. protected void Name_Lookup(object sender, AxLookupEventArgs e) { AxLookup nameLookup = e.LookupControl; string partyName = "*"; try { // We set the lookup range based on either the name selected or "*" // We get the range value from the current view field value partyName = this.DataSourceView.DataSetView.GetCurrent().GetFieldValue("DirPartyTable!Name").ToString(); // Create the lookup dataset - we will do a lookup in the DirPartyTable table using (Proxy.SysDataSetBuilder sysDataSetBuilder = Proxy.SysDataSetBuilder.constructLookupDataSet(this.AxSession.AxaptaAdapter, TableMetadata.TableNum(this.AxSession, "DirPartyTable"))) { // Set the run time generated data set as the lookup data set nameLookup.LookupDataSet = new DataSet(this.AxSession, sysDataSetBuilder.toDataSet()); } // DataSet has to be init'ed before accessing th

Passing parameters from Managed code to axapta X++ in dataset

This is code hint for Passing parameters from Managed code to axapta X++ in dataset of Enterprise portal protected void Page_Init(object sender, EventArgs e) { this.AxDataSource1.CreatingDataSetRun += new EventHandler(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, &q