cancel
Showing results for 
Search instead for 
Did you mean: 

How to obtain the default serie for a document

Former Member
0 Kudos

Hi,

Anybody know how can obtain the default serie for a document throw a query??

I can`t see the relation between the ONNM and the NNM1 tables because the 'dfltseries' field of the ONNM not corresponding with the 'Series' field of the NNM1.

For example for an A/P Invoice

Thanks!!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mariano,

According to the SDK Help file, you need to query the NNM2 table

Series Default

Table name: NNM2

ObjectCode UserSign Series DocSubType

So, the query to retrieve the A/P default series for the manager user would be:


SELECT T0.Series FROM [dbo].[nnm2] T0 WHERE T0.ObjectCode='13' AND T0.UserSign = 1

From the SDK you can replace the T0.UserSign = 1 for T0.UserSign = oCompany.UserSignature to retrieve the default series for the current user...

Regards,

Vítor Vieira

Answers (0)