Link to home
Start Free TrialLog in
Avatar of hreinart
hreinart

asked on

WEB @command filesave doesn't work

hi,

for all who might participated in the last question (web agent needed):
this question here referres to the same database.


i have a database which runs fine on my pc with domino.
there is 1 form with a button "save" doing:  @Command([FileSave]);
it works without any problem on my local pc.


problem:
i installed a new domino server 5.09 on an other pc.
on this server i copied the same database.
the acl is set for all to manager
i signed the databse with the new server's id
the server is added to the acl.
.
..... but
when pressing this button the form is not saved.
if i look in the view all documents no new document can be found there.

i think that this is a very simple function i use here.
i have no idea why it's not working.


any idea?





Avatar of RanjeetRain
RanjeetRain

Add "Anonymous" and "Default" with a minimum of "Editor" level in the ACL.
Avatar of hreinart

ASKER

sorry, didn't mention this.
this is already done.
Do you have a SaveOptions field with its value set as "0"?
i don't know this.

the only fileds used is 1 to enter a value
and a button like described.

i did not create a separate field for it.
hreinart,
CHeck your log file, I feel surely it's related to access only. As Ranjeet has mentioned saveoptions is one of the field which u have to check for

Partha
what exactly do i need to look for?

is this a property of the form?

or is this a field (i should know if i created this field manually, or?) ?
SaveOptions is a field, it can be in the Form itself or can be directly be generated in the document by an agent. Are there any Error messages?
hi,

this field doesn't exist.
no agnet saves the document

hi,

the agent written by p_partha (last ee question) works fine in this database.
now i have the idea that this can be changed to save the document, too.

the from beeing used contains some fileds which are computed.
in the end a save (using an agent) needs to do the following:

1) look in the view NR, find the booknumber (specified in the field "buchnummer" of this form)
    and change the field status to "ausgeliehen".

2) save this form



this is the agent written by p_partha which works fine in this databse.
this agent returns a lent book.
it might be possible to use this with changes.


Dim db As NotesDatabase
      Dim view As NotesView
      Dim uidoc As NotesUIDocument
      Dim doc As NotesDocument
      Dim item As NotesItem
      Dim session As New notessession
      Dim dateTime As New NotesDateTime( "" )
      
      
      Set db = session.CurrentDatabase
      Set curdoc = session.documentcontext
      Set view = db.GetView ("($NX)" )
      Dim key As String
      Dim key2 As String
      key = curdoc.buchnummer(0)
      Set doc = view.GetDocumentByKey (key)
      If Not (doc Is Nothing) Then
            Call dateTime.SetNow
            Set doc.rueckgabe = dateTime
            Call doc.Save(True,True)
      End If
      Set db = session.CurrentDatabase
      Set view = db.GetView ("($NR)" )
      key2 = curdoc.buchnummer(0)
      Set doc = view.GetDocumentByKey (key2)
      If Not (doc Is Nothing) Then
            Set Item = doc.ReplaceItemValue("status","vorhanden")
            Call doc.Save(True,True)
      End If
!!! please read carefully:

to save the document like i wrote before (using a notes client) a script already exists.
this script doesn't work for the web but could give you more information about
what is needed

ub Click(Source As Button)
      Dim session As New NotesSession
      Dim workspace As New NotesUIWorkspace
      Dim db As NotesDatabase
      Dim view As NotesView
      Dim uidoc As NotesUIDocument
      Dim doc As NotesDocument
      Dim item As NotesItem
      Set uidoc = workspace.CurrentDocument      
      
      Set db = session.CurrentDatabase
      Set view = db.GetView ("($NR)" )
      Dim key As String
      key = Cstr(uidoc.FieldGetText ("buchnummer"))
      Set doc = view.GetDocumentByKey (key)
      If Not (doc Is Nothing) Then
            Set Item = doc.ReplaceItemValue("status","ausgeliehen")
            Call doc.Save(True,True)
      End If
      Call uidoc.Close
End Sub
ASKER CERTIFIED SOLUTION
Avatar of steve_bagnall
steve_bagnall

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
i'll try it out, thanks !!
i can try it hopefully today (after local holiday)
sorry, i was too lazy.

it took some time until i could test it, but about 1 week ago the test run very good.
sorry for beeing late here!

i increase the point (50)