• bhagavanmca04@yahoo.com
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies

Hi am new SFDC. i have Furniture__C custom object with Name,Type__C fields. So I need to insert,delete n update through code upto 100 records. i have exception in Update method. FATAL_ERROR|System.QueryException: List has more than 1 row for assignment to SObject. Furniture__c fr = [Select Name From Furniture__c Where Name = 'Das']; fr.Name = 'ram'; Update fr; any modifications or possibility to Update records. I need Update method code.

I hope we are aware of the relationship among the standard Objects Account , Contact and Opportunity.
An Account is the master object of Contacts and Opportunity. So an Account may have or may not have Contact and/or Opportunity.
See, Go to any Account  record, then scroll down to related lists like Contacts and Opportunities. If there is any Contact or Opportunity  for that Account, now if you click on delete button of that Account it should not get deleted.
If there is no Contact or Opportunity for that then it should have to get deleted if you click the delete button.
So Will you Anyone to write a trigger on Account that should have to work as above.