Reply
 
LinkBack Thread Tools Display Modes
Old 08-24-2009, 11:04 AM   #1 (permalink)
ogharib
Guest
 
Posts: n/a
Unhappy How could I add new contact to a project?

The following code generates an exception: The value for column 'ID' in table 'tblProjectContacts' is DBNull.

What is wrong with my code?

ProjectSearchCriteria criteria = new ProjectSearchCriteria(ProjectSearchKey.CompanyName , "The MacGowans");
SDKProjectList projects = projectFactory.GetData(criteria);
SDKProject selectedProject;

if (projects.Count == 1)
{
selectedProject = projects[0];
SDKContact newContact = new SDKContact();
newContact.Type = "Other";
newContact.Address = new SDKContactAddress();
newContact.Address.Contact = "Tester";
newContact.Address.ContactEmail = "test@yahoo.com";
newContact.Address.CompanyName = "The MacGowans";
selectedProject.Contacts.Add(newContact);
selectedProject.Save();
}

Please, help.
  Reply With Quote
Old 09-24-2009, 09:26 AM   #2 (permalink)
ogharib
Guest
 
Posts: n/a
Thumbs down

So, there is no way. Okay, I will try to find a workaround for that.
  Reply With Quote
Old 09-24-2009, 05:27 PM   #3 (permalink)
Senior Member
 
Join Date: Jul 2008
Location: Olympia, WA
Posts: 342
grichards is a jewel in the roughgrichards is a jewel in the roughgrichards is a jewel in the roughgrichards is a jewel in the rough
Send a message via Skype™ to grichards
Default

Originally Posted by ogharib View Post
The following code generates an exception: The value for column 'ID' in table 'tblProjectContacts' is DBNull.
is this getting thrown because ID is an auto incremented non-null field?
__________________
Systems Technician/Crestron Certified Programmer
www.ccisolutions.com
[SIGPIC][/SIGPIC]
grichards is offline   Reply With Quote
Reply

Tags
add sdkcontact


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
project file management grichards General Section 2 10-22-2009 06:29 PM
Can no longer add items to project MikeD New User Orientation and Getting Started 0 09-04-2008 06:46 PM
SI4 - Add or reduce total project pricing Mark - CHI 'How Do I' Questions 1 06-12-2007 04:00 PM
Anyone creating Service Work Orders? FSUfan 'How Do I' Questions 4 06-21-2006 07:16 PM
D-Tools SI4.6 Release Notes JoseM General Section 1 03-02-2006 10:45 PM


All times are GMT. The time now is 09:14 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.0
D-Tools, Inc.