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.
SuiteScript > Definir valor Valor inicial na Tabela de faturamento com Taxa do item selecionada
Aplica-se a
Produto: NetSuite 2020.2
Cenário
O usuário cria o Pedido de vendas usando a Tabela de faturamento. No entanto, quando eles Faturam o Pedido de vendas, ela deve cobrar ao Cliente a Tarifa do item no Pedido de vendas, em vez do valor inicial na Tabela de faturamento.
Solução
O cenário acima pode ser obtido atualizando o valor do campo Valor Inicial na Tabela de faturamento selecionada com a Taxa do item via SuiteScript. Veja abaixo o exemplo de script:
SuiteScript 1.0:
function afterSubmit() {
// getting rate of the item
var rate = nlapiGetLineItemValue('item', 'rate', 1);
// Get the value of the billing schedule
var bill = nlapiGetLineItemValue('item', 'billingschedule', 1);
// load billing schedule
var rec = nlapiLoadRecord('billingschedule', bill);
// Set initial amount value with the item rate
rec.setFieldValue('initialamount', rate);
nlapiSubmitRecord(rec);
}
Rotulado:
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!