I would be grateful for any hints/tips/insight here.
Point is, I am trying to keep ContactID (for companies) and CustomerIDs in-sync.
The two tables by default seem to be using each their own number series:
- CN for Customers and RMCON for Contacts
I would very much like to create Customers only through the Contacts/CreateCustomer method and pass the ContactID as the primary key ID for the newly to be created Customer. However, I can not find access to the CreateCustomer(ChooseCustomerTemplate) method that is called by default.
The next best thing I was able to achieve is that whenever a new Contact has been created that the automatically proposed next number for a Customer (CN number series) is replaced with the new ContactID (i.e. ContactID-1). However, this caused one problem: If someone creates a Contact and only later creates the corresponding Customer, someone else in the meantime may have added Contacts and everything is out-of-sync again.
So, my main question is: Where can I edit that method ‘CreateCustomer’ which seems to be a standard method of NAV. I would like to edit it so that It does not draw the CustomerID from the number series CN but simply tries the ID of the Contact.
Thanks all for sharing your knowledge to a newbe, it is greatly appreciated!