Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

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

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
    Community Member Microsoft Employee 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
    Community Member Microsoft Employee 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
    Rafael Diaz 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
    Community Member Microsoft Employee 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
    Community Member Microsoft Employee 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
    Rafael Diaz 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
    Community Member Microsoft Employee 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans