• MLee
  • 0 Points
  • Member since 2007

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 1
Can somebody please assist with the following query?
I have a custom object called "Meeting_Notes__c" that has an opportunity lookup on the page (not required). I would like to place a detail button that uses the JavaScript Onlick event at the top of the Meeting_Notes__c page.
If an opportunity has been entered I need to open the opprotunity edit page and update the opportunities "Next Step" and "Current Status" fields with data from the active meeting note record.
If there is not an opportunity I would like to alert the user that there is not a related opportunity and return to the active meeting note record.
This is what i have so far.
//establish connection to SF
var connection = sforce.connection;

//Query meeting note and retrieve related Opportunity ID
var meetingnoteId = "{!Meeting_Notes__c.Id}";
var qr = connection.query("Select Meeting_Notes__c.OpportunityId__c From Meeting_Notes__c
Where Meeting_Notes__c = '" + meetingnoteId + "'");
//Declare Opportunity variable
var meetingnoteOpp ="{!Meeting_Notes__c.OpportunityId__c}";
//If an opportunity is populated edit opportunity else alert user that there is not an opportunity
if (meetingnoteOpp != 'NULL')
       alert("This is a test")
Thank you in advance - MLee
  • October 30, 2007
  • Like
  • 0
Hi All,
In our Contracts object, we have a Master Agreement recordtype and other recordtypes for the associated service schedules.  The service schedules link back to the Master by way of a Lookup field.  I'm trying to create an s-control (url) that will let my users create a service schedule from the Master record.  The s-control will create a new record but it won't pass the Master's contract id to the associated lookup field in the service schedules.  Would anybody be able to suggest how to correct the following?  Based on my reading of the html source, CF00N60000001IQhp is the lookup field id.