Wait. Is your method placed  on the *table* InventTable or on the *datasource* InventTable on the form?

If it is on the form you can fill all the other datasources as well, like

purch.UnitId = somefield

invent.UnitId = some other field

sales.inventlocationid = some third field.

 

However, Axapta shows these values not before reopening the form or refreshing the data. This could be done with

Purch_ds.reread() etc.

Tobias

 

 

 


Von: Axapta-Knowledge-Village@yahoogroups.com [mailto:Axapta-Knowledge-Village@yahoogroups.com] Im Auftrag von Jens Strandberg
Gesendet: Dienstag, 26. April 2005 15:30
An: Axapta-Knowledge-Village@yahoogroups.com
Betreff: RE: [Axapta-Knowledge-Village] Moving data from table to form; question ...

 

Thanks, Tobias,

 

Hmm, you lost me there.

 

The method is based on table InventTable, so my problem is that I would like the form fields in form InventTable to be populated.

 

This works: this.itemType = somevalue, also InventTable.itemType = somevalue.

 

However I need to do something like this to form fields that during insert will be put in table InventTableModule, something like:

 

purch.UnitId = somefield

invent.UnitId = some other field

sales.inventlocationid = some third field.

 

Axapta does not complain about the above 3 lines, but nothing is displayed in the fields...

 

Am I totally out on a limb - or just plain ignorant ... :-)

 

/Jens

-----Oprindelig meddelelse-----
Fra: Axapta-Knowledge-Village@yahoogroups.com [mailto:Axapta-Knowledge-Village@yahoogroups.com]På vegne af Andrae, Tobias
Sendt: 26. april 2005 14:49
Til: Axapta-Knowledge-Village@yahoogroups.com
Emne: AW: [Axapta-Knowledge-Village] Moving data from table to form; question ...

What about :

 

            InventTable.SomeField = value;

            // InventTable ist he name of the datasource, not of the table

 

Hth Tobias

 


Von: Jens Strandberg [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 26. April 2005 14:24
An: Axapta-Knowledge-Village@yahoogroups.com
Betreff: [Axapta-Knowledge-Village] Moving data from table to form; question ...

 

Hello there,

 

This might be a weird question for some people, but I will ask anyway... :-)

 

I am doing some modifications to the InventTable form. When the user enters a given value in a (new) field, Axapta will look up some specific data from another table and put this information into the corresponding form fields.

 

This is of course no big deal.

 

I handle this through a method on InventTable. Now, my knowledge of Axapta is limited to putting data into a "simple" form. As you know, the InventTable form has several data sources, e.g. InventTableModule.

 

How do I put a given value into other form fields, that are not based on InventTable, e.g. the form fields Purch.UnitId, Invent.UnitId or Sales.UnitId that are based on InventTableModule ?

 

Normally I would do a:

 

this.thisfield = ThisValue_from_somewhere

 

which works fine, since "this" is equal to InventTable, but my skills are somewhat limited.

 

I am sure there is a very simple solution available, so please let me know...

 

(For your information: I have 20 years of programming experience, but not that much in Axapta)   :-)

 

Thanks in advance !

 

/Jens

 

 



Sharing the knowledge on Axapta.



Sharing the knowledge on Axapta.




Sharing the knowledge on Axapta.



Yahoo! Groups Links

Reply via email to