Unable to edit from an action button

I have a user that has edit access to documents in a Notes database. A view action button is provide that calls an agent - this agent is written @Formula (see below). The user has access to the view action and the agent is called, it runs through the whole agent with no errors and prompts her with “Continuing will change the status of the selected document and log your name. Continue?” but the document select is never updated with the new status. She can open the same document make changes to it and save the changes. This action button works for all other users.

IO := @If(TSWFStatus = “(Approved)” | TSWFStatus = “(In-Process)” | TSWFStatus = “(Processed)”; “T”; “F”);

PH0 := “Invalid Operation…”;

PB0 := “You cannot change the status of an EDLP or Display Allowance.”;

IO2 := @If(EventCategory = “EDLP”; “T”; EventCategory = “Display Allowance”; “T”;“F”);

@If(IO2 = “T”;@Return(@Prompt([Ok]; PH0; PB0));“”);

@If(Form = “CustProfile”; @Return(@Prompt([Ok]; "Attention : "; “This feature may not be used on a Customer Profile.”)); “”);

@If(Form = “CustomerBudget”; @Return(@Prompt([Ok]; "Attention : "; “This feature may not be used on a Customer Budget.”)); “”);

PH1 := "Select Status … ";

PB1 := “Please Select the Status from the list below.”;

List := “(Processed)” : “(In-Process)” : “(Approved)” : “(Submitted)” : “(Draft)”;

continue := @Prompt([Ok]; Customer + " >> " + TSWFName; “Continuing will change the status of the selected document and log your name. Continue?”);

@If(continue; “”; @Return(“”));

choice := @Prompt([OkCancelList] ;PH1; PB1; “(Processed)”; List);

FIELD TSWFStatus := choice;

@If(TSWFStatus = “(Processed)”; @SetField(“MorePayments”; “”); “”);

@If(TSWFStatus = “(Processed)”; @SetField(“DatePosted”; @Today); “”);

@If(TSWFStatus = “(Processed)”; @SetField(“PostedBy”; @Name([CN]; @UserName)); “”);

Hist := @NewLine + @NewLine + “----------------------------------------------------” + @NewLine + @Text(@Now) + “, " + @Name([CN]; @UserName) + " changed the status of this document to "” + choice + “".”;

FIELD History := History : Hist;

“”

Any ideas appreciated.

Thanks,

Geniece

Subject: Unable to edit from an action button

Check her preview pane. If it’s even cracked open just a tiny bit, the focus goes from the view (where the code works) to the document (which does not work since it does not include a ‘documentEdit’ command).

I struggled with this for a number of years. Now, in views where I think this will be a problem, the action item code includes a command to close the preview pane before executing the rest of the code.

HTH

Doug