This blog is all about Dynamics AX and X++.Microsoft Dynamics Ax tips and tricks .
Monday, July 30, 2007
MAIN MENU->BASIC->SETUP->NUMBERSEQUENCES->NUMBER SEQUENCE.
From a developers point of view, these are the tables which are important.
• NumberSequenceTable contains the definitions of each number sequence.
• NumberSequenceList holds numbers for continuous number sequences that have not been completed or are currently reserved.
• NumberSequenceReference holds which number sequence is used for which function.
• NumberSequenceGroup is a list of number sequence groups.
• NumberSequenceGroupRef contains the number sequence references specific to a group.
• NumberSequenceTTS holds the transaction id of a number before it has been completely assigned. It is used during the clean up process, in case of a system crash.
• NumberSequenceHistory holds a log of all changes made to the number sequence.
From a developers point of view, these are the classes which are important.
• NumberSeq assigns numbers and vouchers, handles continuous number sequences, and calls clean up when appropriate.
• NumberSeq_Fast is used for number sequences that are not continuous. It does not keep a record of the status or store transaction ids for later clean up, and is better performance wise.
• NumberSeqCleanUp looks for numbers in the list that have not been completed, looks for the session that created them, and, if the session is no longer active, frees up the number for later use.
• NumberSeqDataArea is used in the clean up process.
• NumberSeqFormHandler is used whenever a number sequence assigns a number in a form. It handles records being deleted and ensures that two users cannot use the same number.
• NumberSeqReference creates the link between the function and the number sequence. NumberSeqReference is the super class used, and there is a sub class for each module.
• NumberSeqNumCache contains the method to manipulate the cache of reserved numbers.
Saturday, July 28, 2007
Sate Design Pattern
namespace State_Pattern
{
public abstract class State
{
public abstract void Handle(Context context);
}
public class Context
{
State state;
public State State
{
get { return state; }
set { state = value; }
}
public Context()
{
this.state = new ConcreteStateA();
}
public void Handle()
{
state.Handle(this);
}
}
public class ConcreteStateA:State
{
public override void Handle(Context context)
{
Console.WriteLine("i am in Concrete A" );
context.State = new ConcreteStateB();
}
}
public class ConcreteStateB : State
{
public override void Handle(Context context)
{
Console.WriteLine("i am in Concrete B" );
context.State = new ConcreteStateA();
}
}
}
class Program
{
static void Main(string[] args)
{
Context context = new Context();
for(int a =0 ; a<10;a++)
context.Handle();
Console.ReadLine();
}
}
Wednesday, July 25, 2007
customizing Editor scripts
As a practice whenever me or my colleagues create a new Class/Form/Report in AX, we add a new method called DevelopmentHistory() which contains details on all modifications made to that object by any developer. It later becomes easy to view changes made and identify why they were made :).
Hence I added this method in the class:)
\Classes\EditorScripts\comments_DevelopmentHistory()
void comments_DevelopmentHistory(Editor e)
{
e.unmark();
e.gotoLine(1);
e.gotoCol(1);
e.insertLines('void DevelopmentHistory()'+'\n');
e.insertLines('{'+'\n');
e.insertLines('/*'+'\n');
e.insertLines('Made By :'+'\n');
e.insertLines('Date :'+'\n');
e.insertLines('Project Ref :'+'\n');
e.insertLines('Brief Functionality :'+'\n');
e.insertLines('=================='+'\n');
e.insertLines('Changes Made :'+'\n'+'\n'+'\n');
e.insertLines('*/'+'\n');
e.insertLines('}');
}
Done!
Tuesday, July 24, 2007
Friday, July 20, 2007
What is RecId
Share Point FAQ
Ans: Windows sharepoint is new technology, which is available in the form of service on Windows 2003 server. It uses CAML (Collaboration application markup language) Wss is more content management based with document libraries and lists.
Q: What is Share Point Portal?
Ans: Windows share point portal offering features like global navigation and searching.
Q: What is document library?
Ans: A document library is where you upload your documents, they consists of row and columns with links to the documents
Q: What is meeting workspace?
Ans: Documents workspace consists of information surrounding a single or multiple documents.
Q: What is a web part?
Ans: Web parts are nothing but the integrated controls which perform some specific task. In short web part is nothing but xml queries to full sharepoint list or document.
Q: What is web part zone?
Ans: Web part zone consist of zonetemplate, and it is nothing but a container in which we can drag and drop user control.
Q: What is DWP?
Ans: DWP is nothing but name of web part file extension
Q: What are various kinds of roles user can have?
Ans: 1. Reader: Has read only access to the web parts
2. Contributer: Can add content to existing document libraries and lists.
3. Web Designer: Can add content to the existing document libraries and lists
4. Administrator: Has full control of the web site
AX Web Form Control Properties
LookupControl:Creates a custom lookup with a relation between two table fields.
Set the LookupControl property to the name of the relating field, and the LookupMethod property to Custom.
MenuItemName:This property is not supported in Microsoft Dynamics AX.
MenuItemType:This property is not supported in Microsoft Dynamics AX.
ServerSideControl:Specifies whether tab changes are handled on the server or the client. Set the property to Yes for the server. Set the property to No for the client.
WebMenuItemName:Specifies the name of the menu item.The menu items in the property list vary depending on the setting of the WebMenuItemType property.
WebMenuItemType:Specifies whether the menu item is a URL link to a Web part page or an action that references a class or job.
Difference b/w Abstract class and Interfaces(C#)
·An abstract class can contain fields, constructors, or destructors and implement properties. An interface can not contain fields, constructors, or destructors and it has only the property's signature but no implementation.
·An abstract class cannot support multiple inheritance, but an interface can support multiple inheritance. Thus a class may inherit several interfaces but only one abstract class.
·A class implementing an interface has to implement all the methods of the interface, but the same is not required in the case of an abstract Class.
·Various access modifiers such as abstract, protected, internal, public, virtual, etc. are useful in abstract Classes but not in interfaces.
·Abstract classes are faster than interfaces.
Wednesday, July 18, 2007
Install of AX Enterprise Portal
EP Installation with WSS 3
I have decided to install
I use "Install and configure a Microsoft Dynamics AX Enterprise Portal Server" -white paper as a main source. This version is dated in February, 2007. Another tool I use is a memo downloaded from Microsoft Technet: "Deploy in a simple server farm (Windows SharePoint Sservices)" I can't make basic installation bacause our Database is located in another server. So we need a server farm.
So let's begin. I have uninstalled IIS and SharePoint including all the related databases.
Installed or created prerequisites:
- Dynamics AX client
- Business connector proxy in AD
- SQL Server 2005(Security & Login settings)
1. Install IIS (ASP.net, Frontpage not selected)
2. Enable ASP.NET 2.0 (\Windows\Microsoft.net\Framework\v2.0.50727)
3. Copy Ax32.exe.config to the \Client\Bin -folder
4. Install .NET Framework 3
5. Install WSS 3
5.1 Choose Installation: Advanced
5.2 Server type: Web Front End - Install
5.3 "Run the Share...." -check box selected - Close
5.4 Configuration Wizard
5.4.1 "No, I want to create a new server farm" Next
5.4.2 Database server and database name, User name (proxy user) & psw
5.4.3 Specify Port number - empty, NTLM - next, next, Finish
5.5 IE: tools, internet options, trusted sites - add
Create new web application
5.6 Central Administrator page: Application management/SharePoint Web application management/Create or extend...
5.7 Click "Create a new web application"
5.8 Create a new IIS web site: "Sharepoint - 80", Allow anonymous - Yes, Create a new application pool: "Sharepoint - 80", Configurable: User name: (proxyuser), psw - Others default
5.9 "Iisreset /no force" in command prompt
5.10 Operations-tab/ Security Configuration/service accounts: Web Service: Choose "Windows Sharepoint..."
5.11 In Application pool, select "Sharepoint - 80"
5.12 Select configurable. User name: (domain\proxyuser), OK, "iisreset /noforce"
6. Configure ASP.NET (web.config-file) and "iisreset /noforce"
7. Add Proxy-user to the groups: Power users, IIS_WPG, WSS_WPG
8. Configure IIS for SharePoint and EP:
8.1 Open IIS manager. Right click Web sites. Choose properties
8.2 Directory security/Authentication and access control, edit: Integrated Windows authentication - OK
8.3 Expand Application pools. Choose Sharepoint - 80 and properties. Check that Proxy-user is in configurable in Identity-tab.
8.4 Expand Web sites. Choose Sharepoint - 80 and properties. Check that Asp.net version v2.0... is selected in ASP.net tab. Check also Sharepoint central Admin v3 -site.
9. Install EP. Choose
10. Open AX client and run EP Configuration wizard if not already done (I had earlier installation)
11. Complete Manage deployment wizard. I got error:"Cannot create Performance Category 'Microsoft Dynamics: Enterprise Portal' because it already exists." This might be because of earlier installation so I don't mind this.
12. Create EP site
12.1 In Client menu...EP/Web sites. Click Create site. Create a site collection-page opens
12.2 Fill in needed info. In template selection: Choose custom and Dynamics public
12.3 Primary & secondary administrators I chose myself and Proxy-user. Ok.
12.4 Top level site successfully created. Copy the url and click OK.
12.5 In AX-client/Web sites click Register site.
12.6 Paste the url. Type is Full, Anonymous=true and Press CTRL+S to save changes. Click View in Browser.
12.7 Delete the site from the AX when Register site-page opens in browser.
12.8 Choose the company. Click Register.
12.9 If everything goes fine the installation is completed. Now I have to add the user relations settings.