Skip to content

Instantly share code, notes, and snippets.

Avatar
👋

Fernando Fernandes de Sousa Oliveira ffdesousa

👋
View GitHub Profile
View GerarRelatorioForm.class.php
<?php
use Adianti\Control\TWindow;
class GeraRelatorioForm extends TWindow
{
protected $form; // formulário
private $valueField;
private $datagrid; // listing
private $pageNavigation;
@ffdesousa
ffdesousa / gmail_signatures.py
Created Sep 8, 2021 — forked from timrichardson/gmail_signatures.py
Use Python, OAuth2 and Google APIs to mass-update gmail signatures of a Google Apps for Work domain. Using a google service account for the credential.
View gmail_signatures.py
# python 2.7
# *********************************************************************************************************
#
#
#
# Please see https://gist.github.com/timrichardson/e6ee6640a8b7fe664f3a5a80406ca980
#
# for a modern way of doing this, using the current API and python 3
#
@ffdesousa
ffdesousa / fluigGerarArquivo.js
Created Oct 21, 2020 — forked from doug1n/fluigGerarArquivo.js
Gerar arquivo no e salvar em uma pasta.
View fluigGerarArquivo.js
function gerarArquivo(conteudo, pastaDestinoId, nomeDocumento) {
var docDto = docAPI.newDocumentDto();
docDto.setDocumentId(0);
docDto.setDocumentTypeId("");
docDto.setDocumentDescription(nomeDocumento);
docDto.setParentDocumentId(parseInt(pastaDestinoId));
var attachArray = new java.util.ArrayList();
var mainAttach = docAPI.newAttachment();
@ffdesousa
ffdesousa / dsRemoveAnexo.js
Created Aug 11, 2020
Fluig - Dataset para remover anexo de formulário
View dsRemoveAnexo.js
/*
* incluir serviço REST
*/
var init = {
datasetName: 'dsRemoveAnexo',
fluigService: 'FluigRest',
endpoint: '/ecm/api/rest/ecm/workflowView/deleteAttachments',
method: 'post',
primaryKey: [
View SOAP axios call from index.hmtl
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>IKEA Soap</title>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script type="text/javascript">
function soap() {
let sr =
'<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="ikea.cusmgmt.remote.ws">' +
View dsFormulaVisual.js
function createDataset(fields, constraints, sortFields) {
var NOME_SERVICO = "wsFormulaVisual";
var CAMINHO_SERVICO = "com.totvs.WsFormulaVisual";
try {
var servico = ServiceManager.getServiceInstance(NOME_SERVICO);
var serviceHelper = servico.getBean();
var instancia = servico.instantiate(CAMINHO_SERVICO);
var ws = instancia.getRMIwsFormulaVisual();
@ffdesousa
ffdesousa / dsInsert.js
Created May 25, 2020
Exemplo de datasert com insert Fluig
View dsInsert.js
var init = {
datasetName: 'dsInsertConferenciaMateriais',
fluigService: 'TotvsRM',
primaryKey: [
'success'
],
columns: [
'success',
'error'
]
View movDocumentoGed.js
function servicetask37(attempt, message) {
try {
var now = new Date;
var coligada = hAPI.getCardValue('coligada');
var codColigada = hAPI.getCardValue('codColigada');
var referencia = hAPI.getCardValue('referencia');
var dataVencimento = hAPI.getCardValue('dataVencimento');
var fornecedor = hAPI.getCardValue('fornecedorNome');
View Utils.js
/**
* Arquivo com funções utilizadas para facilitar o desenvolvimento.
*/
class Utils {
constructor() { throw "Essa Classe Não Pode Ser Instanciada." }
}
Utils.Gerais = class {
constructor() { throw "Essa Classe Não Pode Ser Instanciada." }
static getValueCampo(campo) {
View fluigUploadRelatorioRM.js
/*
* Agradecimento ao nobre colega Willian ( http://willian.eti.br ) pela grande ajuda.
*
* Cadastrar o serviço WS_ECMDocumentService no fluig
* https://tdn.totvs.com/pages/releaseview.action?pageId=73084007
*
*/
function servicetask43(attempt, message) {
try {