Jumat, 29 November 2013

Import Data from Excel Office add-in to Dynamics AX2012

Hi, ...
dah lama ya ta jumpa...

Tiba-tiba sudah AX2012 lagi :( ...
Kali ini i want to share a simple way and... of course a simple sample how to import data from Excel Office add-in to Dynamics AX2012.

I take a sample from my machine
Sebelumnya Ms.Office saya adalah versi 2007. lalu saya install Office Add-in dan hasilnya prerequisite AX12 tidak menemukan adanya Ms.Office 2007... well thats is weird. Then i go check to the internet and found that i have to upgrade my MS.Office 2007 to SP1,...so i updgrade la... but ... its still doesnt work... its more weird rite? ... OK,.. next ... i am very mad, ta' tanggung2 aku upgrade aja sampe SP3.. dan itu teman ku juga menyarankan seperti itu. n the Result is ... The Prerequisite can read my MS.Office :).

after you installed the Office Add-in,... u must go to AX2012-System Administration-Periodic-Compile into .NET Framework CIL, ... wait(its quite long) until the proces is done. and give an information like this.
why we must generate the .NET CIL? .. coz if u r not u will got an error like this "Document Generic document could not be created. Error details:" this is error will appear when u import data to AX2012. but for some reason in technically... i dont know ...heheheh

Ok now open ur Excel and find the Dynamics AX menu ...(found it? ... god boy!)
Click new blank document, go up to the menu then click Add-data-> Add table

Here,... i have create a VetSpeciestable for my sample..u can choice ur tables off course.
click OK.
and this is the view of my Worksheet of VetSPeciesTable.
Click Menu 'Fields' to hide the navigator of table
then u can put ur record at the couloms.

click Publish at the up Menu,...
then u will get information from the Excel about the result.


Sabtu, 02 Februari 2013

Membuat sequence number di Ms.Dynamics AX 2012

Hi Guys, ...
(hhhmmm its been along time i am not using "SPAAXXRTAN!!" ...)
This time i wanna share about ... how to create a new Sequence number in AX 2012, ...wait,... AX 2012?! ... tidak salah ni? ... yes, now i am on my project n using AX 2012.
So far there's not a big different between AX 2012 coding and AX 2009 coding...(i hope so .. Amin)
Ok lets we start.

  1. Buat EDT dari String, ... kita ambil contoh SNId 
  2. Cari dan buka method Loadmodule() di Class NumberSeqModuleProject, lalu tambahkan code berikut. Tentu saja kamu bisa mengkopi dan paste code tersebut dari code yang sudah ada lalu ubah sedikit. ( hello ... buat apa ada fasilitas Copy Paste kalo tidak dimanfaatkan?!)
  3. Buat method di tabel Projparameters 
  4. Lalu buat Job berikut
  5. Jalankan Wizard sequence number, Organization Administration >> CommonForms >> Numbersequences >> Numbersequence >> Generate >> run Wizard
  6. Sekarang kita test, Apakah number sequncenya berfungsi atau tidak. buat Job sebagai berikut.
  7. Sequence number ini pasti kita akan gunakan di sebuah form. Buat formnya lalu tambahkan deklarasi berikut di method publicnya
  8. Setelah itu, di form itu juga buat method berikut
  9. Buat method close di formnya
  10. Terakhir tambahkan method dibawah ini di DataSourcenya
     datatype.parmDatatypeId(extendedTypeNum(Car Id));
     datatype.addParameterType(NumberSeqParameterType::DataArea, true, false);

3.client server static NumberSequenceReference numRefcarId()
     return NumberSeqReference::findReference(extendedTypeNum(car Id));

4.static void Carid(Args _args)
    NumberSeqModuleProject  NumberSeqModuleProject = new NumberSeqModuleProject();

6.static void number(Args _args)
    NumberSeq  numberSeq;
    CarId num;
    numberSeq = NumberSeq::newGetNum(ProjParameters::numRefcarId());
    num = numberSeq.num();

7. public class FormRun extends ObjectRun
    NumberSeqFormHandler numberSeqFormHandler;


8. NumberSeqFormHandler numberSeqFormHandler()
    if (!numberSeqFormHandler)
        numberSeqFormHandler = NumberSeqFormHandler::newForm(ProjParameters::numRefcarId       ().NumberSequenceId,
                                                             fieldNum(CarTable, Car Id)
    return numberSeqFormHandler;
9. void close()
    if (numberSeqFormHandler)


void create(boolean append = false,
            boolean extern = false)  // If created externally


    if (!extern)


public void delete()


public void write()

Validate Write()

public boolean validateWrite()
    boolean         ret;
    ret = super();
    ret = element.numberSeqFormHandler().formMethodDataSourceValidateWrite(ret) && ret;
    if (ret)
    return ret;

Link Active()

public void linkActive()

Yup, ... semoga bisa membantu infonya, ...ini aku dapat di http://swathidynamicsax.blogspot.com dan sudah aku test dan ... BerHasil! BerHasil! HOREE!! ...