@mattdahse thanks, i can now get the transaction id. you said earlier my library function isn't being called. i tried calling it like this but it doesn't like it - undefined eror: var invoice_no = library.nsfSetSequenceNo(company_id, doc_no); how do we call library function?