• Eric_Goehring
  • NEWBIE
  • 0 Points
  • Member since 2009

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

I could use some help here. You'll notice in the code below that I have hardcoded int the Contact rt query the Id. I want the query to be run with a dynamic Id. I have tried everything especially =:ContactId or even the long version =:o.ContactId__c. The update that sets o.Registered_Member__c = ContactId is working so I know the variable is being populated. I am new to Eclipse and it won't let me do the above variable queries.

 

The Trigger looks like this:

 

trigger UpdateMember on Opportunity (before insert) { for(Opportunity o:Trigger.new)

{

String ContactId=o.ContactId__c;

String Member=o.Registered_Member__c;

String RegisteredId=o.Registered_UserId__c;

if(ContactId!='' && o.Registered_Member__c==null)

{

o.Registered_Member__c = ContactId;

Contact rt = [select Id, FirstName from Contact where Id='0038000000lqpyL' limit 1];

String FirstName=rt.FirstName;

o.Registered_Member_First__c = FirstName;

}

if(RegisteredId!='' && o.Registering_Contact__c==null)

{

o.Registering_Contact__c = RegisteredId;

}

}

}

 

Thanks.

I am a Strategic Direct Marketing leader that has specialized over the last 5 years in CRM/SFA design, development, and deployment. I have worked with Salesforce.com over the last couple of years including an enterprise rollout as well as 10 different integrations. I personally developed the training materials and trained each of the users. My last project was nationwide and I spent over 90% of the time at different locations.

 

  • Expert in Sales & Marketing Processes, Database Marketing, and Analysis
  • Personally designed MS SQL Server, MySQL, and Oracle integrations with Salesforce. 
  • Accomplished Crystal report writer
  • Proficient either in SQL or SOQL
  • Web Design skills including PHP, ASP, .NET as well as Graphic capabilities
  • Experienced application designer especially with PHP & SOAP integrations into Salesforce

 

I am a certified SFDC administrator trained at the San Francisco offices and I am now looking for consulting opportunities. I am interested in a more virtual consulting role for shorter term projects (6 mos - 1yr) or onsite consultation for longer or local projects.

 

Thank you.

 

Eric

Chandler, AZ.

 

Message Edited by Eric_Goehring on 06-02-2009 02:49 PM

I could use some help here. You'll notice in the code below that I have hardcoded int the Contact rt query the Id. I want the query to be run with a dynamic Id. I have tried everything especially =:ContactId or even the long version =:o.ContactId__c. The update that sets o.Registered_Member__c = ContactId is working so I know the variable is being populated. I am new to Eclipse and it won't let me do the above variable queries.

 

The Trigger looks like this:

 

trigger UpdateMember on Opportunity (before insert) { for(Opportunity o:Trigger.new)

{

String ContactId=o.ContactId__c;

String Member=o.Registered_Member__c;

String RegisteredId=o.Registered_UserId__c;

if(ContactId!='' && o.Registered_Member__c==null)

{

o.Registered_Member__c = ContactId;

Contact rt = [select Id, FirstName from Contact where Id='0038000000lqpyL' limit 1];

String FirstName=rt.FirstName;

o.Registered_Member_First__c = FirstName;

}

if(RegisteredId!='' && o.Registering_Contact__c==null)

{

o.Registering_Contact__c = RegisteredId;

}

}

}

 

Thanks.