0

I have following problem in AX

Background:

  • two tables A and B, relation A:B is 1:N, B contains reference to A.recId
  • dataSource B joins dataSource A using Active join
  • both datasources are displayed in their own grids (records displayed in grid B are related to record selected in grid A)

Desired behavior:

  • I want to prohibit creation of new records in B if there are no records selected or existing in A, because otherwise I won't have the relation created correctly

I assume I can put code responsible for it into init() method of dataSource B and active method of dataSource A, but isn't there a way to achieve this behavior more elegantly?

Jan Hruby
  • 1,477
  • 1
  • 13
  • 26

1 Answers1

0

InnerJoin relation type should do the work ¿Have you tried that?

If this doesn't work please specify your AX version.

Josh Crozier
  • 233,099
  • 56
  • 391
  • 304
j.a.estevan
  • 3,057
  • 18
  • 32
  • I'll try it and let you know, but I guess that if I use inner join, it takes all records from A and displays all related records from B in grid for B. Guess this is whole point of Active join, that it displays joined records only for actively selected records in master datasource. I am using AX 2012 – Jan Hruby Oct 18 '13 at 12:43