Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Cannot insert the value NULL into column 'Print_Phone_NumberGB', table 'TWO.dbo.SOP10200'; column does not allow nulls

(0) ShareShare
ReportReport
Posted on by 1,035

I'm getting this exception error when creating a sales invoice using eConnect, but I'm including the following in my code:

salesLine.Print_Phone_NumberGB = 0;

So I'm indeed specifying this value, any thoughts? Thanks in advance.

*This post is locked for comments

  • Community Member Profile Picture
    on at
    RE: Cannot insert the value NULL into column 'Print_Phone_NumberGB', table 'TWO.dbo.SOP10200'; column does not allow nulls

    I had a client who was getting this error for just one customer. Turned out that someone had deleted one of the customer's addresses and that address was still set as the preferred delivery address in GP. (GP 2013 SP2)

  • Community Member Profile Picture
    on at
    RE: Cannot insert the value NULL into column 'Print_Phone_NumberGB', table 'TWO.dbo.SOP10200'; column does not allow nulls

    Did you included this line also ?

    salesline.Print_Phone_NumberGBSpecified = True

     

    Please follow this case also:

    https://community.dynamics.com/gp/f/32/p/114473/234789.aspx#234789

     

     

    Thank you

    Sanjay

  • Rafael Diaz Profile Picture
    1,035 on at
    RE: Cannot insert the value NULL into column 'Print_Phone_NumberGB', table 'TWO.dbo.SOP10200'; column does not allow nulls

    If I don't include it I get the above error

  • Community Member Profile Picture
    on at
    RE: Cannot insert the value NULL into column 'Print_Phone_NumberGB', table 'TWO.dbo.SOP10200'; column does not allow nulls

    eConnect - SOP - Invoice Example

    www.sanjaykumar.us/.../e-connect-sop-invoice-example

    Cheers!

    Sanjay

  • Community Member Profile Picture
    on at
    RE: Cannot insert the value NULL into column 'Print_Phone_NumberGB', table 'TWO.dbo.SOP10200'; column does not allow nulls

    Why do you want to set that value any way it is defaulted by e Connect any ways.

    I was able to send the transaction successfully - to US Fabricam company.  Shall blog post the full code.

    Cheers!

    Sanjay

  • Rafael Diaz Profile Picture
    1,035 on at
    RE: Cannot insert the value NULL into column 'Print_Phone_NumberGB', table 'TWO.dbo.SOP10200'; column does not allow nulls

    I'm logging in into the Fabrikam test company (US Company)

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Cannot insert the value NULL into column 'Print_Phone_NumberGB', table 'TWO.dbo.SOP10200'; column does not allow nulls

    I can locate this field at programmers reference guide.

    4064.Capture.JPG

    How ever the e Connect objects list them as not member of any of these class.

    Having said that, the class also requires to set the Print_Phone_NumberGBSpecified  to true if the Print_Phone_NumberGB is populated.  Are you setting the value to true ?  It is possible that if it is not set, even though you are sending the phone number it is getting ignored.  You will need add one more line to your code

    salesline.Print_Phone_NumberGBSpecified = True

    Cheers!
    Sanjay

    PS : Is your GP a British instance ?

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Almas Mahfooz Profile Picture

Almas Mahfooz 3 User Group Leader

Featured topics

Product updates

Dynamics 365 release plans