I'm subscribing to onbeforeprintrecords event and it is running fine for all the companies except 1. And on this one company only while posting a purchase invoice I get error but while posting purchase order I do not get the same error. Could this be related to any setup?