Dynamics GP Stored proc to get the next item note index

Reading through a native Dynamics GP stored procedure today and found this piece of code designed to get the next note number. I thought I'd blog it so I didn't lose it.
EXEC @iStatus = dynamics..Tasmgetnextnoteindex
  @I_sCompanyID = @CMPANYID,
  @I_iSQLSessionID = 0,
  @I_noteincrement = 1,
  @O_mNoteIndex = @NOTEINDX output,
  @O_iErrorState = @iGetNextNoteIdxErrState output
 
SELECT @iError = @@error
 
IF @iStatus = 0
   AND @iError <> 0
  BEGIN
      SELECT @iStatus = @iError
  END

RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences