Have two table.
One standart Ax table, other one is dublicate (Test, CopyOfTest);
Declaring variables
Test test;
CopyOfTest cTest;
Do something like this will work?
test = cTest; ???
*This post is locked for comments
Have two table.
One standart Ax table, other one is dublicate (Test, CopyOfTest);
Declaring variables
Test test;
CopyOfTest cTest;
Do something like this will work?
test = cTest; ???
*This post is locked for comments
Hi,
Did you get this issue fixed in the meantime?
It still sounds suspicious to me... Duplicity is usually a bad thing, because all changes will have to be done at two places.
But anyway, if you want to initialize fields from a different table, create an initFrom*() method and assign fields as needed. Then you'll call the method and pass a buffer of the other table there. You can look at AgreementLineHistory.initFromAgreementLine(), for example.
Or if you want generic code that can work with instances of both tables, you can create a table map and map all fields there. Then you can use the map in your code, instead of concrete tables. But I would again question the design before doing that.
second one is for stagging. Imported data from excel.
In case if there is record in stagging table i use this.record otherwise from standart table.
Why would you have two tables with the same structure?
This way i will change standart code. I should avoid this. I will use pre event handler.
Hi Skribl,
while select tableA
{
tableB.clear();
tableB.RollNo = tableA.Id;
tableB.insert();
}
i have while select loop. This is standart ax code, so i want to use other table with the same structure in current while select. Just use same variable with other type but same structure.
No, it won't. Test and CopyOfTest are two different types, therefore such as assignment isn't valid.
What are your trying to achieve?
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... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156