Wednesday 11 November 2015

Change the password of the service account.

goto services.msc

 
 
 
 
 
 

Select the service for which you want to change the password. and goto properties.

 
you can make it as manual or automatic startup, this one is useful when your system will start.

 
 
select the log on tab  to change the password.

 
 

apply this change to all SQL services where this username is being used.

sometime there will be situation when Dynamics ax process will be on starting status for longtime and then stop for that please check following thing.

  • try to start services from command prompt with elevated permissions using the below command :
"net start AOS60$01"

  • check the event viewer for perticular error and try to solve it 
  • check the dependent services like SQL, that they are running fine.
  • there can be possibility that some of the process running on SQL side blocking the AX metadata, please stop that processes first.


 

Change the password of the service account.

goto services.msc

 
 
 
 
 
 

Select the service for which you want to change the password. and goto properties.

 
you can make it as manual or automatic startup, this one is useful when your system will start.

 
 
select the log on tab  to change the password.

 
 

apply this change to all SQL services where this username is being used.

sometime there will be situation when Dynamics ax process will be on starting status for longtime and then stop for that please check following thing.

  • try to start services from command prompt with elevated permissions using the below command :
"net start AOS60$01"

  • check the event viewer for perticular error and try to solve it 
  • check the dependent services like SQL, that they are running fine.
  • there can be possibility that some of the process running on SQL side blocking the AX metadata, please stop that processes first.


 

Approved Workflow using code.

Below is the code to approve workflow thru code for any perticular Expense Order, same code can be use for SO, PO and many more.



static void ASCApprovedExpWorkflow_ex(Args _args)
{
TRVExpTable trvExpTable;
WorkflowWorkItemTable workflowWorkItemTable;
WorkFlowTrackingStatusTable workflowTrackingStatusTable;
trvExpTrans trvexpTrans;
;
ttsbegin;
select forupdate trvExpTable where trvExpTable.ExpNumber == ExpId && trvExpTable.dataAreaId == COMPANYID
{
       trvExpTable.ApprovalStatus = TrvAppStatus::Approved;
       trvExpTable.update();
       ttsbegin;
       while select forupdate trvExpTrans where trvExpTrans.ExpNumber == trvExpTable.ExpNumber &&                        trvExpTrans.dataAreaId == COMPANYID
     {
              trvExpTrans.ApprovalStatus = TrvAppStatus::Approved;
              trvExpTrans.update();
       }
     ttscommit;
     ttsbegin;
      while select forupdate workflowTrackingStatusTable where workflowTrackingStatusTable.ContextRecId == trvExpTable.RecId && workflowTrackingStatusTable.ContextTableId == trvExpTable.TableId
 && workflowTrackingStatusTable.dataAreaId == COMPANYID
       {
                 workflowTrackingStatusTable.TrackingStatus = WorkflowTrackingStatus::Completed;
                 workflowTrackingStatusTable.update();
                 ttsbegin;
                 while select forupdate workflowWorkItemTable where workflowWorkItemTable.RefRecId ==   workflowTrackingStatusTable.ContextRecId && workflowWorkItemTable.RefTableId == workflowTrackingStatusTable.ContextTableId && workflowWorkItemTable.dataAreaId == COMPANYID
                  {
                           workflowWorkItemTable.Status = WorkflowWorkItemStatus::Completed;
                           workflowWorkItemTable.update();
                   }
                ttscommit;
     }
   ttscommit;
}
ttscommit;
}
 

 
 

 
 

Approved Workflow using code.

Below is the code to approve workflow thru code for any perticular Expense Order, same code can be use for SO, PO and many more.



static void ASCApprovedExpWorkflow_ex(Args _args)
{
TRVExpTable trvExpTable;
WorkflowWorkItemTable workflowWorkItemTable;
WorkFlowTrackingStatusTable workflowTrackingStatusTable;
trvExpTrans trvexpTrans;
;
ttsbegin;
select forupdate trvExpTable where trvExpTable.ExpNumber == ExpId && trvExpTable.dataAreaId == COMPANYID
{
       trvExpTable.ApprovalStatus = TrvAppStatus::Approved;
       trvExpTable.update();
       ttsbegin;
       while select forupdate trvExpTrans where trvExpTrans.ExpNumber == trvExpTable.ExpNumber &&                        trvExpTrans.dataAreaId == COMPANYID
     {
              trvExpTrans.ApprovalStatus = TrvAppStatus::Approved;
              trvExpTrans.update();
       }
     ttscommit;
     ttsbegin;
      while select forupdate workflowTrackingStatusTable where workflowTrackingStatusTable.ContextRecId == trvExpTable.RecId && workflowTrackingStatusTable.ContextTableId == trvExpTable.TableId
 && workflowTrackingStatusTable.dataAreaId == COMPANYID
       {
                 workflowTrackingStatusTable.TrackingStatus = WorkflowTrackingStatus::Completed;
                 workflowTrackingStatusTable.update();
                 ttsbegin;
                 while select forupdate workflowWorkItemTable where workflowWorkItemTable.RefRecId ==   workflowTrackingStatusTable.ContextRecId && workflowWorkItemTable.RefTableId == workflowTrackingStatusTable.ContextTableId && workflowWorkItemTable.dataAreaId == COMPANYID
                  {
                           workflowWorkItemTable.Status = WorkflowWorkItemStatus::Completed;
                           workflowWorkItemTable.update();
                   }
                ttscommit;
     }
   ttscommit;
}
ttscommit;
}
 

 
 

 
 

Function EcoResProductNumberBuilderVariant.validateForNumber has been incorrectly called

 

Solution:      It is data problem,

EcoResProductIdentifier table missing the values for perticulat Product Number, create reacord manually.

Function EcoResProductNumberBuilderVariant.validateForNumber has been incorrectly called

 

Solution :      It is data problem,

EcoResProductIdentifier table missing the values for perticulat Product Number, create reacord manually.

Using the Infolog , Error box on the EP(Enterprise Portal):

 

Solution:     In the portal you can access the infolog by using the Proxy of the Enterprise Portal.

using Proxy = Microsoft.Dynamics.Framework.BusinessConnector.Proxy;

Proxy.Info objInfoLog = new Proxy.Info(this.AxSession.AxaptaAdapter);
 

Now, when you want to write something to the infolog you need to give a Enum with it, so the portal knows if the message you want to show is a info, warning or error. So pass through Proxy.Exception.Info, Proxy.Exception.Warning or Proxy.Exception.Error.

 objInfoLog.add(Proxy.Exception.Warning, "My warning");

Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics.


 
 


Solution:-

  • Run full CIL
  • Try to solve all errors if any
  • In the database give the proper rigths to the current login user
  • Try to use without Execute CIL checkbox

 

Failed to create a session; confirm that the user has the proper privileges to log on to Microsoft Dynamics.


 
 


Solution:-

  • Run full CIL
  • Try to solve all errors if any
  • In the database give the proper rigths to the current login user
  • Try to use without Execute CIL checkbox