Hi JM,
Cool - thanks for the example.
Ok, the problem is in the embed code you've added to the ValidateValue::Loc:Login routine.
Let's cover the bases;
a) you added your embed code to the second embed point in that routine. It would be better to add it to the first embed point, so that it executes before the generated code.
b) you called a Refresh routine from this routine. This is not ideal because this routine is called as the form is completed, but it is also called when the form completes. The better idea is to add the F1:FIRMA_ALIAS field to the reset list of the Login field. This will generate the refresh in the correct place.
c) although commented out, your code for Firma_User(1) failing is over elaborate. There is one missing line there, and two lines that could complicate things.
So in summary, add to the reset list, and put the following code one embed point higher, and you should be good to go;
IF Firma_User(1)=Level:Benign
p_web.SetSessionValue('F1:USER_ID',F1:USER_ID)
Else
loc:Invalid = 'Loc:Login'
Loc:Login:IsInvalid = true
loc:alert = 'El usuario no existe '& p_web.site.RequiredText
end
Cheers
Bruce