Showing posts with label Dynamics ax 2012. Show all posts
Showing posts with label Dynamics ax 2012. Show all posts

Thursday, 12 November 2015

How to: Add Web Module Items [AX 2012]

Web Module items are created in the AOT, and then deployed to the server that is running Enterprise Portal.


To create a submodule

  1. In the AOT, expand the Web node, and then expand the Web Modules node.
  2. Expand the Home node. This node represents the main site for Enterprise Portal. The submodules under this node represent module sites for Enterprise Portal.
  3. Right-click the node for the module or submodule to which you want to add the new submodule.
  4. Specify the properties for the new submodule, including the Name and Label.
  5. Specify the MenuItemName property, which indicates which Web Menu Item URL will be displayed for the submodule. Typically, this is the site home page for the submodule. If this page has not yet been created, you can set this property after the page has been created and the URL item for the page has been defined.
  6. Specify the QuickLaunch property, which indicates the Web Menu resource that will be displayed in the QuickLaunch area for all pages in the subsite that have the QuickLaunch web part. Refer to How to: Create a QuickLaunch for more information about how to do this.
  7. Save the changes in the AOT.
  8. Right-click the new submodule and click Deploy. This will create the subsite and menu item for the Enterprise Portal installation.


To create a menu item

  1. In the AOT, expand the Web node, and then expand the Web Modules node.
  2. Expand the Home node. This node represents the main site for Enterprise Portal. The submodules under this node represent module sites for Enterprise Portal.
  3. Right-click the node for the module or submodule to which you want to add the new menu item.
  4. Specify the MenuItemName property, which indicates which Web Menu Item URL will be used for navigation of the submodule menu item.
  5. Save the changes in the AOT.

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

 

Tuesday, 10 November 2015

Disable Business operation in CIL.


goto Tools -> Options -> Development

Disable Execute business operation in CIL

 

How to create PO from approved PR lines

Click Procurement and sourcing > Common > Purchase requisitions > Release approved purchase requisitions.
 
  • Use this form to review approved purchase requisition lines that have been held for manual processing, consolidate eligible requisition lines, and manually convert the approved purchase requisitions to purchase orders.

  • A purchase order is created for each currency, vendor, or legal entity that is identified on the purchase requisition lines. For example, if a purchase requisition has two lines, and each line has a different vendor, currency, or legal entity, two purchase orders are created. Also, depending on how purchasing policies are configured for your organization, separate purchase orders can be created if the purchase requisition lines have different requesters, line types, or procurement categories.
 

Debbuger is coming blank or Its showing No debugger has installed.

There are many reasons behind this error.


  • User is not in the list of Microsoft Dynamics Debugger Group. control panel -> user account -> change user account type-> select advance tab -> clcik advance button-> select group -> double click on microsoft Dynamics AX Debugger group-> add user.


  • User is not in the list of Administrator Group. control panel -> user account -> change user account type-> select advance tab -> clcik advance button-> select group -> double click on Administrator group-> add user.
  • UAC should be disable. control panel -> User account -> User Account control setting -> select never notify.

  • Run as administrator while open AX. right click ax clinet and select run as administrator.
  • Install the Debbuger from the AX setup file.
  • Dynamics AX server configuration, check the Enable Breakpoint to debug X++ code running and Enable Global breakpoint


  • Dynamics AX client configuration -> configuration target , select business connector and Local client both one by one and check the Enable user breakpoint to debug .. checkbox and Enable global breakpoint to debug .. checkbox



 

Debbuger is coming blank or Its showing No debugger has installed.

There are many reasons behind this error.


  • User is not in the list of Microsoft Dynamics Debugger Group. control panel -> user account -> change user account type-> select advance tab -> clcik advance button-> select group -> double click on microsoft Dynamics AX Debugger group-> add user.


  • User is not in the list of Administrator Group. control panel -> user account -> change user account type-> select advance tab -> clcik advance button-> select group -> double click on Administrator group-> add user.
  • UAC should be disable. control panel -> User account -> User Account control setting -> select never notify.

  • Run as administrator while open AX. right click ax clinet and select run as administrator.
  • Install the Debbuger from the AX setup file.
  • Dynamics AX server configuration, check the Enable Breakpoint to debug X++ code running and Enable Global breakpoint


  • Dynamics AX client configuration -> configuration target , select business connector and Local client both one by one and check the Enable user breakpoint to debug .. checkbox and Enable global breakpoint to debug .. checkbox