I meet a problem when into a button, i try to change a field value into a profile document.
My button contain script and run from a Notes client.
When i run debugger, i can see in my variable the content of my Profile doc. But when i set the command to change the value of one field, no error, but no change.
Anybody can help me with the correct command?
I have try to create a second button with only the function@setprofilefield, but same result : no change.
Forall SAPDocitem In SAPDoc.Items
Call SAPDoc.ReplaceItemValue(SAPDocitem.name, SAPDocItem.values)
End Forall
Call SAPDoc.ComputeWithForm(True, False) 'To execute the validation and translation formula of the form
Call SAPDoc.Save(True,True)
here is the content of my function (DefineSAPDoc)
Function DefineSAPDoc() As NotesDocument
SAPDoc.fl_hostname = "/H/xxx.xxx.xxx.xxx"
Set DefineSAPDoc = SAPDoc
I have try this code, get from a forum answer.Nothing change.
“tf_archive” is the alias name of a form call “sap_tf_archiv_profil”
Nothing is done, the field fl_hostname is still empty.
Thanks again for any help
Sub Click(Source As Button)
Dim maildb As NotesDatabase
Dim session As New NotesSession
Dim Doc As Notesdocument
Set maildb = session.CurrentDatabase
Set doc = maildb.GetProfileDocument ("tf_archive")
host = "H"
Call doc.ReplaceItemValue( "fl_hostname", host)
Call doc.save (True,True)