Hi everybody; I have two new fields (are "down" fields) on Vendor table, and I want to copy the content from these fields to the same Item table fields automatically, for not have to go product by product. I would be comparing the "Vendor No." for example. I think it can be done through a report that launch an automated process. Can anyone explain me how can I do it, please?.
Thanks in advance.
0
Comments
Maybe it is a good idea to start reading the Application Designer guide or purchase David Studebakers book.
http://www.packtpub.com/Microsoft-.NET- ... ision/book
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
"Down" fields are expand fields, I mean, it looks for a table and you choose the code (like an option field), sorry. Any idea please?.
Thanks.
If you really want to do this, just check the field i said, take a look at his properties and make your considerations.
hint: table relation property
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Your new fields should refer to a code table like payment terms, country/region or something alike.
The two new fields in vendor table are already informed. I've created the same fields on Item table that now are empty. On "Vendor Nº." trigger from Item table I've created the instrucction:
Field1:=vendortable.Field1;
Field2:=vendortable.Field2;
Then, when I create a new item it gets the content from filed1 form vendor table. It runs me well. But, what about the items that have also been created?, I should be inform all the items one by one?. So I need to launch an automatic process that fill that fields automatically, I suppose filtering by vendor number. Somethig like:
If vendor n=12525 then field1:='example';
I hove I've explained well; sorry for confusion.
Thanks.
Field1:=vendortable.Field1;
Field2:=vendortable.Field2;
on the Onvalidate trigger of "Vendor No" in the item table? not form.
If so and you have that working, it appears you want to fill in all the old items with an update report.
Dataitem->Item
Global Variable -> Vendor=Record=Vendor
OnAfterGetRecord()
When you run the report you can filter on when these fields are blank so just those get updated.
I hope this is what you were looking for.
Do you have the Application Designers Guide?
http://www.BiloBeauty.com
http://www.autismspeaks.org
Thanks again.
http://www.BiloBeauty.com
http://www.autismspeaks.org
It could look something like this:
recItem.RESET();
recItem.SETRANGE("Vendor No.",No.);
IF xRec.Field1 <> Rec.Field1 THEN
recItem.MODIFYALL(Filed1,Filed1);
IF xRec.Field2 <> Rec.Field2 THEN
recItem.MODIFYALL(Filed2,Filed2);
recItem.SETRANGE("Vendor No.");
This way the item table will be automatically uppdated when ever someone changes the values of field1 och 2 in the vendor table unless the vendortable is updated by code that doesn't call the OnModify trigger.
Actually you can do this. But if you do it will then be impossible to ever rename tables in Navision on that database, it will give an error that you need to include that field in a key in the table. And no hint at all where to find the problem.
This was introduced in Navision ver. 1.1 to allow upgrades from 3.55, and to the best of my knowledge the bug has never been fixed. I reported it many times.
EDIT: sorry, it does not work...after clicking another field, the error line of RTC appeared in the header of the page...too bad... ](*,)
well, it was not so important...
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Just tried 2009SP1 Classic and the error is still there. Trying RTC now.
Can you let me know how you did it to make it work.
You just need to import it, nothing else.
Then try to rename any item.
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
:x :x :x :x :x
Edits should only be for mistakes in grammar etc. If the whole post changes add a new post so its clear.
[-(
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
No problem, I was very interested to find out if they had actually finally fixed this.
Did you import my object to see that the bug is still there?
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog