• moeoo
  • NEWBIE
  • 0 Points
  • Member since 2007

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 4
    Replies
Hi All
 
Is there any way I can login to salesforce not by username/password and sessionID/serverURL?
 
Can I use organization ID or User ID to login to salesforce account?
 
Moe
  • October 05, 2007
  • Like
  • 0
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

  • September 24, 2007
  • Like
  • 0
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
  • August 29, 2007
  • Like
  • 0
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
  • August 14, 2007
  • Like
  • 0
Hi
 
I'm trying to populate the custom object fields to template.
 
I can populate the contact fields to template before I send email.
 
This is the code I used for Contact but how can I get field values from Custom object.
 
var accountid = "{!Account.Id}";
queryResponse  =  sforce.connection.query("select id, Email from contact where AccountID = '" + accountid + "'");
records = queryResponse.getArray("records");
var contactID = records[0].Id;
var contactEmail = records[0].Email;
//alert(contactID);
var massRequest= new sforce.MassEmailMessage();
var ids = new Array();

 ids[0] = contactID;
massRequest.targetObjectIds = ids;
//alert(massRequest.targetObjectIds);
massRequest.subject = "test";
massRequest.replyTo = user;
massRequest.templateId = templatedId ;
try
{
var sendMailRes = sforce.connection.sendEmail([massRequest]);
alert('Email sent to user id: ' + contactEmail);
}
catch(err) {
alert(err)
}
 
I can get the Id of my Custom object but it didn't populate the values. Can I use custom objects here?
  • August 08, 2007
  • Like
  • 0
Hi

I have Account object which has many Products.

Products has three Record Types: Prod1, Prod2 and Prod3.

I'm trying to build a s-control and I want to get the data from one of the Record Types.

I know the Account ID but how can I get the details from record type?

Do I need to have a query statement for this? If so, can you provide me the example or syntax?

Thanks
  • August 03, 2007
  • Like
  • 0
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

 

  • August 01, 2007
  • Like
  • 0
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

  • September 24, 2007
  • Like
  • 0
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
  • August 29, 2007
  • Like
  • 0
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
  • August 14, 2007
  • Like
  • 0
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

 

  • August 01, 2007
  • Like
  • 0