i have a field Id ..... and on filling this field ....i want to autofill the name and address field of the table depending upon the id . how to do that?
regards
rajesh
*This post is locked for comments
i have a field Id ..... and on filling this field ....i want to autofill the name and address field of the table depending upon the id . how to do that?
regards
rajesh
*This post is locked for comments
Hi Chaitanya,
Can you help me provide path address for modifiedField for the same example on Table Level ?
Thanks in advance for the help.
Hi Chaitanya, can you help me provide path address for modifiedField for the same example on Table Level ?
Thanks in advance for the help.
does name field is display method?
1. if so, then its pretty simple call this method in field datasource modified() , like below:
public void modified() { table_ds.cacheCalculateMethod(tableMethodStr(tableName,MethodName)); super(); }
2. If it is table field not display method, then simply do like below :
table.name = custTable.Name();
Hi chaitanya,
i am confused.
my requirement :
i have two fields customerId(EDT--custaccount) and name.
customerId is a lookup field which shows the id and name . i want the name field to be autofilled whenever i choose the id from the lookup.
regards
rajesh
You can find plenty of examples in AX for this. For Instance, create a method "initFromTableA" , here initialize all your table fields from another table and call this method on modified() method of field.
Hi,
You can refer the modified method of field CashDisc on the salesTable form
Path: \Forms\SalesTable\Data Sources\SalesTable\Fields\CashDisc\Methods\modified.
If its not clear, you can provide us your requirement will work on it and update you.
can u help me with the code in modified() in datasources???
regards
Hi,
You can include your code either on the modifed method of Id field at the datasource level (or) in the modifiedField method on table level (with a case for Id) to have this defaultings.
Path: \Forms\<FormName>\Data Sources\<TableName>\Fields\Id\Methods\modified.
Code could be:
Table_ds.Address = "XYZ"; Table_ds.Name = "123";
Path: \Data Dictionary\Tables\<TableName>\Methods\modifiedField
Code could be:
case fieldNum(TableName, Id): this.Address = "XYZ"; this.Name = "123"; break;
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,269 Super User 2024 Season 2
Martin Dráb 230,198 Most Valuable Professional
nmaenpaa 101,156