• Darb
  • NEWBIE
  • 0 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 8
    Replies

I want to create a new case from an opportunity.  I have built the connection between the two using a lookup relationship.  Now I have a button on the case related list to allow users to create a new case directly from the opportunity.  I want to make it as easy as possible by pulling in related information from the opportunity so the user does not have to reenter it. The challenge I now have is that I have multiple accounts with the same name and the user must then select the correct account.  Is there a way to pull the account from the opportunity without having the user look the correct one up from a list?  The button URL is listed below. 

 

 

 

/500/e?&cas4={!Opportunity.Account}&cas8=Medium&CF00N50000002Seac={!Opportunity.Name}&cas11="Opportunity"&RecordType=01250000000DvtV

I have created a custom "New" button for Case so that we can have it on the Opportunity page layout Case related list. If I specify the record type in the URL I can pass in values via URL parameters. But If I try to have the button call recordTypeSelect then I can't seem to get past the record type selection screen. I want to be able to fill in some fields but still allow user to select record type. Can this be done?

I am trying to write a trigger that will update the owner of a record with a value in one of the records fields.  I have never written a trigger before and this is what I have come up with so far.

 

 

trigger changeorderowner on Oracle_Order__c (before insert) { //Change the order owner before saving to the data base //Select the new orders where the current owner is not equal to the Owner as noted in the ERP system List<Oracle_User_Name__c> changeorderowner = [SELECT Oracle_User_Name__c From Oracle_Order__C WHERE Oracle_User_Name__c != Owner FOR UPDATE]; for (Oracle_User_Name__c li: changeower) { if (Oracle_User_Name__c != owner) { owner = Oracle_User_Name__c;} update Oracle_User_Name__c; }

 Any help would be apprecaited