How to create a

Hi,

I'm using Sage X3 and I would like, from a specific auto part, to create an accounting document 
using the code. How can I do? If this is not possible, how can I create an accounting document from
a specific object?