Submit and ND6

I have a submit button in R5.010 It works fine.

This is the code:

@Command([FileSave]);

UserDocId := @DbLookup( “” : “NoCache” ; “” : “” ; “UserParmsLookup” ; @UserName ; 2 );

@SetDocField(UserDocId; “RequestUNID”; @Text(@DocumentUniqueID));

@SetDocField(UserDocId; “ActionName”; “SUBMIT REQUEST”);

@SetDocField(UserDocId; “CurrentDB”; @Subset(@DbName; -1));

@Command([ToolsRunMacro]; “SubmitRequestAgent”)

I want to save the current document. Write some information to another document Including the Doc ID. In the agent that runs in the last step, It does a get documentbyUNID.

The set doc does not seem to be working.

Any thoughts.

Thanks,

Dan