• moeoo
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 4
    Replies
Hi All
 
I've created the custom field with create method. Then I want to update the field value with empty string but it didn't update the value. Following is the example code;
 
//Create customer

Customer__c objCustomer = new Customer__c();

objCustomer.Account__c = "1234"; //String data type

SaveResult[] sr = binding.create(new sObject[] { objCustomer });

 

//Update customer

objCustomer.Account__c = "";

objCustomer.Id = _SalesforceID;

SaveResult[] sr = binding.update(new sObject[] { objCustomer });

I want the Account__c value to be empty string but it is not updated. If I put some value (e.g "1122"), it is updated.

Do I need to set any other value if I want to pass empty string?

Thanks in advance

Moe

Hi All
 
I'm trying to create datetime field by C# .Net code.
 
I'm in Australia and time zone is in (GMT+10:00) Eastern Standard Time (New South Wales). The datetime is created on salesforce in different format (Probably US format).
 
For example, my datetime in the database is 29/08/07 but when it is inserted on salesforce, it's being changed to 30/08/07.
 
I found the getServerTimestamp() method but I'm not sure this is the right way to do it and if so, how can I get the datetime inserted right?
 
Thanks in advance
 
Moe
Hi
 
I have a custom pick list field and I want to select all the availble values by query satement.
 
Does anyone have an idea how the query string will look like?
 
I have AccountStatus field and values are Active, Inactive, etc.
 
Thanks
I'm trying to create a contact object and I want to attach the existing account object.
 
The code I've written is
 

private Account m_Account = null; //Salesforce account (build-in Account object)

Contact objContact = new Contact();

objContact.FirstName = m_FirstName;

objContact.LastName = m_LastName;

objContact.Phone = m_Phone;

objContact.Account = m_Account;

After I assign the contact.Account, I'm getting following error and contact object is not created.

More than 1 field provided in an external foreign key reference in entity: Account

I hope I'm doing the right thing here. If not, is there any way I can create a Contact object using existing Account Object.

Thanks in advance