Hi Alberto
I'm on NT 11.35 - had a quick look at this...
I just set this template option to TRUE and had a look at the generated code - seems you may need to do an override in the embed after this section to get the desired result...
Generated code:
loc:viewonly = Choose(not(TRUE),0,1)
if p_web.IfExistsValue('_viewonly_')
loc:viewonly = p_web.GetValue('_viewonly_')
p_web.SetSessionValue(clip(loc:divname)&'_viewonly_' & loc:RandomBrowseId,loc:viewonly)
else
loc:viewonly = choose(p_web.GetSessionValue(clip(loc:divname)&'_viewonly_' & loc:RandomBrowseId)=1,1,loc:viewonly)
end
p_web.SetValue('_viewonly_',loc:viewonly)
One option in embed: "2 End of SetBrowseOptions routine" - this hides Insert/Change/Delete buttons if condition is TRUE
if MyViewOnlyTest then ! Your condition
loc:viewonly = true
p_web.SetValue('_viewonly_',loc:viewonly)
p_web.SetSessionValue(clip(loc:divname)&'_viewonly_' & loc:RandomBrowseId,loc:viewonly)
end
You may have to check other ViewOnly configs that you may have in the browse but hope this helps
Cheers
Graham