Discusiones
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
We’re excited to announce that the 2025 Community Recap is now available! This special recap highlights the amazing contributions and achievements of our members over the year and celebrates the collective success of our community.
Check your personalized recap to see the impact you made in 2025 and how your efforts helped shape our community’s growth and success.
View Your 2025 Community Recap
Thank you to everyone for your passion, collaboration, and support. Here’s to building an even stronger community together in the year ahead!
Definir cuenta de AP determinada para informes de gastos reembolsables creados con servicios Web
Se aplica a
Producto: Netsuite 2024.2
Escenario
Cuando se crean informes de gastos a través de Servicios Web, se establece la cuenta por pagar predeterminada para gastos no reembolsables, pero no para los reembolsables. Una solución alternativa para esto es crear un SuiteScript que establezca el valor del campo de la cuenta de los gastos reembolsables.
Solución
1. Cree un archivo de JavaScript con los siguientes códigos. Esto se utilizará para el script de evento de usuario.
function userEventBeforeSubmit (type){ if(nlapiGetContext().getExecutionContext()=='webservices'){ nlapiLogExecution ('DEBUG', 'entry', 'entry'); var check_if_non_reimbursible = true; var total = nlapiGetLineItemCount('expense'); for (var counter = 1; counter <= total; counter++){ nlapiLogExecution ('DEBUG', 'line', 'line'); if(nlapiGetLineItemValue( 'expense', 'isnonreimbursable', counter)=='F'){ check_if_non_reimbursible = false; break; } } if(!check_if_non_reimbursible){ nlapiSetFieldValue('account', 251);
¡Hola, Bienvenido/a!
Para ver los detalles completos, inicia sesión.
¿No tienes una cuenta? ¡Haz clic aquí para comenzar!