x++


MultiSelectionHelper not working as expected


I'm trying to perform an operation on multiple lines on my form. I have tried to use multiselectionhelper, and it seems as it would work, but for some reason, it's not. My operation is still looking at the last line I have selected instead of all the selected lines.
myTable myTableTmp;
MultiSelectionHelper selectionHelper = MultiSelectionHelper::construct();
selectionHelper.parmDatasource(myTable_ds);
myTableTmp = selectionHelper.getFirst();
while (myTableTmp )
{
//perform operation
myTableTmp = selectionHelper.getNext();
}
This looks like it would work, but still not working as expected.
Any help would be greatly appreciated. Thanks!
I have finally figured it out. I'm not sure how I missed it. The answer was really simple. I had this:
myTable myTableTmp;
MultiSelectionHelper selectionHelper = MultiSelectionHelper::construct();
selectionHelper.parmDatasource(myTable_ds);
myTableTmp = selectionHelper.getFirst();
while (myTableTmp )
{
localTable.methodCall();
myTableTmp = selectionHelper.getNext();
}
I should have used myTableTmp.methodCall() instead of the localtable.methodCall()
Thanks for anyone that tried to help!

Related Links

How to get the length of an array?
X++ loop through lines in grid control
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?

Categories

HOME
batch-file
uml
adal
cheerio
angular-formly
jmx
mstest
pclxl
sublimetext
can
x264
jquery-ui
azure-container-service
project
mql5
commonjs
endpoint
parameter-passing
package-managers
alpacajs
google-container-registry
cfml
apache2.4
selinux
ember-cli
expressionengine3
fat
rpgle
winexe
gitlab-api
mobx
dynamic-jasper
arduino-ide
python-pptx
watchman
google-earth-engine
filesystemwatcher
recurrent-neural-network
diacritics
trigonometry
apriori
android-exoplayer
photos
snapchat
opencmis
servermanager
httrack
openrasta
jquery-ui-draggable
globalize
reindex
qtranslate
cup
flyout
template-toolkit
jtree
seek
vulcanize
jquery-jscrollpane
qiime
ikiwiki
relativelayout
toran-proxy
themoviedb-api
pypiserver
phonertc
cgi-bin
.bash-profile
canalyzer
ms-access-2000
node-serialport
fail2ban
jquery-forms-plugin
bcache
dbaccess
nsmenu
insight.database
buffering
getopt
windows-phone-8-sdk
modular
kogrid
time.h
dolby-audio-api
traceability
resource-management
tree-balancing
zope.interface
thttpd
isa-swizzling
expression-blend-4
google-ajax-api
exponentiation
mbeans
umra
ruby-1.8
drupal-fivestar
qtabbar
cuda.net
xslcompiledtransform
netbeans6.1

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App