Sunday, December 26, 2010

Project Center cannot access the project Error


When you try to access EPM 2007 using your browser, you might see the following message

Project Center cannot access the project(s) you are trying to view. It is most likely that you either don’t have permissions to view the project, another user has deleted this project(s) before you were able to view it or that another user is in the process of publishing the project

Soulution

you have to remove web site compression for application file
if you use windows 2003 with IIS6

. Disable IIS Compression


If you use Windows 2008 with IIS 7








and then you have to rebuild the index of project server Database



USE ProjectServer_Published
GO
EXEC sp_updatestats

Thursday, December 16, 2010

SQL Server 2008 - Can't Save Changes to Table

When you design a table in a database and then try to make a change to a table structure that requires the table to be recreated, the management tools will not allow you to save the changes.

error like the flowing window appear "You have either made changes to a table that can’t be re-created or enabled the option Prevent saving changes that require the table be re-created"

image_thumb5


in management studio so go to tool>option and remove mark on Prevent Saving Changes that require table re-creation option

image


Tuesday, December 7, 2010

Updating and Deleting Custom Fields using the PSI


to Updating and Deleting Custom Fields value using the PSI in Project Server 
 private void btnUpdateCF_Click(object sender, EventArgs e)         {             Guid taskTextGuid = new Guid("30665299-bc21-4c51-b954-220d407ba47e");             Guid projectId = new Guid("4c1cef33-4810-4159-b2e1-db15ea19a28b");             WebSvcProject.ProjectDataSet projectDs =                  project.ReadProject(projectId, WebSvcProject.DataStoreEnum.WorkingStore);              foreach (WebSvcProject.ProjectDataSet.TaskCustomFieldsRow cfRow in                  projectDs.TaskCustomFields)             {                 if (cfRow.MD_PROP_UID == taskTextGuid)                 {                     cfRow.TEXT_VALUE = "Updated Value";                 }             }             Guid sessionUid = Guid.NewGuid();               project.CheckOutProject(projectId, sessionUid, "Updating CF");             Guid jobUid = Guid.NewGuid();             project.QueueUpdateProject(jobUid, sessionUid, projectDs, false);             jobUid = Guid.NewGuid();             project.QueueCheckInProject(jobUid, projectId, false, sessionUid, "Updating CF");          }


private void btnDeleteCF_Click(object sender, EventArgs e)         {             Guid taskTextGuid = new Guid("30665299-bc21-4c51-b954-220d407ba47e");             Guid projectId = new Guid("4c1cef33-4810-4159-b2e1-db15ea19a28b");             WebSvcProject.ProjectDataSet projectDs =                  project.ReadProject(projectId, WebSvcProject.DataStoreEnum.WorkingStore);                          foreach (WebSvcProject.ProjectDataSet.TaskCustomFieldsRow cfRow in                  projectDs.TaskCustomFields)             {                 if (cfRow.MD_PROP_UID == taskTextGuid)                 {                     cfRow.Delete();                 }             }             Guid sessionUid = Guid.NewGuid();              project.CheckOutProject(projectId, sessionUid, "Updating CF");             Guid jobUid = Guid.NewGuid();             project.QueueUpdateProject(jobUid, sessionUid, projectDs, false);             jobUid = Guid.NewGuid();             project.QueueCheckInProject(jobUid, projectId, false, sessionUid, "Updating CF");         }

Thursday, December 2, 2010

Delete a SSP (Shared Service Provider)

to deleting the default ssp(Shared Service Provider) you have to delete all the web application associated with and then open command prompt and dir to this direction
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
write this comand
stsadm -o deletessp -title "SharedServices1" -deletedatabases

Sunday, October 31, 2010

open URL directly from X++ code

open URL directly from X++ code , and you can pass parameter or Query String

static void openURL(Args _args)
{
infoLog.urlLookup('http://www.google.com');

}

Tuesday, October 26, 2010

Filter lookup from other lookup

Filter lookup from other lookup

this method is overrided method in TextEdit methods , used for filtring lookup according to value selected in other lookup
just change tablename and field name

I select RefPointSetupId from table HRCCompRefPointSetupLine and according to its value the second field RefPointId will filterd

Public void lookup ()
{
Query query = new Query();
QueryBuildDataSource queryBuildDataSource;
QueryBuildRange queryBuildRange;
SysTableLookup sysTableLookup;
;

//Create an instance of SysTableLookup with the form control passed in
sysTableLookup = SysTableLookup::newParameters(tablenum(HRCCompRefPointSetupLine), this);

//Add the fields to be shown in the lookup form
sysTableLookup.addLookupfield(fieldnum(HRCCompRefPointSetupLine, RefPointId));
sysTableLookup.addLookupfield(fieldnum(HRCCompRefPointSetupLine, RefPointSetupId));


//create the query datasource
queryBuildDataSource = query.addDataSource(tablenum(HRCCompRefPointSetupLine));

//Only show LocalEndpoints for the current company
queryBuildRange = queryBuildDataSource.addRange(fieldnum(HRCCompRefPointSetupLine, RefPointSetupId));
queryBuildRange.value(SalaryAmend.RefPointSetupId);

//Assign the query to the lookup form
sysTableLookup.parmQuery(query);

// Perform lookup
sysTableLookup.performFormLookup();

// Don't call super()
// super()
}

Saturday, July 24, 2010

Delete All Transaction Data and Keep Setup Data in Dynamics AX

Delete all transaction Data by run class SysDatabaseTransDelete

1 - Find SysDatabaseTransDelete class (AOT -> Classes -> SysDatabaseTransDelete)
2 - Right click on this class and select Open
3 - Agree to delete all transaction.