Discussões

New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Please note that on Saturday, April 11, 2026, at 8:00 PM Pacific time, our Case Management System will undergo a scheduled maintenance for approximately 30 minutes. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.

Criar Depósito do cliente ao Salvar o Pedido de vendas usando o Script de ação do fluxo de trabalho

editado Jun 2, 2025 2:37PM Dentro SuiteCloud / Personalização

Aplica-se a

Produto:  NetSuite 2022.1

 



Cenário

O usuário deseja criar um Depósito do cliente depois que o Pedido de vendas for enviado.



Solução

Crie um script de ação de fluxo de trabalho e implemente-o no registro de Pedido de vendas. 

 

  1. Crie um arquivo JavaScript com o seguinte código:
     
    
     
    /** * @NApiVersion 2.x * @NScriptType workflowactionscript */ define([ 'N/record' ], function(record) { /** * Definition of the Suitelet script trigger point. * * @param {Object} scriptContext * @param {Record} scriptContext.newRecord - New record * @param {Record} scriptContext.oldRecord - Old record * @Since 2016.1 */ function onAction(scriptContext) { var soRec = scriptContext.newRecord; var soId = soRec.id; //gets the internal of the newly creates sales order record var entity = soRec.getValue({ fieldId : 'entity' // gets the value of the customer field }) var total = soRec.getValue({ fieldId : 'total' // gets the value of the total field
    }) var cDepositObjRecord =

Olá, bem-vind@!

Faça login

Para ver todos os detalhes, faça o login.

Cadastre-se

Não tem uma conta? Clique aqui para começar!

Ranking

Gênio da Comunidade

2º Trimestre (Apr-Jun 2026)

Líderes desta semana

Líderes deste mês

Líderes de todos os tempos