Hi folks...
I'm want to execute a process by pressing a button in a form that executes a codeunit and pass it only the records that i've selected on the form...
It gives an error such like this...
"Purchase Price ID '0' does not exist"
heres the code
g_recIntEBPrices.RESET;
CurrForm.SETSELECTIONFILTER(g_recIntEBPrices);
IF g_recIntEBPrices.FINDSET THEN
REPEAT
IF g_cduPriceStd.RUN(g_recIntEBPrices) THEN BEGIN
l_recIntPurchPrice.Process := l_recIntPurchPrice.Process::Processed;
l_recIntPurchPrice.MODIFY();
END ELSE BEGIN
l_recIntPurchPrice.Process := l_recIntPurchPrice.Process::Suspended;
l_recIntPurchPrice.MODIFY();
END;
//l_recIntPurchPrice.MODIFY();
COMMIT;
UNTIL g_recIntEBPrices.NEXT = 0;
0
Comments
Your loop go through the variable g_recIntEBPrices, but you modify the l_recIntPurchPrice <- whats the value?
Garak describe it. Where is the l_recIntPurchPrice variable filled in? It is local, it is modified, but nowhere assigned...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Please try to make it a local.