I answer myself
the best method is to use label fields to be dynamically modified on the onLoadRecord event.
my finally code is:
$LINKPAGE = sc_make_link(apri_mod_rischi, NPROT={NPROT};m_rischid=[s_rischid];m_docweb=[s_docweb]);
{PDF2} = ‘< a id= “sc_AS_pdf2” class=“scButton_disabledSCImage " title=“Open pdf” style=“vertical-align: middle; display:inline-block;” href=”’.$LINKPAGE.’" target="_blank">< img id=“id_img_sc_pdf2” src="…/_lib/img/pdf2chk.png" style=“border-width: 0; cursor: pointer”>< /a>’;
the link is a blank page with the code for open or create a pdf