Histórico da Página
HTML |
---|
<div id="main-content" class="wiki-content group">
<p>
When applying the settings shown in item <a href="http://tdn.totvs.com/display/fluigeng/Platform | 2.+Settings">2.
Settings</a>, automatically for the metadata programs, it will be
possible to associate documents to Logix records (provided the form
has a search operation). The procedures to associate a document are
shown below:
</p>
<p> </p>
<ol>
<li>Perform a search in the form being executed and press the
button <strong>Associate Document</strong><br />
<strong><br /></strong><img class="confluence-embedded-image"
src="http://tdn.totvs.com/download/attachments/108660019/docassoc1.jpg?version=1&modificationDate=1389033467000&api=v2"
data-image-src="http://tdn.totvs.com/download/attachments/108660019/docassoc1.jpg?version=1&modificationDate=1389033467000&api=v2"><br />
<strong><br /></strong>
</li>
<li>The following window will open, allowing you to add new
documents, or to delete, view and download documents previously
associated with the record<br />
<br />
<img class="confluence-embedded-image"
src="http://tdn.totvs.com/download/attachments/108660019/docassoc2.jpg?version=1&modificationDate=1389033867000&api=v2"
data-image-src="http://tdn.totvs.com/download/attachments/108660019/docassoc2.jpg?version=1&modificationDate=1389033867000&api=v2"><br />
<br />
</li>
<li>When choosing to add a new document, a window will open where
you can choose the document to be <em>uploaded</em> to GED<br />
<br />
<img class="confluence-embedded-image"
src="http://tdn.totvs.com/download/attachments/108660019/docassoc3.jpg?version=1&modificationDate=1389034709000&api=v2"
data-image-src="http://tdn.totvs.com/download/attachments/108660019/docassoc3.jpg?version=1&modificationDate=1389034709000&api=v2"><br />
<br />
</li>
<li>When choosing to associate a previously associated document,
a zoom will open with the files already associated with the table in
question<br />
<br />
<img class="confluence-embedded-image"
src="http://tdn.totvs.com/download/attachments/108660019/docassoc4.jpg?version=1&modificationDate=1389035037000&api=v2"
data-image-src="http://tdn.totvs.com/download/attachments/108660019/docassoc4.jpg?version=1&modificationDate=1389035037000&api=v2"><br />
<br />
</li>
<li>When confirming the file association screen, all selected
files will be sent to the Fluig GED tool.</li>
</ol>
<h1
id="id-3.1.AssociaçãodeDocumentos-AssociandodocumentosemprogramasFreeform">Associating
documents in Freeform programs</h1>
<p>
In Freeform programs, you need to add the <strong>Associate
Documents</strong> operation manually, according to the code below:
</p>
<p> </p>
<ol>
<li><p>Create the LDocAssociationButton on the tool bar,
and add a 4GL event for this button</p>
<style type="text/css">
.string {
color: red;
}
.command {
color: blue;
}
pre {
background-color: #F0F0F0;
border: 1px solid #BBB;
padding: 5px;
}
</style> <pre>
<span class="command">LET</span> m_opcao_doc_assoc = _ADVPL_create_component(<span
class="command">NULL</span>,<span class="string">"LDOCASSOCIATIONBUTTON"</span>,m_menubar_reference)
<span class="command">CALL</span> _ADVPL_set_property(m_opcao_doc_assoc,<span
class="string">"EVENT"</span>,<span class="string">"log5500_document_association"</span>)
</pre>
<p>
<span style="color: rgb(255, 255, 255);">.</span>
</p></li>
<li><p>In the event of the button, which is executed by
clicking on the associating document operation, the table and the
primary key of the record that will be associated with the document
should be informed to the association screen, also check if the
search was performed by the user before taking any action</p>
<style type="text/css">
.string {
color: red;
}
.command {
color: blue;
}
.comment {
color: #008000;
}
pre {
background-color: #F0F0F0;
border: 1px solid #BBB;
padding: 5px;
}
</style> <pre>
<span class="comment">#-------------------------------------#</span>
<span class="command">FUNCTION</span> log5500_document_association()
<span class="comment">#-------------------------------------#</span>
<span class="command">DEFINE</span> l_doc_assoc_reference <span
class="command">VARCHAR</span>(10)<br />
<span class="command">IF NOT</span> m_consulta_ativa <span
class="command">THEN</span> <span class="command">CALL</span> _ADVPL_set_property(m_statusbar,<span
class="string">'ERROR_TEXT'</span>,<span class="string">'Efetue primeiramente a consulta.'</span>) <span
class="command">RETURN FALSE END IF</span><br />
<span class="command">LET</span> l_doc_assoc_reference = _ADVPL_get_property(m_opcao_doc_assoc,<span
class="string">'DOC_ASSOCIATION_REFERENCE'</span>) <span
class="command">CALL</span> _ADVPL_set_property(l_doc_assoc_reference,<span
class="string">'TABLE_NAME'</span>,<span class="string">'log_usu_niv_sist'</span>) <span
class="command">CALL</span> _ADVPL_set_property(l_doc_assoc_reference,<span
class="string">'ADD_RECORD'</span>,<span class="string">'usuario'</span>,mr_usuario.cod_usuario) <span
class="command">CALL</span> _ADVPL_set_property(l_doc_assoc_reference,<span
class="string">'ADD_RECORD'</span>,<span class="string">'empresa'</span>,mr_usuario.cod_empresa)<br />
<span class="command">RETURN TRUE END FUNCTION</span>
</pre></li>
</ol>
</div>
|
Visão Geral
Import HTML Content
Conteúdo das Ferramentas