• Shreyas Shah 9
  • NEWBIE
  • 5 Points
  • Member since 2015


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies
What is the salesforce php api which allows me to add an email message into the salesforce customer email activity? A sample script would be great if you can point me in the right direction please?
I have a very simple query that ls looking querying Accounts to find one particular Account, then assign that Account's ID to the Account field on my Contact record.  I continue to get the "System.QueryException: List has no rows for assignment to SObject" error, but when I run the query using Query Editor, it returns the appropriate record.  Can anyone please tell me what I'm doing wrong?
 
trigger assignAccounttoContact on Contact (before insert, before update) {
    
    Account a = [
        SELECT ID, Name 
        FROM Account 
        WHERE Name = 'TestAccount'
    ];
    
    for(Contact c: Trigger.new){
        
        c.AccountID = a.ID;
    }
    
}

 
hi,
my trigger and the problem is as such:
User-added image
Not understanding the error; 'Body' is a standard field on FeedItem, according to this : 
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_feeditem.htm
So what's the problem ? 
thanks!
Matt
I have a User Record and ManagerId field in It.Given a particular User ID i want to get all users under the given user ID at all levels.
Is this possible in apex.This is not related to Role hierarchy.
Hi,

When I changed the Account on a closed opportunity, the close date was reset and I lost value in some other fields like contract start date etc.
What precaution to be taken before updating the account on an oppty? 

Hi,

 

I have a custom object named 'Process_Unit__c' :

1) The user clicks on the Process unit tab.

2) Then clicks on the 'New' button and goes to record type selection and selects the record type.

3)  then he goes and creates a new record, when the new record shows up i want to populate a default value named "Please do not type here" in a mandatory field called 'process unit name' and make it read only is this possible?

 

I did try it but i am not able to override the new button of the object it self any idea of how this  can be done or should i use a apex class and trigger to populate this default value in the field in the edit mode:

 

I did this URL over ride, but i am able to put this button in the page layout and this is visible in saved mode only, i am not able to override the 'New' button with button i created:

 

https://cs1.salesforce.com/a3A/e?RecordType={!Process_Unit__c.RecordType}&retURL=%2F{!Process_Unit__c.Id}

 

Help ias higly appreciated.