Showing posts with label errors. Show all posts
Showing posts with label errors. Show all posts

23 May 2017

Refresh or Ctrl + F5 issue + AX 2012

 FormRun         formRun;
    FormObjectSet   formObjSet;
    int             i;
    InventTable     linventTable;

  
    if (this.isFormDataSource())
    {
        formRun = this.dataSource().formRun();
        for (i=1; i<= formRun.dataSourceCount(); i++)
        {
            if (formRun.dataSource(i).cursor() is InventTable)
            {
                formObjSet = formRun.dataSource(i);
                linventTable = formObjSet.cursor() as InventTable;
                break;
            }
        }
        if (!linventTable)
        {
            linventTable = InventTable::find(this.ItemId, true);
        }
        if (linventTable)
        {
            if (formObjSet)
            {
                formObjSet.refresh();
                formObjSet.reread();
            }
        }
    }

6 Jan 2014

Debugging Error: 'The X++ debugger work only for users who are in the 'Microsoft Dynamics AX Debugging Users' local group of the Windows.'

In the following sections, you determine which AOS service account to debug the RDP class in and add the account to the Microsoft Dynamics AX Debugging Users group. You create a server configuration with debug enabled and then you can add breakpoints in your code.

To determine the AOS service account 
  1. From the Start menu, point to All Programs, click Administrative Tools, and then click Services. 
  2. In Services, right-click the Microsoft Dynamics AX Object Server service and then click Properties. 
  3. In the Properties window, on the Log On tab, the AOS service account is specified in the This account field. 
To add the AOS service account to the debug group 
  1. From the Start menu, point to All Programs, click Administrative Tools, click Computer Management, and then click Local Users and Groups. 
  2. In Local Users and Groups, double-click Groups, right-click Microsoft Dynamics AX Debugging Users and click Add to Group. 
  3. In the Properties window, click Add and add the AOS service account to the group. 
  4. Restart the machine.

25 Nov 2013

an unbalanced x++ TTSBEGIN/TTSCOMMIT pair has been detected.causes of this include(a) too many + Ax 2012

Error: 
clip_image001 


Reason(s): 

TTS level '1' usually leaves your Ax session in an unusable state 
that you can't close properly. 
Check all code for form or class from where this error comes and count the ttsbegin and ttscommit there must be same like if u write 2 ttsbegin u must have to write 2 ttscommit. 

Solution: 

To resolve this error this TTS level should be ZERO, Run this job to get rid of that error, this job will find the tts level where its greater than zero and make it zero by calling TTSABORT. 

static void resetTTS(Args _args)
{
while (appl.ttsLevel() > 0)
ttsAbort;
}


Note::

ttsBegin: marks the beginning of a transaction. This ensures data integrity, and guarantees that all updates performed until the transaction ends (by ttsCommit or ttsAbort) are consistent (all or none). 
ttsCommit: marks the successful end of a transaction. This ends and commits a transaction. MorphX guarantees that a committed transaction will be performed according to intentions. 

3 Sept 2013

Problem caused by using keyword as object name in Dynamics AX

When creating objects in Dynamics AX, it is advisable to use names which are not any keywords in Dynamics AX. Otherwise, you can end up with unexpected behavior.

Take a look at the table InventBuyerGroup. It has two fields named Group & Description.

Now suppose if I want to select the field Group from the table using a select statement, how will I do it?

1.InventBuyerGroup inventBuyerGroup;
2. 
3.select group from inventBuyerGroup;

Simple, So what is the catch you may ask? Well, the above statement will not compile and give an error. That is because the field name group is also a keyword in Dynamics AX. So, the compiler gets confused and cant understand that it is the field name that we are trying to refer here.

I'm not aware of any way of getting this work. Of course, there are workarounds like using a map but is that really needed? We can avoid a whole lot of this by just ensuring that we dont end up using any Dynamics AX keywords as object names

5 Apr 2013

Not enough rights to use table 'Signature log' (SIGSignatureLog)

ERROR: “Not enough rights to use table 'Signature log' (SIGSignatureLog).”



SOLUTION:Administration > Setup > System > Configuration and tick the Electronic Signature tick box

Create number sequence in D365 FO

Create the data type. Add code in the loadModule method of the appropriate NumberSeqModule subclass. Add a method to the module’s paramet...