You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Let's assume this example is deployed to sales orders
export function beforeSubmit(ctx: EntryPoints.UserEvent.beforeSubmitContext) {
if (ctx.type == ctx.UserEventType.CREATE) {
const customerId = ctx.newRecord.getValue('entity') as string;
log.debug('beforeSubmit', `Submitting new transaction for entity: ${customerId}`); // When creating a transaction from an entity, log the entity internal id