x++


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)));

Related Links

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”

Categories

HOME
notepad++
google-app-engine
httparty
rdbms
nunit
bitbucket-api
newrelic
rds
tail
x264
polling
trac
fhir
distribution
appcelerator-studio
startup
google-form
symfony-2.8
standards
identity-management
bourbon
windows-xp
kendo-mobile
inno-download-plugin
object-storage
epsilon
moses
slidetoggle
ms-access-web-app
fragment-backstack
oculus
soot
twiml
dotspatial
rselenium
contacts
xdocreport
bc
css-position
linq-to-objects
laravel-elixir
subclipse
smoothstate.js
xmldocument
memory-mapping
ntvs
automapper-5
globalize
configurationmanager
vugen
amq
stdmap
ngmaterial
pdf-conversion
lsyncd
mathcad
ampps
choice
meteor-packages
winusb
redbeard-ios
webjars
rspec2
vorpal.js
udpclient
refinerycms
deep
riot
tracker-enabled-dbcontext
lz77
user-management
crouton-os
include-guards
coda
evolus-pencil
mirror
zxspectrum
code-documentation
public-html
viewer
angular-carousel
template-deduction
radiant
maven-scm
poker
video-codecs
argouml
robotlegs
qi4j
mapping-by-code
cgimage
umra
load-time
jqueryform
drupal-fivestar
django-piston

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App