Change value into a profile form

Hi all,

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.

Thanks for your help

Subject: Change value into a profile form

Dumb question, are you saving the profile document after you make the change?

Or do you mean you don’t even see the change in the profile document while you’re still in the debugger?

Didn’t want to assume.

Subject: RE: Change value into a profile form

here is my code :

Set SAPDoc = DefineSAPDoc()

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

End Function

Thanx for additionnal help

Subject: RE: Change value into a profile form

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)

End Sub