web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

SOP30300 LNITMSEQ - unique id for invoice line items

(0) ShareShare
ReportReport
Posted on by 150

I am creating an integration of GP invoices to Dynamics CRM invoices.  I have exported data from the SOP30300 table for the invoice line items and I would like to have a uniqiue id in my staging table.  Can I combine SOPNUMBE and LNITMSEQ to create a unique id.  I have read that I should never consider using DEX_ROW_ID as a unique id as it can change during a GP Upgrade.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Richard Wheeler Profile Picture
    75,852 Moderator on at

    The primary key for SOP30300 is

    SOPTYPE

    SOPNUMBE

    LNITMSEQ

    CMPNTSEQ

    If all your documents are invoices set SOPTYPE to 3 and CMPNTSEQ to 0 if yo have no components of bills of materials. DEX_ROW_ID can be used under certain circumstances but this is not one of them.

  • MG-16101311-0 Profile Picture
    26,225 on at

    Since you are creating a staging table, you can create a column of data type UNIQUEIDENTIFIER to store a GUID for each line inserted in it, i.e.:

    CREATE TABLE SOP_LINE_STAGE (
      ItemNumber VARCHAR(50),
      ComponentSequence INT,
      SOPNumber VARCHAR(30),
      LineItemSequence INT,
      QuantityInvoiced NUMERIC(19,5),
      UnitPrice NUMERIC(19,5),
      ExtendedPrice NUMERIC(19,5),
      UniqueId UNIQUEIDENTIFIER DEFAULT NEWID()
    );


    You don't need to engineer some complicated key to keep track of a unique line value.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans