Quantcast
Channel: Martin Dráb's Activities
Viewing all 17532 articles
Browse latest View live

AX 7: Form Lookup is not working in AX 7

$
0
0

Hi,

I have created a form in AX7 and used a String control there which is bound to a Data Field of a datasource table. Now I wish to populate the lookup with Names of all the Forms present in UtilElements table.

This is what I did:-

  1. Overridden the lookup method of the particular datafield of the associated form's DataSource.
  2. From there I called a function and wrote the below code there:-

But the problem is no data is being populated in that lookup. Its coming blank.

I will like to mention here that this same piece of code works perfectly in AX 2012. Like the below image. 

Why its not working in AX 7? Is there a major change in AX 7 related to lookup? How to fix this issue and make my lookup work in AX 7?

I am new to AX 7 (I guess most of the people here is...). But still if you manage to know the solution, plz share.

Thanks.

Sagnik.


AX tech conference 2016 recordings?

$
0
0

Hey all,

I remember that the recordings from the previous tech conferences were uploaded to InformationSource in the past. Any word on if these will still be uploaded, and where they will be going since InformationSource is gone? 

I wasn't able to attend in person so I'm hoping this is still a thing. Wasn't able to find much info online, though.

Thanks,

Kyle

AX7 - can I import project/model from Ax2012 ?

$
0
0

Is it possible to import project/model from Ax2012 to Ax7 (tables/edt/forms/report/queries/...) ?

In Ax7 preview in C:\Packages\Bin I found AxUtil.exe but it doesn't work (which ModelStore ???). Can I simple import components to Ax7 ?

Video training for functional consultant

$
0
0

Good day,

      I am a newcomer to Microsoft dynamic AX world. I do like to become a functional consultant could you please help me to find the video training step by step and all the required necessary components to install and configure Dynamic AX 2012?

Thanks in advance.

Regards,

---

MD5 calculatehash for special characters éàè

$
0
0

I found some code on this page : http://krishhdax.blogspot.co.il/2014/07/useful-functions-to-use-in-ax2012.html

to calculate a MD5 cash in X++

I works fine, but if I have a string with special characters it gives a different hash code then for example md5 via php gives me, I'm using this to check a string coming from a webservice call.

Does anyone have experience with this ?

This is the code I use :

public static str CalculateHash(str tb)
{

// code taken from : krishhdax.blogspot.co.il/.../useful-functions-to-use-in-ax2012.html
str s;
ClrObject obj;
ClrObject md5;
System.Text.StringBuilder sBuilder;
ClrObject clrStr;
ClrObject clrStrObject;
System.Exception clrException;
System.Array resultByteArray;
int i;
int arrayLength ;
InteropPermission perm;

perm = new InteropPermission(InteropKind::ClrInterop);
perm.assert();
try
{
obj = System.Text.Encoding::get_ASCII().GetBytes(tb);
md5 = System.Security.Cryptography.MD5::Create();
resultByteArray = md5.ComputeHash(obj);
//BP deviation documented
sBuilder = new System.Text.StringBuilder();
arrayLength = resultByteArray.get_Length() ;
// Loop through each byte of the hashed data
// and format each one as a hexadecimal string.
for (i = 0; i <arrayLength; i++)
{
clrStrObject = resultByteArray.GetValue(i);
clrStr = clrStrObject.ToString('x2');
sBuilder.Append(clrStr);
}

// Return the hexadecimal string.
s = sBuilder.ToString();
}
catch (Exception::CLRError)
{
//BP deviation documented
clrException = CLRInterop::getLastException();
s = clrException.get_Message();
error(s);
throw error("@SYS106158");
}

CodeAccessPermission::revertAssert();
return s;

}

Save changed Data in grid when using a short cut

$
0
0

Hi all,

I've got a form with a FormGridControl and some buttons. One of the buttons has a short cut (F2). If the user changes the data in the grid and clicks the button with the mouse, all works fine. If the user changes the data in the grid and moves to an other control / record / field and runs the button with F2, all works fine also. But if the user changes the data and does not leav the field and calls the button with F2, the change is not saved.

So I think that the grid does not save the data. A write or update to the form data source in the called code does not work.

How can I force the grid to save the data to the datasouce / database?

Thank you very much,

Markus

How to get the New record from the SQL in to ax table.

$
0
0

I want to get the data from Sql,

i am created the ODBC Connection and created the Class for Batch Job and writing the One Method to insert in to table

 

and call this Method in Run Method of class.

Runbase batch is executed and data is comming perfectly.

After run the batch job  if i insert the New value in SQL Data Base that value is not Coming.

i am writing this code.

 

public void insertSGCO_WB1_ProductIN()

 

 {

 

    LoginProperty loginProperty;

 

    OdbcConnection odbcConnection;

 

    Statement statement;

 

    ResultSet resultSet;

    SGCO_WB1_ProductIN _SGCO_WB1_ProductIN;

    str sql, criteria;

 

    SqlStatementExecutePermission perm;

 

    ;

    // Set the information on the ODBC.

 

    loginProperty = new LoginProperty();

 

    loginProperty.setDSN("ODBC Data Source");

 

 

    //Create a connection to external database.

 

    odbcConnection = new OdbcConnection(loginProperty);

 

 

 

    if (odbcConnection)

 

    {

 

        sql = "SELECT * FROM SGCO_WB1_TestTableIN";

 

        perm = new SqlStatementExecutePermission(sql);

 

        perm.assert();

 

 

        statement = odbcConnection.createStatement();

 

        resultSet = statement.executeQuery(sql);

 

        while (resultSet.next())

 

        {

 

         _SGCO_WB1_ProductIN.clear();

 

        _SGCO_WB1_ProductIN.TRANSACTIONNO = resultSet.getInt(1);

 

        _SGCO_WB1_ProductIN.GrossWeight   = resultSet.getReal(2);

 

        _SGCO_WB1_ProductIN.TareWeight    = resultSet.getReal(3);

 

        _SGCO_WB1_ProductIN.DATEENTRY     = resultSet.getDateTime(4);

 

        _SGCO_WB1_ProductIN.insert();

 

        }

    }

 

}

 

I am Created a Index in the Table for TransactionNO with Allow Duplicates NO.

If i Run the Batch job suppose 10 records are there it is inserted in the Table.

After i am Inserting the New record in the SQL It is not Coming.

 

Please Give me the Solution For this

Grouping of multiple lines in a single line

$
0
0

Dear all,

           i have following lines in sales order:

Item Name:  Qty:

A                 100

A                 100

A                 100

i want the lines in invoice as group of item name:

A       300.

how to make grouping in report with single line?

thanks in advance,

Suresh


Create vendor invoice by code, using FormRun object

$
0
0

Hi everybody,

I would like to know if it is possible to create a new blank vendor invoice using Formrun object instead of MenuFunction object. The reason is that I need to detach the child form from the parent, which I cannot do with a MenuFunction object.

Thank you for your time,

MozaikAX.

Any2Date and any2int64 conversions behave differently when executed on run to screen and when executed in batch

$
0
0

Hi ,

I was debugging an issue related to a custom report developed a long time back by some other person.

The report is designed using StatementClass and ResultSet class to make use of SQL querying abilities since there is a large chunk of data that needs to be considered. I completely against usage of SQL and using Statement and s

 

The conversion highlighted in green (any2date(resultSet.getString(32));)  returns a valid date when the report is executed to screen. The class extends SrsReportDataProviderPreProcessedTempDB , so when run to screen it uses the current interactive session to execute the date provider. 

So far so good. 

But when the same code is executed in batch this conversion returns default date 1/1/1900 

My question is whether there is an ambiguity in using any2date function when run in batch and when run on client. Please provide you thoughts on this.

"Please note that resultSet.getDate(int columnIndex)  will resolve the issue. I am not asking for resolution using different conversions functions either , My question is  any2Date function does it behave differently when run on client and when run on batch, or is it just one such weird occurrence" 

System error 1067(the process terminated unexpectedly) when starting AOS service for dynamics AX

$
0
0

Hi All ,

I am getting the error when  i start AOS service every time.

'System error 1067 has occurred, the process terminated unexpectedly'

I tried starting AOS  directly from services and also from command prompt both gives the same error.

I did some search and found that the issue is at the kernel level of the system OS

Anyone experience the same error previously?

Please look if anyone can help me.

Thanks in advance.

Regards,

ERROR: The CIL generator found errors and could not save the new assembly!!!

$
0
0

Dear Experts - I have error The CIL generator found errors and could not save the new assembly and also inbound ports services stopped. I try to reactive the services but same loop repeating every time. I did following steps but no luck.

Step 1. Stop the AOS and clear the files under C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin\XppIL 

Step2 . Restart the AOS and Synchronize the AOT

Step3.  Perform the Full CIL and try to active the Inbound ports but same error occurred.

Please help me to resolve my above issue....

UtilElements in AX 7

$
0
0

In older versions of Dynamics AX, you can get information about AX application objects (metadata) through system “tables” such as UtilElements. This doesn’t work anymore in AX 7. These tables still exist, but they don’t have any data, therefore you have to migrate to another solution.

AX 7 comes with a rich framework for metadata, implemented in several assemblies in namespace Microsoft.Dynamics.AX.Metadata. But it’s too complex for simple tasks – you can make it much simpler by using MetadataSupport class. For example, the following piece of code iterates through all form names:

var forms = Microsoft.Dynamics.Ax.Xpp.MetadataSupport::FormNames();
while(forms.MoveNext()){print forms.Current;
}

This is even easier than before!

How to use LogonAs to logon to another AX server

$
0
0

hi all,

Currently, I'm using this code to login to one AX server (AX 2012) from my computer:

                //test logon AX 
                System.Net.NetworkCredential nc = new System.Net.NetworkCredential("akason", "123abcd");
                using (Session session = new Session())
                {
                    try
                    {
                        session.LogonAs("akason", "AXDEV", nc, "DAV", "en-us", "02@AX12R3CU9:2713", "");
                        string result = session.isLoggedOn().ToString();
                    }
                    catch (Exception ex3)
                    {
                        logger.Error(ex3.ToString());
                    }
                }

But I cannot connect to this AX server. I got the error: "Could not load file or assembly 'Microsoft.Dynamics.AX.ManagedInterop, Version=6.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. An attempt was made to load a program with an incorrect format."
Did anyone login success before? please advise.

Thank you so much.

Map object not initialized

$
0
0

Dear All


How to fix it

I have share screen shot 


AX 7: Why CryptoAPI object is always coming NULL in AX 7 ?

$
0
0

Hi,

I have used CyptoApi for encryption of passwords in AX 2012. The same thing when I tried to implement in AX 7 returns me a null object. I am using the following code in AX 7.

CryptoAPI      cryptoAPI;
ContainerClass containerClass;

cryptoAPI = new CryptoAPI(0);

if(!cryptoAPI)
{
throw error("@SYS108972");
}

The control comes to this throw error statement indicating that the cryptoAPI object is null.
Can you please tell me why is that so? How can I encrypt password in AX 7?

AX7 Download RTM

$
0
0

Hello there

I have read that AX RTM is released for download, still I can't find a download link

Looking to hear from you, 

Use of Lookupbutton() in postBuild mehtod of UIBuilder AX2012

$
0
0

Hello,

I want to know use of Lookupbutton() in  postBuild mehtod of UIBuilder class.

this call is commented in one article, called in other one.

Article1

Article2

Please let me know what could be the reason and when we need to use Lookupbutton() in postBuild?

AX tech conference 2016 recordings?

$
0
0

Hey all,

I remember that the recordings from the previous tech conferences were uploaded to InformationSource in the past. Any word on if these will still be uploaded, and where they will be going since InformationSource is gone? 

I wasn't able to attend in person so I'm hoping this is still a thing. Wasn't able to find much info online, though.

Thanks,

Kyle

FormStringControl & DialogField in RunBase class

$
0
0

On dialog , what is the Difference between using  FormStringControl  & DialogField to ask for input parameter ?

Viewing all 17532 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>