Hi...
I have added another data source to the WHSWorkTable form. The properties of this new data source are set as follows:
But if I change a value from WhsWorkTable a new record in SalesTable should be created... Can anyone tell me, why?
Martin,
you made my day... Thx...
Refer to the below thread which talks about the same issue and see if it helps your scenario.
Thanks,
Girish S.
Setting properties like "Allow Create" to No doesn't prevent the system from creating records in joined table.
You need to use CoC on your new data source to implement this behavior. Don't call 'next' in either validateWrite() or write(). validateWrite() should always return true while write() will simply do nothing.
It'll compile if implemented correctly, this is an exception of the rule that 'next' must be called.
What is the join type you set on the newly added DataSource?
If adding table as DataSource is the issue you can go with adding a view to the DataSource if it's for viewing purpose only.
Thanks,
Girish S.
In a standard extension, the standard code must be run through with next(), even if it is a custom extension. The code does not compile...
André,
the error occurs because some values of mandatory fields in SalesTable are missing, like AccountNum etc. So I put a breakpoint in validateWrite() method of SalesTable table code...
So there are no additional x++ code... But probably external code... but I think, that doesn't matter?
Hi, As Andre mentioned, please add breakpoint in SalesTable insert method and check call stack to investigate when and why record is getting created in this table.
Can you comment the super call for create, write methods of this form datasource and check?
Hi Christian,
Initially when looking at the properties, I would agree with you that this data source is read-only. Is there some additional X++ logic created? Have you used the Debugger to find a cause of record insertions?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,867 Super User 2024 Season 2
Martin Dráb 229,173 Most Valuable Professional
nmaenpaa 101,156