Mariano has a new look at Retrieving document numbers assigned by Microsoft Dynamics GP when field rule is set to Use Default in Integration Manager.
IM – Retrieving document numbers assigned by Microsoft Dynamics GP when field rule is set to Use Default in Integration Manager – Part 1
Archived post from 2011. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.