Wednesday, 30 July 2014

Service could not start in timely fashion when trying to start AX 2012 service

Hello all,

You may encounter this issue when you are trying to begin a AX 2012 service.The service status is "starting" for long time with no response.

Solution:
1)Wait for some time and check if the service begins.Just r-clk -> refresh.

2)If the 1st solution didn't work for 10 mins or so then do the following :

  • r-clk ->properties ->Log-on(Tab) ->this account
  • now browse and enter your login name
  • after that enter the correct password & confirm password.
  • It will say this changes will take effect only when the service restarts.
  • Now try stopping the service if it allows you to do so.
  • After stopping the service, start it again.This time the service should start successfully.(Do wait for the service to start even if it shows the same message again)
  • If the service is unable to stop then restart the system.Let the system load completely and wait for sometime so that the services start.This time the service should get into "started" status very soon.


In case of any doubts please add your queries to the comments.

Thanks 

Tuesday, 29 July 2014

virtualbox save machine state hangs at 100%

This happens when you are trying to save a virtualbox machine with the "Save the machine state" option.

Solution: Remove all the USB devices connected to the machine and then Save the machine state.

Hope this helps!!!

Saturday, 20 April 2013

Restrict duplicate records in AX

In case you have a requirement where you are suppose to restrict the duplicate records.

E.g. :


If in case you have 4 fields.
And you require that any two same record values in the four or less columns should not repeat.

You don't want same record(same combination) to be saved twice.



Column:       A            B          C             D
                 amit      60       India          emp
                  yatish       60       India          emp
                 amit         60       India          emp                ****this record should not be saved


Solution :

1) Make new index to the table.
2) Add the fields that you want to be added to the restricting combination.(Here all 4)
3)Go to properties and set 'AllowDuplicates' to "No".

This will restrict you from saving any duplicate combination in the table.

Note: In case you need only A & B column without repeat then add only A & B fields to index.

Delete all transaction data for a specific company in AX

I have noticed that sometimes we might need to delete all the transaction data for a particular company without altering the configuration data.This is possible in AX.

1)Login into AX in the company for which you want to delete the transaction data.
2)Go to AOT.
3)Open class SysDatabaseTransDelete
4)Run it and Click 'YES' to delete all the transaction data in the current logged in company.

This might take few moments depending on the amount of data.

Thursday, 14 March 2013

Lookup in AX

This is a small tutorial to setup lookup in ax.


1)Create a new enum - Trix_Enum with 3 enum elements - ele1,ele2 & ele3

2)Create a new EDT  by name : Trix_EDT_Id

3)Create a new table Trix_table with 4 fields :
   Trix_Id[datatype - Trix_EDT_Id]
   Trix_Name[datatype - Name]
   Trix_Type[datatype - Trix_Enum]
   Trix_amount[datatype - AmountMST]


4) Go to AOT> EDT> Trix_EDT_Id
    Expand the relation node and create a Normal relation.
    Go to properties and select the source table in "Table" & source table field in "RelatedField"(E.g.Trix_Id)
    Save the changes.

5)Go to the source table from which data should be lookup.
   Open the AutoLookup field group.
   Add the fields that need to be looked up.(E.g. Trix_Name,Trix_amount)

6)Now use the EDT "Trix_EDT_Id" as edt for any new field.The new field will look up the source         table(Trix_table) columns.(E.g. Here Trix_Id,Trix_Name,Trix_amount)

7)Incase of Related field fixed relation it works as a where clause/condition and should be given on enums.
   Go to AOT> EDT> Trix_EDT_Id
   Expand the relation node and create a Related field fixed relation.
   Go to properties and select the source table field in "RelatedField"(E.g.Trix_Type) & enum value(E.g. 0,1,2) in "Value".
    Note: The condition is ANDed with the normal relation.

Wednesday, 13 March 2013

Important functions in AX

Some useful Functions:

curuserid();
Function : Returns the user id of the current user.

curext();
Function : Returns the current logged in company.

today();
Function : Returns machine's current date.

systemdateget();
Function : Returns system application's current date.

System does not support setup 'continuous' of number sequence

Solution:

Some functions need to be called with a transaction processing.So just try using ttsbegin and ttscommit for the fuction call which is issuing the error.
Mostly issued while using the number sequence.

E.g:

ttsbegin;

// statements giving error

ttscommit;