I have the following question:
I need to insert 300 records into a table where each record contains two fields:
basically like this:
|
Field 1 |
Field 2 |
| 1 |
Basti |
Leffert |
| 2 |
Sebi |
Semmi |
| 3 |
Andi |
Leffi |
| ... |
|
|
| 300 |
Kara |
Nesti |
The 300 records a written in MS Excel. How do I do that?
I could work with containers: I use Excel to insert the records into a container and then in my job in AX
myContainer1=conpoke(myContainer1,1,"Basti","Leffert" );
myTable.Name = conpeek(myContainer1, 1);
myTable.Surname = conpeek(myContainer1, 2);
myTable.doInsert();
But I was wondering if there is a possibility that the name of my container is changeable, so I can put it in a loop, like an array type, or smth:
for ( myContainer[i] =1; i < 300; i++ )
{
myTable.Name = conpeek(myContainer[i], 1);
myTable.Surname = conpeek(myContainer[i], 2);
myTable.doInsert();
}
I use AX 2009
*This post is locked for comments
I have the same question (0)