Solved

not able to access a Notes form from Internet Explorer

Posted on 2003-12-08
41
384 Views
Last Modified: 2013-12-18
Hi Experts,

We have a Notes DB with huge amount of records. Everything works fine when we use
Lotus Client 5.12. However, the problem arises when I try to open the Notes Database via a link using Internet explorer. This is what I do.
I open Internet exporer and type in the database location (server name and the folder and the *.nsf file) and hit enter. It takes me to the default view which is fine.
Now I click on "Create new Customer" button in this view (remember we are using IE here) and it asks me for password and stuff. Once the password is accepted it opens the new form perfectly. Now in this new form I enter all the pertinent information and click on the button named (create customer detail) in this form to create another form.
The code for this button is as follows:
@PostedCommand([FileSave]);
@PostedCommand([Compose]; ""; "Customerdetail")
Now when I click the "create customr detail" button the Customerdetail form does not open and I get the following error message in IE. Please advise.

The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.

--------------------------------------------------------------------------------

Please try the following:

Open the zzzzzz1.customer.com home page, and then look for links to the information you want.
Click the  Refresh button, or try again later.

Click  Search to look for information on the Internet.
You can also see a list of related sites.


HTTP 500 - Internal server error
Internet Explorer  


0
Comment
Question by:kalios
  • 23
  • 13
  • 3
  • +1
41 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9899770
HTTP 500 is generic error.. so it really doesn't help

What you can do is check the basic things..

1. The form which is being composed is available ?
2. ACL settings have proper access for the logged in users
3. Fields which are computed might not be finding view/database (eg: lookups)
4. COmputation errors
5. URL malfunction (wrong url) .. manually type url and see if it opens the form

~Hemanth

0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 9899793
it is not malfunction.. malformed :-)
0
 
LVL 13

Expert Comment

by:CRAK
ID: 9899866
Check the server's log for the actual error message.
Any scripts on that form? Or unsupported formula's, like a @DbLookup with a servername given?
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9900525
#1) In my experience, that command sequenc is not supported for the web.  After a [FilseSave], you can [FileCloseWindow], [OpenView], or [FileOpenDatabase].  (Or, you can do nothing and the form redisplays.)

However, you would not get an error 500.  That seems to indicate, most likely, an error in your QuerySaveAgent call, or possibley in the form code itself.  It could also indicate an error in a redirect ($$Return or print statement from the QSA).
0
 
LVL 2

Author Comment

by:kalios
ID: 9907968
Okay here is the thing.
I need to have this code in the button becuase its saving the current form ( )and then composing a new form and getting some fields  from this current form to the new form.
This is the code I've in the button as said earlier in form "Customer".

@PostedCommand([FileSave]);
@PostedCommand([Compose]; ""; "Customerdetail")

Once I click the button it will save "Customer" form and compose "Customerdetail" form.
It will get some fields from customer form and put it in customerdetail form.

Now when I click the button in IE it is giving me the error. However I went back to Lotus Notes
and checked and it saved the record. However it is not composing the customerdetail form.

Should this code be changed here. How can I compose the customerdetail form.
Looks like it saves the customer form but the customerdetail form is not opening in IE and give me that error I said earlier.

This is an escalated issue. Please help.
thanks
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9909768
You will need to use a slightly different strategy.
The button should read, for the web:

@Command([FileSvae]);
@Command([FileCloseWindow])

SEPARATELY, we will cause the save to result in the compose.  If you have a web query save agent, we wil ave to do it there.  If not, the easier way is via a $$Return field.

$$Reurn specifies what DOmino shoudl do once it has finished saving and closing a form.  Create a field named $$Return type text - computed for DISPLAY.  Value formula wll be "[/" + @ReplaceSubstring(@Subset(@DbName;-1); "\\" : " "; "/" : "+") + "/CustomerDetail]"

That cause Domino to generate the URL to the CustomerDetail form when it compltes, and redirect the user there.  So, the button does nothave code that gets you where you want to go, but the $$Return takes over where teh button leaves off, and does get you there.
0
 
LVL 2

Author Comment

by:kalios
ID: 9924433
ok.. sorrry for the late response. some thing came in between that needed more attention.
Coming back here.

Qwaletee, I guess i'll go with the idea of creating a new field called $$Return.
Where do I need to create this field. Also my knowledge is very limited to Lotus Notes.
Can you be more specific please.
Should I create a new field in the Customer form, I mean the form where the
button is?
Now if I use the above code "[/" + @ReplaceSubstring(@Subset(@DbName;-1); "\\" : " "; "/" : "+") + "/CustomerDetail]"  Will it compose CustomerDetail form
and Piggy back(get)  the information from the Customer form.

Some information in customer form are 'customer name' , 'customer code' etc..
Now generally when I click the button (which is in customer form) it will save the
customer form and compoe the customer detail and gets the values like customer code
, customer name into this form. So if we use the $$return field will this be accomplished.
Please advise


I hope its not confusing.
thanks
kalios





0
 
LVL 2

Author Comment

by:kalios
ID: 9924471
Qwaletee, I also want to try the Web Query Save approach....
PLease advise
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9924600
To allow inheritance, you need to put in the URL parameter that DOmino would nornally generate for you.  This only works on documents that have already been saved.  You would place $$Return on the form that is being saved the form with the button).  the formula wld be:

"[/" + @ReplaceSubstring(@Subset(@DbName;-1); "\\" : " "; "/" : "+") + "/CustomerDetail?OpenForm&ParentUNID=" + @Text(@DocumentUniqueID) + "]"

If you want a web query save agent, then create a n agent, mark it SHARED, set it to run once/@command may be used (in R6, this language changed).

Make the run type LotusScript.  You put code in the initialize event.  For example, the following:

Dim s as new notesSession
Dim doc as notesDocument
Set doc = s.documentContext
If doc is nothing then
  Print "No document!"
  Exit Sub
End If
Forall item in doc.items 'for each field
  Print item.name " value is: " item.text "<BR>" '<BR> is HTML for line break
End forall



This causes the browser to display the contents of the submitted fields as the result page for subitting the form.  If the agent prints anything, that overrides the $$Return, so don't bother with $$Return if the agent will print anything.  You can have the agent do the equivalent of the $$Return:

Dim s as new notesSession
Dim db as notesdatabase
Dim doc as notesdocument
set db = s.currendtabase
set doc = s.documentcontext
print "[/" db.filepath "/CustomerDetail?OpenFOrm&ParentUNID=" doc.unid "]"

The web query save agent can also modify the document:

Dim s as new notesSession
dim doc as notesDocument
Set doc = s.documentContext
doc.saveUserName = s.userName
doc.saveEffectiveserName = s.effectiveUserName
doc.saveAgentName = s.currentAgent.name
REM There is no need for doc.save, because save is implicit in the submit.  in fact you can get replication conflicts that way
0
 
LVL 2

Author Comment

by:kalios
ID: 9924632
I'm new to Lotus Script. I'll take some time to go through this and get back to you.
thanks for the quick response.

kalios
0
 
LVL 2

Author Comment

by:kalios
ID: 9924847
Qwaletee,

Before I go further , I want to tell you some more what happened.
Yesterday, I created two buttons, one has the following formula.
@PostedCommand([FileSave]);

and the other one has the following:
@PostedCommand([Compose]; ""; "Customerdetail")

the first one worked and the second one gave me the same error in the web-browser.
As I said before, there are two forms, Customer and Customerdetail.
Both these buttons are in Customer form.
Now the customer form has some fields like customer code, customer name.

the Customerdetail form has customer code and customer name as well and another field Config ID.
Now all these fields here are computed.
the Customer code and custoemer name field values are sourced from the Customer form.
the Config Code has the following formula.
@If(@IsNewDoc & @IsDocBeingSaved; @Subset(@DbLookup("" : "Nocache"; ""; "(CINumber)"; CustomerID; 2); 1) + 1; ConfigID)

Now I read all your code above.
I want to go only with query save agent.
I've created an agent as per what you said.

Now in the agent I guess I've to use this code right?

Dim s as new notesSession
Dim db as notesdatabase
Dim doc as notesdocument
set db = s.currendtabase
set doc = s.documentcontext
print "[/" db.filepath "/CustomerDetail?OpenFOrm&ParentUNID=" doc.unid "]"


Once I save the agent should I go back to form and in the Web Query save agent how should I point this agent to run there.
I know i'm asking you some basics. I'm new to Lotus script.

Please advise.

If you can help me out and if this works I promise you what ever points you ask.









0
 
LVL 2

Author Comment

by:kalios
ID: 9924880
i'm leaving for the day, i'll come and check the response tomorrow. thanks
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9925342
Yes, you selected the rigt agent code... put it in initialize, shaed agent, run from agent list, run once/@commands.  You MUST use those specific choices.

IN the form, find the WebQuerySave event.  It wil have something like @Command([ToolsRunMacro]; "<your agent name here>")

Guess what goes between the quotes?  (Leave the @Command([ToolsRunMacro] in there).
0
 
LVL 2

Author Comment

by:kalios
ID: 9928623
ofcourse the agent goes in the quotes. Let me try this and get back to you.
0
 
LVL 2

Author Comment

by:kalios
ID: 9951282
Qwaletee,
OK, I created an agent named "Webconfig" and put the following code in in it (exactly as shown below).

Sub Initialize
      Dim s As New notesSession
      Dim db As notesdatabase
      Dim doc As notesdocument
      Set db = s.currentdatabase
      Set doc = s.documentcontext
      Print "[/" db.filepath "/Customerdetail?OpenFOrm&ParentUNID=" doc.unid "]"
End Sub

Now in the "Customer" form I put the following code in the WebQuerysave option.
@Command([ToolsRunMacro]; "(Webconfig)")

Now in the "Customer" form for button I put the following code:
@Command([FileSave]);
@Command([FileCloseWindow])

I logged again via Internet explorer and I tired the same thing.
As usual when I click the button it is saving the document. However it is not composing
the "Customerdetail" form.
Instead it takes me to another page and in that page I see only the following lines:
"FORM PROCESSED".
I guess I'm getting this "FORM PROCESSED" message because of this code :
@Command([FileSave]);
@Command([FileCloseWindow])

Its not giving me the server error as it used to earlier. However, it is not composing the
Customerdetail form.
It should take me to the Customerdetail form as soon as I click the button.
Please help.
thanks
Kalios


However, it gives me
0
 
LVL 2

Author Comment

by:kalios
ID: 9952702
Qwaletee.... Need your assistance.

0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9952784
Sorry, been away.  try this:

Sub Initialize
     On Error goto die
     Print "Test version, which will print text to HTML [/relativeURL] but in final version will actually redirect to the relative URL<BR>"
     Dim s As New notesSession
     Print "Have a session and a smile<BR>"
     Dim db As notesdatabase
     Dim doc As notesdocument
     Set db = s.currentdatabase
     Print "have a DB, for your information<BR>"
     Set doc = s.documentcontext
     Print "Have a doc, ready to diagnose<BR>"
     Print "[/" db.filepath "/Customerdetail?OpenFOrm&ParentUNID=" doc.unid "]"
     Print "OK?"
     Exit Sub
die:
     Print Err "on line" Erl "- " Error
     Exit Sub
End Sub

0
 
LVL 2

Author Comment

by:kalios
ID: 9956357
Hi There qwaletee,

I used the above code in the agent. When I clicked the button as usual I could save the document successfully. However, in the browser I got the following text.

Test version, which will print text to HTML [/relativeURL] but in final version will actually redirect to the relative URL
Have a session and a smile
have a DB, for your information
Have a doc, ready to diagnose
13 on line 12 - Type mismatch

What could be the problem ?
Please advise
Kalios
0
 
LVL 2

Author Comment

by:kalios
ID: 9959361
Qwaletee.... Need your assistance.
0
 
LVL 13

Expert Comment

by:CRAK
ID: 9959707
In case you're in a hurry (not trying to steal points!), try this:

Print "[/" & db.filepath & "/Customerdetail?OpenForm&ParentUNID=" & doc.UniversalID & "]"

or, if "unid" is a field on doc:

Print "[/" & db.filepath & "/Customerdetail?OpenForm&ParentUNID=" & doc.Unid(0) & "]"
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 2

Author Comment

by:kalios
ID: 9960732
Okay I used the first one:
Print "[/" & db.filepath & "/Customerdetail?OpenForm&ParentUNID=" & doc.UniversalID & "]"

and it does not compose the form and gives me the following messages in the browser:
Test version, which will print text to HTML [/relativeURL] but in final version will actually redirect to the relative URL
Have a session and a smile
have a DB, for your information
Have a doc, ready to diagnose
[/apps2/Custprofil.nsf/Customerdetail?OpenForm&ParentUNID=55DB230EB8B72D7B85256DFF00828975] OK?

I then used the second one:
Print "[/" & db.filepath & "/Customerdetail?OpenForm&ParentUNID=" & doc.Unid(0) & "]"

and now I get these messages
Test version, which will print text to HTML [/relativeURL] but in final version will actually redirect to the relative URL
Have a session and a smile
have a DB, for your information
Have a doc, ready to diagnose
[/apps2/Custprofil.nsf/Customerdetail?OpenForm&ParentUNID=] OK?

I should be able to compose the Customerdetail form.
0
 
LVL 13

Expert Comment

by:CRAK
ID: 9962805
What if you change "?OpenForm" in "?CreateDocument"...?
Disregard the line with doc.Unid(0).
0
 
LVL 2

Author Comment

by:kalios
ID: 9967785
CRAK, I used this
Sub Initialize
      On Error Goto die
      Print "Test version, which will print text to HTML [/relativeURL] but in final version will actually redirect to the relative URL<BR>"
      Dim s As New notesSession
      Print "Have a session and a smile<BR>"
      Dim db As notesdatabase
      Dim doc As notesdocument
      Set db = s.currentdatabase
      Print "have a DB, for your information<BR>"
      Set doc = s.documentcontext
      Print "Have a doc, ready to diagnose<BR>"      
      Print "[/" & db.filepath & "/Customerdetail?CreateDocument&ParentUNID=" & doc.UniversalID & "]"
      Print "OK?"
      Exit Sub
die:
      Print Err "on line" Erl "- " Error
      Exit Sub
End Sub

and I got this message again in the browser. the customerdetail form does not compose.

Test version, which will print text to HTML [/relativeURL] but in final version will actually redirect to the relative URL
Have a session and a smile
have a DB, for your information
Have a doc, ready to diagnose
[/apps2/Custprofil.nsf/Config?CreateDocument&ParentUNID=A2393292F860380385256E0000776671] OK?

I appretiate your effort to help me out CRAK.

Qwaletee where are you. Are you on vacation?
I need assistance ASAP.

thanks
Kalios



0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9970642
I now see where I went wrong.  that doc.UNID should be doc.universalID.  take out all theprint statements except for thelast one. Here's why:

If there is a SINGLE print statement starting with a [ left bracket and ending with a ] right bracket, then Domino assumes it is a redirect instruction.

Otherwise, it just sends all the print output to teh browser.

Now, take that last line of output: [/apps2/Custprofil.nsf/Config?CreateDocument&ParentUNID=A2393292F860380385256E0000776671]

If you tunr that into a URL -- http://yourserver/apps2/Custprofil.nsf/Config?CreateDocument&ParentUNID=A2393292F860380385256E0000776671 -- then does it prperly compose a document?  If so, the script will work properly once you take out the extra PRINT statements!

Otherwise, we stillhave some more work to do.
0
 
LVL 2

Author Comment

by:kalios
ID: 9985663
Qwaletee,
I tried this today morning. I used the following code.

fyi, the form name is changed to Config.

So we have two forms now, Customer and Config.
In the Customer form web query save agent,.. I put the following code in the agent:

Sub Initialize
      On Error Goto die      
      Dim s As New notesSession
      Dim db As notesdatabase
      Dim doc As notesdocument
      Set db = s.currentdatabase
      Set doc = s.documentcontext
      Print "[http://ibee1.zzzz.com/apps2/Custprofil.nsf/Config?CreateDocument&ParentUNID=" & doc.UniversalID & "]"      
      Exit Sub
die:
      Print Err "on line" Erl "- " Error
      Exit Sub
End Sub

I still get the same error.
The page cannot be displayed
HTTP 500 - Internal server error

Also I forgot to mention.
The config form has the following checked in its properties.
* Formulas inherit values from selected documents.

Not sure if this is making any problem
Because as I said before some fields in Config form are getting values from Customer form.

Do we need to pass these values also to the Config from from the Agent?

Please advise.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9986305
Silly me.  Got the wrong URL command...

     Print "[http://ibee1.zzzz.com/apps2/Custprofil.nsf/Config?OpenForm&ParentUNID=" & doc.UniversalID & "]"    
0
 
LVL 2

Author Comment

by:kalios
ID: 9986574
OK, I used the above print statement and I'm still getting the HTTP- 500 Internal Server Error.

Not sure what to do.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9986636
Well, let's figure out if it is the agent, or something else.

Remove the brackets, so that the print statement reads:


     Print "http://ibee1.zzzz.com/apps2/Custprofil.nsf/Config?OpenForm&ParentUNID=" & doc.UniversalID

Now, when you do a submit, you should see a web page that either stil has the error (which indicates a problem with the agent or with the form being submitted), or you will see a URL.

If you get the URL, copy it to the clipboard, paste it in the URL address bar, and hit enter.

the result should either be your form, or an error page.

If it is teh form, then I'll have to scrtahc my head a bit.  If it is an error page, then either yuo are pointing to the wrong place, or your Config form has a problem.
                                                                                                          krystleblair@peoplepc.com
-qwaletee
0
 
LVL 2

Author Comment

by:kalios
ID: 9986939
Ok, I removed the brackets and tried. After clicking the button which is in the Customer form, it is just showing an empty page. There is nothing in the page.
However, in the Address bar I see the following:
http://ibee1.zzz.com/apps2/Custprofil.nsf/85256395004214188525638400678e42?OpenForm&Seq=1

I then copied this and pasted it in a fresh IE browser and hit enter.
It is bringing up the Customer form again. It has to bring the Config form.

thanks
Kalios
0
 
LVL 2

Author Comment

by:kalios
ID: 9986958
I'm guessing the problem is in the form. It is expexting some values from the Customer form like Customername, CustID, Custcode etc...
0
 
LVL 2

Author Comment

by:kalios
ID: 9987022
Also, there is a field in the config form which is a computed field and has the following code in it.
@If(@IsNewDoc & @IsDocBeingSaved; @Subset(@DbLookup("" : "Nocache"; ""; "(CINumber)"; CustomerID; 2); 1) + 1; ConfigID)

Do you think this would create any problems. But this formula runs only when we are trying to save the config form. So this should not be a problem.


0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9987052
http://ibee1.zzz.com/apps2/Custprofil.nsf/85256395004214188525638400678e42?OpenForm&Seq=1 -- that should NOT be showing. It indicates that rather than using agent output, it is just reloading the existing document.

What is the current formula in the button you are using?
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9987065
Actually, that's weird considering that you previousl had some output from the agent.  Let's go back to the test version of the agent, only with the print statement corrected...

Sub Initialize
     On Error Goto die
     Print "Test version, which will print text to HTML [/relativeURL] but in final version will actually redirect to the relative URL<BR>"
     Dim s As New notesSession
     Print "Have a session and a smile<BR>"
     Dim db As notesdatabase
     Dim doc As notesdocument
     Set db = s.currentdatabase
     Print "have a DB, for your information<BR>"
     Set doc = s.documentcontext
     Print "Have a doc, ready to diagnose<BR>"    
'     Print "[/" & db.filepath & "/Customerdetail?CreateDocument&ParentUNID=" & doc.UniversalID & "]"
     Print "[http://ibee1.zzzz.com/apps2/Custprofil.nsf/Config?OpenForm&ParentUNID=" & doc.UniversalID & "]"    
     Print "OK?"
     Exit Sub
die:
     Print Err "on line" Erl "- " Error
     Exit Sub
End Sub

0
 
LVL 2

Author Comment

by:kalios
ID: 9987312
The button is the Customer form has the following formula:
@Command([FileSave]);
@Command([FileCloseWindow])

I put the above code and got the following messages in thebrowser

Test version, which will print text to HTML [/relativeURL] but in final version will actually redirect to the relative URL
Have a session and a smile
have a DB, for your information
Have a doc, ready to diagnose
[http://ibee1.zzzz.com/apps2/Custprofil/Config?OpenForm&ParentUNID=32BF3594A26551C785256E0400715494] OK?

0
 
LVL 2

Author Comment

by:kalios
ID: 9987407
I missed to mention:
The browser where I get the above print statements also has the following address in the address bar
http://ibee1.zzzz.com/apps2/Custprofil.nsf/85256395004214188525638400678e42?OpenForm&Seq=1
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 9987470
I don't really care what's in the address bar, at least for the test.  OK, so what happens if you put http://ibee1.zzzz.com/apps2/Custprofil/Config?OpenForm&ParentUNID=32BF3594A26551C785256E0400715494 in the address bar?
0
 
LVL 2

Author Comment

by:kalios
ID: 9987531
OK, I get the same error, page cannot be displayed HTTP 500, Internal Server Error.
0
 
LVL 2

Author Comment

by:kalios
ID: 9987548
The problem is in the config form I guess. What could be the problem?
0
 
LVL 31

Accepted Solution

by:
qwaletee earned 340 total points
ID: 9989184
Well, that's a tough one, trying to figure out what in a form s not behaving.  I would guess one of your defualt value formula or one of your computed/computed-display-composed fields has a formula that evaluates to an error condition.

WHat I usually end up doing for that kind of situation is creating a backup copy of the form, and deleting the bottom half of the form.  If it starts owrking, I know the problem is in the lower half of the form.  You keep doing this, and end up with a sort of binary search tree to find the problem.
0
 
LVL 2

Author Comment

by:kalios
ID: 10212287
Qwaletee,

The form has some Dialogue boxes which when removed are working.

thanks for your help
Kalios
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 10246141
Makes sense... dialog boxes are Notes client UI elements, which won;t work ina browser environment.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

706 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now