x++


How to filter records in line grid based on selected record in header grid?


I have a form with 2 grids. I want to display records in second grid(Line grid) according to the selected record in First grid(header grid) i.e, I need to filter records in second grid..
How to do that?? I am using query as a datasource on a form.
As shown in figure, there is a common field named Activity number.. Now, I need to display records in Second grid for selected record in first grid(Say VA-00015).
This is called joined datasources and explained in the link.
If your datasources are based on a query, you are out of luck: the tables are either inner or outer joined, so the usual dynalink logic will not work.
You will have to revert to normal table based datasources.
Use the JoinSource, for example you can have 2 datasource SalesTable and SalesLines, the in the details DataSource which is SalesLine set the JoinSource to SalesTable. Now once you click on the SalesTabel grid the SalesLine grid will display the lines for the selected SalesTable, no need for extra code.
You need to learn basics of Morph X dev environment, This may help you..
If the datasources in a form are based on a query, there is no option available for join datasource and also we cannot add any extra datasource: and the tables are either inner or outer joined.
So, better not opt for a query when you need to display data using dynamic linking.
I did the same and took different tables as a datasource instead of a query. Moreover, I have also created two different datasources for a same table which is being used commonly in both Header and Line grids for linking.
FurtherMore, I have joined the datasources a/c to my need.
I have also created some display methods for a fields which is being used from different datasource.

Related Links

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”
How to filter lookup values on a dialogfield in Report Dialog based on another dialogfield in AX 2012 AOT reports?
Adding scrollbar to a Group in AX 2012 form
Table query inconsistent
AX2012 Sales Order Creation through AX Classes
How can I loop over Tables which contain specific characters in their AOT name and delete the data?
Having button that runs code, but doesn't submit data to (or validates against) table
Where are Duties (table name) stored in AX?
Advanced query range
How to read from an Excel file?

Categories

HOME
phantom-dsl
kentico
string
sublimetext
nuget
cublas
emscripten
bookmarks
echo
modal-dialog
p2p
sendgrid-api-v3
fosrestbundle
mel
intercom
renjin
zerobrane
coin3d
android-7.0-nougat
digital-signature
sencha-touch
event-store
gpio
bulletphysics
shared
jackson-modules
mql
uitapgesturerecognizer
send
cognos-bi
gojs
python-import
openerp-7
magento-1.9.2.4
modernizr
sim-card
loading
resolution
laravel-elixir
skylink
linqpad
angular-http
signal-strength
vaadin-charts
double-click
jquery-ui-draggable
serde
twilio-click-to-call
corruption
azure-cli
spring-data-couchbase
edit
otp
check-mk
gpg-signature
offline.js
choice
change-tracking
visual-studio-2008-sp1
meteor-packages
envi
vulcanize
scaffolding
freepbx
mediametadataretriever
project-organization
spring-retry
dynatree
gocql
rewrite
rubaxa-sortable
extjs-grid
sql-server-data-tools
botan
typeconverter
jquery-forms-plugin
qtwebengine
rapidsvn
cosine-similarity
sql-scripts
raygun
trdion2011
jqmodal
grails-domain-class
wxformbuilder
memset
high-resolution
eclipse-kepler
inputmismatchexception
away3d
isqlquery
nevron
scmmanager
mantle
android-sdk-2.3
robotlegs
boost-msm
convention
filemerge
android-holo-everywhere
multiplatform
uipagecontrol
qglwidget
diagrams
objective-j
jqueryform
skype4java
business-model
idatareader

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