temp.init; temp.transferfields(rec); temp.insert; temp.setrecfilter;
IF FORM.Runmodal(Form::"My Form", temp) = action::lookupOK THEN BEGIN rec.transferfields(temp); rec.modify; CurrForm.update(FALSE); END;
MyForm.SETRECORD(temp); MyForm.Lookupmode(true); IF MyForm.Runmodal = Action::LookupOK THEN BEGIn MyForm.GETRECORD(temp); Rec.Transferfields(temp); rec.Modify(FALSE); CurrForm.update(FALSE); END;
Comments
What is the error?!?! :shock:
maybe "...does not exists?"
try to use instead of
...just an idea looking at your piece of code...you should provide the error text :-k
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
I don't want the 'actual record' to be updated, but only the temptable. And if the user chooses finish the code update the actual record, if the user chooses cancel, all the changes are made to the temptable, not the actual table. All i want to do then is clear the temptable so no changes are saved.
maybe your problem is generated from the use of both setrecord and setrecfilter...(never tested)
setrecfilter should be the only thing you need, try it
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Just don't do this. You owe it to you client to be honest to them and say NO. Teach them Navision and tell them that if they don't like Navision, then maybe its best they go back to their old product.
I have seen many attempts to mimic the wizard concept in Navision, (Items, customers, vendors, sometimes even sales orders), it just get more and more complex and more and more expensive.
Best is to stop now.
Not sure if I agree with you on this...
One of the flaws of Nav is the immediate unintentional update of records in Master Cards which uncountable complaints were received & requests to do something about it.
One of the common requests is to disable edit unless authorized in some way or intended.
Definitely such kind of wizards is going to be expensive initially, but it becomes an advantage for you to have such wizard when other competitors cannot or unwilling to provide. It doesn't modify Nav business logic & adds value (read $) to what the implementer can provide.
ERP Consultant (not just Navision) & Navision challenger
Sounds like a pretty good way to generate some business... :-k
RIS Plus, LLC
MVP - Business Apps
It has something to do with the hosting licence for the small ( dumb & not interested ) customers .. ?
Sorry but that is just BS, this all goes back to lazy sales people that just say "Sure Navision can do anything".