How to insert into a table field with value from a display method dependent of string
as you might know, this is a nice way to dynamically set values to fields. myTable.(fieldName2Id(myTable.TableId, fieldNameStr)) = "This value"; myTable.insert(); What I am wondering about is if there is any way to do it in a similar fashion with display methods, just dynamically get the values from them? If i have the Display method name (i.e. itemName()) how can I do this...? something like this to demonstrate how i think: methodNameStr = "ItemName"; myTable.myField = mytable.(methodName2Id(myTable.TableId, methodNameStr)); myTable.insert();
Use DictTable.callObject(medhodName, buffer). Common myTable; DictTable dt; //<SampleOnly> str methodNameStr = "itemDescriptionOrName"; InventTable tmpTab; select firstOnly tmpTab; myTable = tmpTab; //</SampleOnly> dt = new DictTable(myTable.TableId); dt.callObject(methodNameStr, myTable); info(strFmt("%1", dt.callObject(methodNameStr, myTable)));
Concatenating row values in x++
How do you access a macro in the AOT macro node?
How can I set the Backgoundcolor of an AX2012 Action Pane Button
How to Edit address using X++ in AX 2012
Number sequence issue Ax 2012?
Find code that's running in a Batch Job
What is the _isMexican boolean for in the Global::Checkpower method?
AlwaysOnTop property not behaving properly
Boolean AND logic in Microsoft Dynamics AX 2012 AIF QueryCriteria
Table: PrintMgmtSettings Field: Printjobsettings(Blob)
What happened to the hrplimittablerelationship table in ax-2012-r2?
Why is my changes ignored to releaseupdate scripts in dynamics ax 2012 r2
What is “old sys” exactly and why would I receive errors in 2012 because of a missing Macro?
How to filter records in line grid based on selected record in header grid?
Dynamic linking gets cleared when inserting new records
Box::info showing “refreshEx”