Link to home
Start Free TrialLog in
Avatar of kalios
kalios

asked on

not able to access a Notes form from Internet Explorer

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  


Avatar of HemanthaKumar
HemanthaKumar

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

it is not malfunction.. malformed :-)
Avatar of CRAK
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?
#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).
Avatar of kalios

ASKER

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
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.
Avatar of kalios

ASKER

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





Avatar of kalios

ASKER

Qwaletee, I also want to try the Web Query Save approach....
PLease advise
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
Avatar of kalios

ASKER

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
Avatar of kalios

ASKER

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.









Avatar of kalios

ASKER

i'm leaving for the day, i'll come and check the response tomorrow. thanks
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).
Avatar of kalios

ASKER

ofcourse the agent goes in the quotes. Let me try this and get back to you.
Avatar of kalios

ASKER

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
Avatar of kalios

ASKER

Qwaletee.... Need your assistance.

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

Avatar of kalios

ASKER

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
Avatar of kalios

ASKER

Qwaletee.... Need your assistance.
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) & "]"
Avatar of kalios

ASKER

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.
What if you change "?OpenForm" in "?CreateDocument"...?
Disregard the line with doc.Unid(0).
Avatar of kalios

ASKER

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



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.
Avatar of kalios

ASKER

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.
Silly me.  Got the wrong URL command...

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

ASKER

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

Not sure what to do.
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
Avatar of kalios

ASKER

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
Avatar of kalios

ASKER

I'm guessing the problem is in the form. It is expexting some values from the Customer form like Customername, CustID, Custcode etc...
Avatar of kalios

ASKER

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.


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?
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

Avatar of kalios

ASKER

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?

Avatar of kalios

ASKER

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
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?
Avatar of kalios

ASKER

OK, I get the same error, page cannot be displayed HTTP 500, Internal Server Error.
Avatar of kalios

ASKER

The problem is in the config form I guess. What could be the problem?
ASKER CERTIFIED SOLUTION
Avatar of qwaletee
qwaletee

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kalios

ASKER

Qwaletee,

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

thanks for your help
Kalios
Makes sense... dialog boxes are Notes client UI elements, which won;t work ina browser environment.