Saturday, April 16, 2011

Not able to access Role Center page in Microsoft Dynamics AX 2009 VPC 3.5

I was trying to install Role Centers on the default home page on Microsoft Dynamics AX 2009 where i was getting a message.




To resolve this issue i searched over google and found a good article which tells how to enable the Role Centers in Microsoft dynamics AX 2009.


1. We need to start three services in windows Server services

-SQL Server Analysis Services
-SQL Server Reporting Services
-World Wide Web Publishing Service
 
https://community.dynamics.com/product/ax/f/33/t/24013.aspx
 
2. Then we need to make an entry in the host file for the Enterprise portal. Refer the following.
 

Go to C:\Windows\System32\drivers\etc and Open the hosts file using notepad

Add one record in the bottom

127.0.0.1                 sharepoint 
 
3. Then we need to create a new page and add it as a role center in microsoft dynamics ax 2009. Follow the steps given in the link below.
 
http://dynamic-ax.co.uk/Documents/How%20to%20Create%20a%20New%20Role%20Centre%20in%20Dynamics%20AX%202009.pdf
 
or
 
http://www.host-files.com/i/download.php?file=835RoleCenter.PDF
 

4. If you are getting an error "Error in Url property error"
while clicking on the URL property then you need to download a patch for the resolution.
 
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=17c36612-632e-4c04-9382-987622ed1d64
 
5. Go to Navigation Pane and select Administration-> Setup-> User Profile


6. Add a new record by clicking Ctrl+N or the new button. Fill in the details and in the Role Center Field give name of the page that your have created previously.



7. Click on the button 'Add User' and select the companies.


8. Select the Users to add and click 'ok'.




9. After these steps changed the 'Default Role Center' to your page name and click 'ok'.
 
 
10. Restart Microsoft Dynamics AX 2009 application and you will be able to see the Role Center Page that you have created.

Tuesday, April 12, 2011

How to get a number sequence for the POS module.



1. Create an element in base enum NumberSeqModule as POSModule.
 
2. Create a class NumberSeqReference_POSModule

 
public class NumberSeqReference_POS extends NumberSeqReference
{
}
 
3. Create two methods inside the class LoadModule() and NumberSeqModule().

 
protected void loadModule()
{
NumberSequenceReference numRef;
;
numRef.DataTypeId = typeId2ExtendedTypeId(typeid(POSRegisterID));
//POSRegisterId is the Extended data type
numRef.ConfigurationKeyId = configurationkeynum(logisticsBasic);
numRef.ReferenceHelp = literalstr("For POS Register ID");
numRef.WizardManual = NoYes::No;
numRef.WizardAllowChangeDown = NoYes::No;
numRef.WizardAllowChangeUp = NoYes::No;
numRef.SortField = 1;
this.create(numRef);
}

static NumberSeqModule numberSeqModule()
{
return NumberSeqModule::POSModule;// this is the element in base enum that you have created before
}
 
4. Modify the NumberSeqReference Class and change the Construct() and ModuleList()

 
//construct:
// POS addition begin
case (NumberSeqReference_POS::numberSeqModule()): return new NumberSeqReference_POS(_module);
// POS addition end

//Module List:
// POS Begin
moduleList += NumberSeqReference_POS::numberSeqModule();
// POS End
 

5. Create a class on the POSTableForm

 
public class FormRun extends ObjectRun
{
NumberSeqFormHandler numberSeqFormHandler;
}
 
6.Create a Method in the Table POSRegisterTable as numRefPOS()

 
client server static NumberSequenceReference numRefPOS()
{
return NumberSeqReference::findReference(typeId2ExtendedTypeId(typeid(POSRegisterId)));
}
 
7. Create a new method for the class

 
NumberSeqFormHandler numberSeqFormHandler()
{
if (!numberSeqFormHandler)
{
numberSeqFormHandler = NumberSeqFormHandler::newForm(POSRegisterTable::numRefPOS()
.NumberSequence,
element,
POSRegisterTable_DS,
fieldnum(POSRegisterTable, RegisterId)
);
}
return numberSeqFormHandler;
}
 
8. Override create method on the POSRegisterTable in the datasource methods

 
void create(boolean append = false,
boolean extern = false) // If created externally
{
;

super(append);

if (!extern)
{
element.numberSeqFormHandler().formMethodDataSourceCreate();
}
}
 
9. Override write method on the POSRegisterTable in the datasource methods

 
void write()
{
boolean updateCurrency;
NoYes newRecord;
;
super();
element.numberSeqFormHandler().formMethodDataSourceWrite();
}
 
10. Override delete method on the POSRegisterTable in the datasource methods

 
void delete()
{
FormDataSource callerDataSource;
;
element.numberSeqFormHandler().formMethodDataSourceDelete();

if (!posRegisterTable.RecId)
{
DirParty::showHideMessageBar(element,posRegisterTable,true);
}

super();

if (element.args() && element.args().dataset() == tablenum(smmBusRelTable))
{
callerDataSource = element.args().record().dataSource();
if (callerDataSource)
{
callerDataSource.executeQuery();
}
}
}
 

Tuesday, April 5, 2011

Microsoft Certifications

Use the link below to go to the Microsoft Dynamics AX 2009 certification page from Microsoft.

http://www.microsoft.com/learning/en/us/certification/dynamics-ax-professional.aspx#tab2

Friday, April 1, 2011

How to call Print JobSettings using a button

Adding Print Job Settings to a button on your form in microsoft dynamics AX On the click event of the button you need to write the code:

Args args = new Args(reportstr(POSReciept));
PrintJobSettings printJobSettings;
ReportRun reportRun;
;
printJobSettings = new PrintJobSettings();
printJobSettings.SetTarget(PrintMedium::Printer); printJobSettings.suppressScalingMessage(true);

reportRun = new ReportRun(args);
reportRun.setTarget(PrintMedium::Printer);
reportRun.init(); reportRun.run();