Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.
HTML

<div id="main-content" class="wiki-content group">
	<h1 id="id-2.1Formulário-ComocriarumformuláriodiretamentenoECM">How
		to create a form directly in ECM.</h1>
	<ol>
		<li>Create an HTML file with the fields with the same name used
			in Microsiga Protheus.</li>
		<li>Add the HTML file as a New Card Index in the Documents of ECM
			and check the Code that was generated. This code will be used in the
			creation of the future Process.</li>
	</ol>
	<p>&#160;</p>
	<p>
		<em>* For more information about form customizations in ECM, see
			the ECM documentation. The Objective of this documentation is to
			provide the care we must take to build a form for integration with
			Microsiga Protheus.</em>
	</p>
	<h2 id="id-2.1Formulário-Exemplodeformulário">Sample form.</h2>
	<blockquote>
		<p align="left">&lt;HTML></p>
		<p align="left">&lt;HEAD></p>
		<p align="left">&#160; &lt;TITLE> Example - Customer &lt;/TITLE></p>
		<p align="left">&#160; &lt;LINK REL=STYLESHEET
			HREF="/webdesk203/wdk/global.css"></p>
		<p align="left">&lt;/HEAD></p>
		<p align="left">&lt;BODY scroll=yes></p>
		<p align="left">&lt;span class="NumSecao"></p>
		<p align="left">&lt;strong>&#160;Registration&lt;/strong>&lt;/span></p>
		<p align="left">&lt;HR></p>
		<p align="left">&lt;br></p>
		<p align="left">&lt;form></p>
		<p align="left">&lt;table></p>
		<p align="left">&#160; &lt;tr></p>
		<p align="left">&#160;&#160;&#160; &lt;td align="right"
			width="150" class="Labels">&lt;b>Code:&lt;/b>&lt;/td></p>
		<p align="left">&#160;&#160;&#160; &lt;td
			class="Normal">&lt;strong>&lt;input type="text" size="6"
			name="A1_COD">&lt;/strong>&lt;/td></p>
		<p align="left">&#160; &lt;/tr></p>
		<p align="left">&#160; &lt;tr></p>
		<p align="left">&#160;&#160;&#160; &lt;td align="right"
			width="150" class="Labels">&lt;b>Loja:&lt;/b>&lt;/td></p>
		<p align="left">&#160;&#160;&#160; &lt;td
			class="Normal">&lt;strong>&lt;input type="text" size="2"
			name="A1_LOJA">&lt;/strong>&lt;/td></p>
		<p align="left">&#160; &lt;/tr></p>
		<p align="left">&#160; &lt;tr></p>
		<p align="left">&#160;&#160;&#160; &lt;td align="right"
			width="150" class="Labels">&lt;b>Física/Jurídica:&lt;/b>&lt;/td></p>
		<p align="left">&#160;&#160;&#160; &lt;td
			class="Normal">&lt;strong></p>
		<p align="left">&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;select name="A1_PESSOA"></p>
		<p align="left">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;option value="F">Física&lt;/option></p>
		<p align="left">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;option value="J">Jurídica&lt;/option></p>
		<p align="left">&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;/select></p>
		<p align="left">&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;/strong>&lt;/td></p>
		<p align="left">&#160; &lt;/tr></p>
		<p align="left">&#160; &lt;tr></p>
		<p align="left">&#160;&#160;&#160; &lt;td align="right"
			width="150" class="Labels">&lt;b>Name:&lt;/b>&lt;/td></p>
		<p align="left">&#160;&#160;&#160; &lt;td
			class="Normal">&lt;strong>&lt;input type="text" size="40"
			name="A1_NOME">&lt;/strong>&lt;/td></p>
		<p align="left">&#160; &lt;/tr></p>
		<p align="left">&#160; &lt;tr></p>
		<p align="left">&#160;&#160;&#160; &lt;td align="right"
			width="150" class="Labels">&lt;b>Trade Name:&lt;/b>&lt;/td></p>
		<p align="left">&#160;&#160;&#160; &lt;td
			class="Normal">&lt;strong>&lt;input type="text" size="20"
			name="A1_NREDUZ">&lt;/strong>&lt;/td></p>
		<p align="left">&#160; &lt;/tr></p>
		<p align="left">&#160; &lt;tr></p>
		<p align="left">&#160;&#160;&#160; &lt;td align="right"
			width="150" class="Labels">&lt;b>Address:&lt;/b>&lt;/td></p>
		<p align="left">&#160;&#160;&#160; &lt;td
			class="Normal">&lt;strong>&lt;input type="text" size="40"
			name="A1_END">&lt;/strong>&lt;/td></p>
		<p align="left">&#160; &lt;/tr></p>
		<p align="left">&#160; &lt;tr></p>
		<p align="left">&#160;&#160;&#160; &lt;td align="right"
			width="150" class="Labels">&lt;b>Type:&lt;/b>&lt;/td></p>
		<p align="left">&#160;&#160;&#160; &lt;td
			class="Normal">&lt;strong></p>
		<p align="left">&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;select name="A1_TIPO"></p>
		<p align="left">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt; option value = "F" > Cons. End &lt;/option></p>
		<p align="left">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;option value="L">Rural Producer&lt;/option></p>
		<p align="left">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;option value="R">Reseller&lt;/option></p>
		<p align="left">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;option value="S">Solidary&lt;/option></p>
		<p align="left">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;option value="X">Export&lt;/option></p>
		<p align="left">&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;/select></p>
		<p align="left">&#160;&#160;&#160; &lt;/strong>&lt;/td></p>
		<p align="left">&#160; &lt;/tr></p>
		<p align="left">&#160; &lt;tr></p>
		<p align="left">&#160;&#160;&#160; &lt;td align="right"
			width="150" class="Labels">&lt;b>City:&lt;/b>&lt;/td></p>
		<p align="left">&#160;&#160;&#160; &lt;td
			class="Normal">&lt;strong>&lt;input type="text" size="60"
			name="A1_MUN">&lt;/strong>&lt;/td></p>
		<p align="left">&#160; &lt;/tr></p>
		<p align="left">&#160; &lt;tr></p>
		<p align="left">&#160;&#160;&#160; &lt;td align="right"
			width="150" class="Labels">&lt;b>State:&lt;/b>&lt;/td></p>
		<p align="left">&#160;&#160;&#160; &lt;td
			class="Normal">&lt;strong>&lt;input type="text" size="2"
			name="A1_EST">&lt;/strong>&lt;/td></p>
		<p align="left">&#160; &lt;/tr></p>
		<p align="left">&#160;&lt;/table></p>
		<p align="left">&lt;/form></p>
		<p align="left">&lt;/BODY></p>
		<p align="left">&lt;/HTML></p>
	</blockquote>
	<h1 id="id-2.1Formulário-Construindoformuláriospararotinasautomáticas">Building
		forms for automatic routines.</h1>
	<ol>
		<li>Configure the integration for GED between Protheus and ECM in
			the Configurator, in the <em>Environment > Totvs ECM > GED
				Wizard</em> option.
		</li>
		<li>Use the <strong>FWECMPutCard</strong> function to send the
			form to the ECM according to the example below (the card index will
			be created in the <em>ERP_MP \ &lt;empresas> \ MP_CARDS</em> folder
			in ECM):
		</li>
	</ol>
	<h2 id="id-2.1Formulário-Exemplodecódigo-fonte">Example of source
		code.</h2>
	<blockquote>
		<p align="left" style="margin-left: 30.0px;">#include "totvs.ch".</p>
		<p align="left" style="margin-left: 30.0px;">User Function
			FormCliente().</p>
		<p align="left" style="margin-left: 30.0px;">Local cProcessId :=
			"CLIENTE" // if provided, it updates the form related to the process,
			otherwise, creates a new one.</p>
		<p align="left" style="margin-left: 30.0px;">Local cDescription :=
			"Customer file form".</p>
		<p align="left" style="margin-left: 30.0px;">Local
			cCardDescription := "".</p>
		<p align="left" style="margin-left: 30.0px;">Local aHTML :=
			Array(1,2) // form files.</p>
		<p align="left" style="margin-left: 30.0px;">Local aEvents :=
			Array(1,2) // events that will not be customized for the form.</p>
		<p align="left" style="margin-left: 30.0px;">Local nFormId</p>
		<p align="left" style="margin-left: 30.0px;">Local aError</p>
		<p align="left">&#160;</p>
		<p align="left" style="margin-left: 30.0px;">aHTML[1][1] :=
			"cliente.html" // file name</p>
		<p align="left" style="margin-left: 30.0px;">aHTML[1][2] :=
			'&lt;HTML>'+; // file content</p>
		<p align="left" style="margin-left: 30.0px;">'&lt;HEAD>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;
			&lt;TITLE>Example - Customer&lt;/TITLE>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;LINK
			REL=STYLESHEET HREF="/webdesk203/wdk/global.css">'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&lt;/HEAD>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&lt;BODY
			scroll=yes>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&lt;span
			class="NumSecao">'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&lt;strong>&#160;Registration&lt;/strong>&lt;/span>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&lt;HR>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&lt;br>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&lt;form>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&lt;table>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;tr> '+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td align="right" width="150"
			class="Labels">&lt;b>Code:&lt;/b>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td class="Normal">&lt;strong>&lt;input type="text" size="6"
			name="A1_COD">&lt;/strong>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;/tr>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;tr> '+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td align="right" width="150"
			class="Labels">&lt;b>Store:&lt;/b>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td class="Normal">&lt;strong>&lt;input type="text" size="2"
			name="A1_LOJA">&lt;/strong>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;/tr>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;tr> '+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td align="right" width="150"
			class="Labels">&lt;b>Individual/Legal Entity:&lt;/b>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td class="Normal">&lt;strong>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;select name="A1_PESSOA">'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;option value="I">Individual&lt;/option>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;option value="E">Legal Entity&lt;/option>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;/select>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;/strong>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;/tr>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;tr> '+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td align="right" width="150"
			class="Labels">&lt;b>Name:&lt;/b>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td class="Normal">&lt;strong>&lt;input type="text" size="40"
			name="A1_NOME">&lt;/strong>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;/tr>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;tr> '+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td align="right" width="150" class="Labels">&lt;b>Trade
			Name:&lt;/b>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td class="Normal">&lt;strong>&lt;input type="text" size="20"
			name="A1_NREDUZ">&lt;/strong>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;/tr>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;tr> '+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td align="right" width="150"
			class="Labels">&lt;b>Address:&lt;/b>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td class="Normal">&lt;strong>&lt;input type="text" size="40"
			name="A1_END">&lt;/strong>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;/tr>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;tr> '+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td align="right" width="150"
			class="Labels">&lt;b>Type:&lt;/b>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td class="Normal">&lt;strong>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;select name="A1_TIPO">'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;option value="F">Cons. Final&lt;/option>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;option value="L">Rural Producer&lt;/option>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;option value="R">Reseller&lt;/option>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;option value="S">Solidary&lt;/option>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;option value="X">Export&lt;/option>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;/select>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;&#160;&#160;&#160;
			&lt;/strong>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;/tr>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;tr> '+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td align="right" width="150"
			class="Labels">&lt;b>City:&lt;/b>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td class="Normal">&lt;strong>&lt;input type="text" size="60"
			name="A1_MUN">&lt;/strong>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;/tr>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;tr> '+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td align="right" width="150"
			class="Labels">&lt;b>State:&lt;/b>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160;&#160;&#160;
			&lt;td class="Normal">&lt;strong>&lt;input type="text" size="2"
			name="A1_EST">&lt;/strong>&lt;/td>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&#160; &lt;/tr>'+;</p>
		<p align="left" style="margin-left: 30.0px;">' &lt;/table>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&lt;/form>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&lt;/BODY>'+;</p>
		<p align="left" style="margin-left: 30.0px;">'&lt;/HTML>'</p>
		<p align="left">&#160;</p>
		<p align="left" style="margin-left: 30.0px;">aEvents[1][1] :=
			"setEnable" // name of the event</p>
		<p align="left" style="margin-left: 30.0px;">aEvents[1][2] :=
			'function setEnable() {'+; // JavaScript language script</p>
		<p align="left" style="margin-left: 30.0px;">'log.info("Function
			call test");'+;</p>
		<p align="left" style="margin-left: 30.0px;">'}'</p>
		<p align="left">&#160;</p>
		<p align="left" style="margin-left: 30.0px;">
			nFormId := <strong>FWECMPutCard(cProcessId,cDescription,cCardDescription,aHTML,aEvents)</strong>
			// returns the ECM card index code
		</p>
		<p align="left" style="margin-left: 30.0px;">If FWWFIsError()</p>
		<p align="left" style="margin-left: 30.0px;">&#160;&#160; aError
			:= FWWFGetError()</p>
		<p align="left" style="margin-left: 30.0px;">&#160;&#160;
			MsgStop(aError[2])</p>
		<p align="left" style="margin-left: 30.0px;">Else</p>
		<p align="left" style="margin-left: 30.0px;">&#160;&#160;
			MsgInfo("Card index updated successfully")</p>
		<p align="left" style="margin-left: 30.0px;">EndIf</p>
		<p align="left" style="margin-left: 30.0px;">Return</p>
	</blockquote>
	<h1 id="id-2.1Formulário-ConstruindoformuláriospararotinasMVC">Building
		forms for MVC routines.</h1>
	<ol>
		<li>Configure the integration for GED between Protheus and ECM in
			the Configurator, in the Environment > Totvs ECM > GED Wizard option.</li>
		<li>Use the <strong>GetXMLLayout</strong> method of the View to
			generate the HTML.<br />
		<ol>
				<li>Only the Fields and Grid components will be converted into
					HTML.</li>
				<li>Only the forms of the CRUD and Master/Detail type can be
					exported to ECM, since you cannot simulate all the events from the
					other types of Microsiga Protheus forms.</li>
				<li>This method is just a demonstration of how the mechanism is
					in Microsiga Protheus. MVC forms have an automatic way of
					generating a process with form in ECM, in the routine 'Related
					Actions'.</li>
			</ol></li>
	</ol>
	<blockquote>
		<p align="left">#include "totvs.ch".</p>
		<p align="left">User Function FormView()</p>
		<p align="left">Local oView := FWLoadView("MATA030_MVC")</p>
		<p align="left">Local cProcessId := "CLIENTE" // if provided, it
			updates the form related to the process, otherwise, creates a new
			one.</p>
		<p align="left">Local cDescription := "Customer file form".</p>
		<p align="left">Local cCardDescription := "".</p>
		<p align="left">Local aEvents := Array(1,2) // events that will
			not be customized for the form.</p>
		<p align="left">Local nFormId</p>
		<p align="left">Local aError</p>
		<p align="left">Local aFiles</p>
		<p align="left">Local lHtm := .T.</p>
		<p align="left">Local lEmbedded := .F.</p>
		<p align="left">Local lDocType := .T.</p>
		<p align="left">&#160;</p>
		<p align="left">
			<a href="http://oViewsetOperation(3)" class="external-link"
				rel="nofollow">oView:setOperation(3)</a>
		</p>
		<p align="left">&#160;</p>
		<p align="left">
			aFiles := oView:<strong>GetXMLLayOut(lHtm,lEmbedded,lDocType)</strong>
		</p>
		<p align="left">&#160;</p>
		<p align="left">aEvents[1][1] := "setEnable" // name of the event</p>
		<p align="left">aEvents[1][2] := 'function setEnable() {'+; //
			JavaScript language script</p>
		<p align="left">'log.info("Function call test");'+;</p>
		<p align="left">'}'</p>
		<p align="left">&#160;</p>
		<p align="left">nFormId :=
			FWECMPutCard(cProcessId,cDescription,cCardDescription,aFiles,aEvents)
			// returns the card index code in ECM</p>
		<p align="left">If FWWFIsError()</p>
		<p align="left">&#160;&#160; aError := FWWFGetError()</p>
		<p align="left">&#160;&#160; MsgStop(aError[2])</p>
		<p align="left">Else</p>
		<p align="left">&#160;&#160; MsgInfo("Card index updated
			successfully")</p>
		<p align="left">EndIf</p>
		<p align="left">Return</p>
	</blockquote>
	<h2 id="id-2.1Formulário-UsandoMVCnosformuláriosModelo1">Using MVC
		Model 1 forms</h2>
	<p>For automatic routines of the Model 1 (CRUD) type that use only
		Data Dictionary fields, you can use MVC to simplify the form
		customization process, as follows:</p>
	<blockquote>
		<p align="left">#include "totvs.ch".</p>
		<p align="left">User Function FormTable()</p>
		<p align="left">Local cTable := "SA1"</p>
		<p align="left">Local cProcessId := "MATA030"</p>
		<p align="left">Local cDescription := "Customer (automatic
			routine)"</p>
		<p align="left">Local oView</p>
		<p align="left">Local aEvents := Array(1,2) // events that will
			not be customized for the form.</p>
		<p align="left">Local nFormId</p>
		<p align="left">Local aError</p>
		<p align="left">Local aFiles</p>
		<p align="left">Local lHtm := .T.</p>
		<p align="left">Local lEmbedded := .F.</p>
		<p align="left">Local lDocType := .T.</p>
		<p align="left">&#160;</p>
		<p align="left">
			<strong>FwAliasMVC(cTable,cProcessId,cDescription)</strong>
		</p>
		<p align="left">&#160;</p>
		<p align="left">oView := FwLoadView("PROTHEUSMVC")</p>
		<p align="left">
			<a href="http://oViewsetOperation(3)" class="external-link"
				rel="nofollow">oView:setOperation(3)</a>
		</p>
		<p align="left">&#160;</p>
		<p align="left">
			aFiles := <strong>oView:GetXMLLayOut(lHtm,lEmbedded,lDocType)</strong>
		</p>
		<p align="left">aEvents[1][1] := "setEnable" // name of the event</p>
		<p align="left">aEvents[1][2] := 'function setEnable() {'+; //
			JavaScript language script</p>
		<p align="left">'log.info("Function call test");'+;</p>
		<p align="left">'}'</p>
		<p align="left">&#160;</p>
		<p align="left">nFormId :=
			FWECMPutCard(cProcessId,cDescription,cCardDescription,aFiles,aEvents)
			// returns the card index code in ECM</p>
		<p align="left">If FWWFIsError()</p>
		<p align="left">&#160;&#160; aError := FWWFGetError()</p>
		<p align="left">&#160;&#160; MsgStop(aError[2])</p>
		<p align="left">Else</p>
		<p align="left">&#160;&#160; MsgInfo("Card index updated
			successfully")</p>
		<p align="left">EndIf</p>
		<p align="left">Return</p>
	</blockquote>
	<p align="left">&#160;</p>
	<p align="left">&#160;</p>
	<p>&#160;</p>
	<p>
		<br />
		<br />
	</p>
	<p>&#160;</p>
</div>