Discussões
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
Criar Depósito do cliente ao Salvar o Pedido de vendas usando o Script de ação do fluxo de trabalho
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.
- 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 =
0
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!