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

Ax 2012 EventHandler benefit?

$
0
0

Hello,

Let's assume I have Consumer class with static method: myEvent()

And I have class Producer.

I have two options in Producer class:

1. Sybscribe EvenetHandler:

producer.myEvent()

 OR second option:

2. I can just call static method:

Consumer:myEvent()

And in case if I need to call myEvent() in stanard Ax method, method is modified anyway and there is no some kind of indepenent code which is not affected by MS updates or other modifications.

Pleas tell me, where is the benefit?


Number Sequence Table Permission

$
0
0

I try to create record through form and it successfully created, but when i tried to create record through code get the following error.

"Cannot select a record in Number Sequence Code (NumberSequenceTable). Access Denied you do not have sufficient permission"

How to display single record from Joined data source on Form

$
0
0

Hi All,

I need to join two data sources in a form where I have to get only one record from joined data source

I have a table say Table 1

Field1     

A           

B  

Table 2

Field 1          Field 2

A                   XYZ

A                   JKL  (latest record)

B                   123

B                    456  ( latest record)

The two tables are in same grid and the form expectation is

field1        field2

A               JKL

B               456

Please tell me a way to reach the expectation.

Thanks in advance

Ramakrishna T.

               

How to export data from AX2012 to .net DataTable

$
0
0

Hi All,

My requirement is to select some data from AX2012, then save those data to other database.

So I want to know how to select data into my .net program's DataTable? 

I have try to use the inbound ports to call a method on AX2012 to get the select result(The select result is a custom temporary table, when I call the method, it will fill the temporary table first.),

But the inbound ports does not return something like DataSet, I have on other ideas about this,

Any one can give me an  solution idea or reference for my requirement?

Why X++

$
0
0

Hi guys,

When Microsoft has power language C# then why does Microsoft need a new X++ language for

MS Dynamics AX.


Thanks in Advance,

Riyaz_A

matching string into some format

$
0
0

Hello!

Is there any way to check if string suits to some format, eg: "a0 - b1", where "a" and "b" can be any letter, "0" and "1" can be any number.

I know It can be done by lots of if's but I'm sure there is simpler way to do that.

How table id got changed?

$
0
0

In what circumstance, a table id could be changed? This is a problem we found.

save pdf to printarchive with extended information

$
0
0

Hi

I want to "print" a report into the print archive. in Addition I want to extend the archive to hold some information

Is this realizable?


update_recordset statement not working. The same with while select forUpdate works..

$
0
0

Hi,

any known issues about this?

I've encountered a custom method which tries to update a set of record by joining 2 tables with the update_recordset statement. Something like:

update_recordset myTable1
                            setting [fieldsList]
                            join myTable2
                                where [conditions]

The instruction returns this error "could not update a record" and i can see this join doesn't retrieves anything.

If i do the same with a "while select forUpdate" statement, it works fine. The records are retrieved and updated.
Obviously this takes much more time than the update_recordset.

Any idea about this issue?

Thank you in advance

Code upgrade - Object not moved or override in AX 2012

$
0
0

Hi All,

It seems to me very strange issue; I moved all AOD files from AX 2009 to AX 2012 R3 folders as mentioned in Code Upgrade guide.

Let's say I added a class in AX 2009 with classId and system assigned it a Id 30076. In AX2012 MS added a class 'MCRDropShipPurchOrder' with same Id 30076. After moving AOD files it deleted this class 'MCRDropShipPurchOrder' from AX2012 and create my class (I created in AX2009) on this Id.

I did not expect to see this behavior rather I thought this upgrade process will manage it different way.

Another important thing is this I am facing this issue even with EDTs and Tables. For classes it is not a big deal I can export all classes from AX2009 and import them again into AX2012 after deleting them from there first. However, to change anything in Table and Field IDs will cost me a lot as I will have to write data upgrade scripts to map fields correctly.

What I have done so far with few tables; I deleted these tables from AX 2012 and added my custom fields manually which bring new Ids (different Ids in AX2009 for these fields). I cannot change field Ids for any field in a table by opening it in notepad as it will show me bad data after data upgrade.

Can anyone please guide me with the best approch to deal with this issue or is it a common problem (I think it should not be).

Can I connect to Dynamics AX 2012 from MS Access?

$
0
0

I have a requirement to use MS Access and to use it to retrieve data from an AX database. Is this feasible and what do I need to do?

Specific Dimension on VendOpenTrans Grid

$
0
0

My task is to add a field in VendOpenTrans with a specific Dimension. I have added to my DataSources in VendOpenTrans tables DimensionAttributeValueSet, DimensionAttributeValueSetItem, DimensionAttributeValue and DimensionAttribute. In their properties I have made joins (join source) with InnerJoin LinkType (I tried all of the options here). Then I have add a field on my grid from DimensionAttributeValueSetItem -> DisplayValue (field name). And now in ExecuteQuery method of VendOpenTrans I add a code:

public void executeQuery()
{
    QueryBuildRange dimensionAttributeValueSetRange;
    ;

    dimensionAttributeValueSetRange = this.query().dataSourceTable(tableNum(DimensionAttribute)).addRange(fieldNum(DimensionAttribute, Name ));
    dimensionAttributeValueSetRange.value(queryRangeConcat(queryValue('KUP_NKUP_Zaliczka'), queryValue('')));

    super();


}

The final result of this is that I have a new filter with my dimension. So I don't see on my grid records that have an empty value in this dimension. The thing that I want to achieve is to show the value of "MyDimensionName" if It's filled but when It's not record should be shown with just an empty value... I spend on this many many hours and I still didn't work it out...

Document management table

$
0
0

Hi all , 

One small issue in Document Management .
In the Document Management Form i entered some data :-

   Type                       Class

1. Note                     Simple note

2.File                         Attach file

3.URL                       Attach URL

4. File1                      Attach file

Now i am unable to find that where these data are storing , because i need to check some condition on the based of Type.
So please suggest where do i find these records, i mean in which table .
Thanks 

X++ Run Method vs Main Method

$
0
0

Hi Guys,

I wanna to know The role of Run() and Main method in X++

Thanks in advance,

Riyaz

Reading emails response back in AX from live/google

$
0
0

Hi All,

One of my clients want to send emails to all workers with specific information, let's assume they have more than 500 workers. Company is not willing to purchase 500 AX user licenses so they can use existing AX email functionality which requires AX users to configure. We decided to go with customization and am able to send emails to each worker's personal email address, at gmail domain. I can also send some parameters in email which can distinguish the record in AX while reading it back from email response.

Now, what would be best way to read email response back from google email into AX.

As of now I have exported email responses into a CSV and Excel file and am thinking of importing these back into AX through X++  code.

Is there any API I can use for this purpose? Any ideas or thoughts would be much appreciated.


CIL vs MSIL

$
0
0

Hi,

When X++ codes are compiled, an intermediate code is generated.

I just want to know whether CIL and MSIL represents the same intermediate code or different.

Regards,

Riyaz

Error while opening 'PurchReqTable' Form even after deleting it

$
0
0

I have deleted "PurchReqTable" Form , when i am opening it again the below Error is displaying

"Error executing code: FormRun (data source) has no valid runable code in method 'setHeaderButtonAccess'."

thanks :)

WorkflowWorkItemActionDialog Form init() method

$
0
0

In init() method of WorkflowWorkItemActionDialog i have written some code to get recId of current Record from the calling form .

if(element.args().dataset() == tableNum(PurchReqTable))
{
purchReqTable = element.args().record();
recid = purchReqTable.RecId;
}

but this code is not working , if () condition is not satisfying eventhough i am calling from PurchReqTable Form.

This form will open when we click the Approve button of the Purchase Requistion WorkFlow .

Please help

Thanks

Corrupted fonts when batch job writes report to PDF file

$
0
0

Hi,

i've got a batch job which runs 4 different reports for a set of customers. (4 reports for each customer, a new directory for each customer)

At the end of execution some of the PDF file have all the fonts corrupted. The thing is completely random. The set of corrupted-pdfs always changes.

If i open directory "Customer1" for instance and i find that all 4 reports have corrupted fonts, I try to execute the batch only for that Customer1, and the reports then are written properly without corrupted fonts.

I've also tried both "embedded" and "not-embedded fonts", the thing doesn't seems to make difference.


Any work around?

Thank you in advance

regards

Select button on report dialog

$
0
0

Hi,

I've created report using RDP class, but when i run the report there is no 'select' button on the form, how can i add it?

Viewing all 17532 articles
Browse latest View live


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