Displaying Values in forms

Dear all,

Code for displaying values on Form from newly added field from table .

Example:

Item ID Item name

XXXXX ???

Hi shadeed,

as my understanding from your question,If the data exists in the table for the new added field,it automatically shows the values in the form.

can you explain the question more clearly…

Naresh Kolli

As told by Naresh, the form will automatically get the values of new added fields in the able. No extra coding is required . Please explain if there is some other scenario.

Hai shaheed,

What exactly you mean to say??

Is it like as in example u want to display the reamining fields based on the new field relating to it??

Like item id-- item name will auto populated

if thats the case you can get it done by modified method.

Regards

Shon [H]

what exactly i meant is ,i need to add a field from different table.

For example: In Bom lines form

ITEMID ITEMNAME COSTPRICE

XXXXX 123xxx 3000

NOW here Cost price is not available in BOM Table.Then I need to display it from inventtable on BOM Lines form.

please any suggestions.

Hai shaheed

It can be done thru overriding modified field by picking the cost price based on item id

Wite a select query.

Regards

Shon

Or you can create a display method which takes ItemId and gives back the cost price. You dont have to add the other table in the Form data source.

please can you send me the code for this.

If you want to display the Base Cost price given in the Item Master . Add this display method to your form.

display Price costPrice()

{

;

return InventTableModule::find(BOM.ItemId,ModuleInventPurchSales::Invent).Price;

}