?
Solved

How to refresh the document after it has opened

Posted on 2003-02-19
6
Medium Priority
?
300 Views
Last Modified: 2013-12-18
Hello All
Is there anyway to refresh the actionbar in 4.64
or to refresh the doc automatically after it has opened.
Yes I have switched on Automatically refresh fields. I need to refresh the entire document ala F9 without pushing F9 and only after switching to Edit mode as not everyone has edit rights

Thanks

James
0
Comment
Question by:imjamesw
  • 4
  • 2
6 Comments
 
LVL 7

Expert Comment

by:scottrma
ID: 7983130
Put @Command([ViewRefreshFields]) in the PostModeChange event of the form.

Regards,

Scott
0
 
LVL 7

Expert Comment

by:scottrma
ID: 7983154
Or this:

@If(@IsDocBeingEdited; @Command([ViewRefreshFields]); "")

in the form's PostModeChange event if you want the fields to be refreshed whenever the document is put into Edit Mode.

Regards,

Scott
0
 

Author Comment

by:imjamesw
ID: 7983258
I have a script in the PostModeChange

Also I have had limited succes by putting
 If source.EditMode Then Call source.refresh

in the PostRecalc

It works but I get an error:

Attempt to execute form events

James
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 7

Expert Comment

by:scottrma
ID: 7983329
It's probably just as well that you get the error in PostRecalc, as otherwise it might lead to an infinite loop or something (since PostRecalc executes after fields have been recalculated, but in this event you call uidoc.Refresh, which causes fields to be recalculated, which may in turn trigger the PostRecalc event again???).

What script code is currently in your PostModeChange? Perhaps it could be translated to do the same thing in formula language and then it could be combined with the @Command([ViewRefreshFields]) at the end of it?

Regards,

Scott
0
 

Author Comment

by:imjamesw
ID: 7983355
Here is the current PostModeChange script

Dim sourcedoc As Notesdocument
     Set sourcedoc = source.document
     If source.editmode Then
          sourcedoc.inuse = "Yes"
          Call sourcedoc.save (True, True)


James
0
 
LVL 7

Accepted Solution

by:
scottrma earned 800 total points
ID: 7984103
Try this for your PostModeChange:

@If(@IsDocBeingEdited; @SetField("inuse"; "Yes"); "");
@If(@IsDocBeingEdited; @Command([ViewRefreshFields]); "")

Let me know if this works for you.

Regards,

Scott
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
How can you see what you are working on when you want to see it while you to save a copy? Add a "Save As" icon to the Quick Access Toolbar, or QAT. That way, when you save a copy of a query, form, report, or other object you are modifying, you…
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
Suggested Courses

616 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question