I have created a new table which uses the 'LedgerJournalACType' EDT and 'LedgerJournalAC' EDT. There are the account fields on the 'LedgerJournalTrans' table, and they are supposed to behave in the same fashion. That is, when the account type is 'CUST', then a customer lookup will be done one the account field.
I can get the account lookups to work in the same fashion as on the general journal (lines) screen, however there are two things that I can't seem to get to work the same:
Can anyone point me in the right direction to rectifiy these issues on my new table?
Hi,
unfourtunatly (for you) and fourtunatly (for me), Friday is my off-day, so I'm away of Axapt.
look let me explain how this work simply.
1- suppose we have a main table maintable, which would like to refer to.
2- you should create a form let us call it mainform with simple grid, that have only one data source which is our table maintable.
3- you should create EDT and set the property with a relation to maintable.
4- now you can create field with that EDT, and it will refer to the maintable.
5- still there should be last step to do, you should told the table maintable where to go when "go to main table" is clicked in any of the forign tables. so you shoud set the maintable property FormRef to the (menu item) that linked to the form mainform which we already create it.
so the flow will be some thing like this.
NewTable ==> EDT ==> maintable ==> mainform (menu item)
I hope this is helpful.
Thanks for that, especially on your day off.
I understand that flow, however, I think the LedgerJournalAC is slightly different. It seems to do things dynamically, depending on the account type.
If I move away from my modification that I made, and look at the standard 'General Journal' screen (from General Ledger), and go to the lines.
The 'Account' field uses the 'LedgerJournalAC' EDT, which extends 'AccountNum'. Neither have a relation set, so I don't know the main table it is using. The look up generated is dependant on the 'Account Type'. I know this can be done easily by overwriting the lookup method on the data source.
What confuses me, is that given that there is no relation on the EDT to link it to the main table, how is it that when I right click on the field, I still have the ability to 'Go to Main Table Form'? That's part of standard AX. There must be something controlling this 'on the fly', but I can't seem to see what is controlling it.
The other option is that I am missing something really simple and easy.
You are welcome,
about the EDT you can add relation to it, please check it again.
I think this part is your problem.
good luck.
I will have a closer look.
Thanks for your guidence.
The final solution was to do with relations - thankyou.
The field that I used was a generic field that couple hold ledger accounts/customer accounts/project accounts/etc.
On the new table that I created, I needed to set up a whole heap of relations that was relevant to each table I needed to relate to.
It was one of those easy steps that I overlooked.
ok good to hear that.