Opening a document in a form that did not create it

How can I open a document in a Form that did not create that particular document, by clicking a ‘Open’ Action Button in a View?

Please help me. Thanking you. Looking forward.

Regards.

Subject: Opening a document in a form that did not create it.

So, if the user just double-clicks on the document you want it to open with form A, but if the user wants to open it with form B they should use the action button, is that it? If so then you should be able to use the following in your action button:

FIELD Form := “formB”;

@Command([Opendocument])

Now if the user edits and saves the document the Form value will change, and the document will thenceforward open with formB. Is that what you want? If so then is there some reason you would not just change the form value up front, with an agent?

Changing the form is tricky and can have strange unintended consequences; you should proceed carefully.

Subject: Opening a document in a form that did not create it.

Abhishek, pick the notes document and change the “form” field value to the form name u want to open the document into. then save and edit ur notesdocument. I havn’t tried this method but guess it should work.

Subject: RE: Opening a document in a form that did not create it.

Thank you very much for your help. It’s working nicely now.

Bye.

Subject: Opening a document in a form that did not create it.

Have a look at “Form Formula” in view. That will help you out. If you want to change the form name then change the form field with the following statement -

Dim doc as notesdocument

set doc = view.getfirstdocument

doc.form = “new form name”

doc.save true,false

–Phani