Announcements
Hello! I have a problem with the approvals of PO, SO, SOF, SI.
When I submit an approval request and someone attempts to approve, the following error occurs and is not approved.
Microsoft.Dynamics.Nav.Runtime.NavVariant variable not initialized I dropped the debugger to see where she stopped and stopped here at the point in red:
OBJECT Codeunit 1501 Workflow Management
LOCAL PROCEDURE ExecuteQueuedEvents@21();
VAR
WorkflowEventQueue@1001 : Record 1522;
WorkflowStepInstance@1003 : Record 1504;
WorkflowRule@1006 : Record 1524;
RecRef@1000 : RecordRef;
xRecRef@1002 : RecordRef;
Variant@1004 : Variant;
xVariant@1005 : Variant;
BEGIN
WorkflowEventQueue.SETRANGE("Session ID",SESSIONID);
IF WorkflowEventQueue.FINDSET THEN
REPEAT
WorkflowStepInstance.GET(WorkflowEventQueue."Step Record ID");
IF WorkflowStepInstance.Status = WorkflowStepInstance.Status::Processing THEN BEGIN
WorkflowRecordManagement.RestoreRecord(WorkflowEventQueue."Record Index",Variant);
WorkflowRecordManagement.RestoreRecord(WorkflowEventQueue."xRecord Index",xVariant);
RecRef.GETTABLE(Variant);
xRecRef.GETTABLE(xVariant);
WorkflowStepInstance.FindWorkflowRules(WorkflowRule);
IF EvaluateCondition(RecRef,xRecRef,WorkflowStepInstance.Argument,WorkflowRule) THEN BEGIN
ExecuteResponses(RecRef,xRecRef,WorkflowStepInstance);
WorkflowEventQueue.DELETE;
END;
END;
UNTIL WorkflowEventQueue.NEXT = 0;
END;
When a person exits and enters a new one in the system, the request is approved and there is no error.
What could be the problem, I use a standard workflow with Bulgarian localization?
*This post is locked for comments
Hello,
What have you done to resolve this issue. I am having the same problem. Please assist.
Hello, Hicham Issa!
I found a solution to the problem, but I guess there is some queue that sends for approval those that have not been sent. There is a Table 5122 -Workflow Event Queue that keeps sessions that have not been completed. When someone enters the system and the session coincides with some of the approval entries, this error occurs when the list is cleared, everything is fine.
Hi YuliyanR,
It is interesting that no one got back to you on this at all!
either way, I have the same issue you are/were facing obviously.
Any luck resolving this yet?
My problem is related to an SQL connection issue as there was some recent server patching which probably caused this. For now we do not have a specific root cause but as you have described logging out and back in again resolve the issue. Also a service restart resolve the issue for quiet a while before it re-appears again (Usually on the second day after service restart)
André Arnaud de Cal...
293,333
Super User 2025 Season 1
Martin Dráb
232,262
Most Valuable Professional
nmaenpaa
101,158
Moderator