• Timothy Keith
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 6
    Replies
I need to write an apex trigger that takes information from some of Opportunity fields and uses them to generate a value for a custom field.
For example, say I have a custom field called "All Opportunity Members." When I create a new opportunity or any time it is edited, the trigger should fire and (using apex code i would write) and populate the Area Code field with the Opportunity Contact Role Members and the Opportunity team members.

The problem is that the triggers I write don't seem to fire correctly. I just start to learn how to write a little code but I am struggling. How can I make a trigger that fires correctly when a record is created or edited?
 

Hello,

I am creating my first visualforce email. 
 

I am trying to list the Opportuntiy; owner, contact roles, and  opportuntiy team all on email template. I been able to figure out how to add the opportunity contact roles but I can't figure out how to add the Opportuntiy Owner and Opportuntiy team through the email code. 

Please see my visualforce code below. Thanks in Advance! 

<messaging:emailTemplate subject="Testing VF" recipientType="User" relatedToType="Opportunity">
<messaging:plainTextEmailBody >
Hello,
 
This is testing the text section....
Opportunity Name: {!Relatedto.name}
Account: {!Relatedto.account.name}
Amount: {!Relatedto.amount}
 
Contact Roles for this Opportunity:
<apex:repeat value="{!RelatedTo.OpportunityContactRoles}" var="ContactRole">
{!ContactRole.Contact.Name} {!ContactRole.Contact.Email}
</apex:repeat>
<apex:repeat var="team" value="{!relatedTo.opportunityteammembers}">
</apex:repeat>

Thanks!
</messaging:plainTextEmailBody>
</messaging:emailTemplate>

We have been receiving a  Single Sign on Error in Salesforce. 


Error : "Your login attempt using single sign-on with an identity provider cretificate has faild. Please contact your salesforce.com administrator for information" 

When I ran the SAML validator. 
 
On the 11th line, I received the error below. 

11. Validating the Signature
  Is the response signed? false
  Is the assertion signed? true
  The reference in the assertion signature is valid
  Signature or certificate problems
  The signature in the assertion is not valid
  Is the correct certificate supplied in the keyinfo? false

Has anyone ever had this issue? Please help; I don’t know where to begin to troubleshoot. 

Best,
​Tim 
Hello, 

Over the past month my Salesforce org has been having Marketo/Saleforce duplicate lead sync problem. For certian leads at random times an action/trigger is duplicating leads as many as 15 times that getting synced over from Marketo. I was able to monitor the action that was setting off the duplicates (Screen shot below).  Has anyone ever had this problem before? If so, how can I stop this from happening? 

What is really strange ....is Salesforce seems to be reading the leads as web to lead. 


Please see action in the screenshot below:

User-added image
 
Something in Salesforce or Marketo is duplicating leads up to 15 times that are coming over from Marketo from campaigns. 

What really strange is Salesforce is reading the action as web to lead. 

When T monitored the Salesforce lead assignment user, this was the code that was setting it off. 

19.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO
10:15:38.069 (69794607)|ENTERING_MANAGED_PKG|mkto_si
10:15:38.123 (123390090)|CODE_UNIT_STARTED|[EXTERNAL]|Workflow:Lead
10:15:38.135 (135428148)|WF_RULE_EVAL_BEGIN|Assignment
10:15:38.135 (135631751)|WF_SPOOL_ACTION_BEGIN|Assignment
10:15:38.135 (135643315)|WF_ACTION|.
10:15:38.135 (135650009)|WF_RULE_EVAL_END
10:15:38.137 (137798277)|ENTERING_MANAGED_PKG|mkto_si
10:15:38.153 (153394677)|WF_ACTIONS_END| None
10:15:38.153 (153411724)|CODE_UNIT_FINISHED|Workflow:Lead

I am not really sure what going on but has anyone had this problem in the past? 

Thank! 
​Tim 

 

Hello,

I am creating my first visualforce email. 
 

I am trying to list the Opportuntiy; owner, contact roles, and  opportuntiy team all on email template. I been able to figure out how to add the opportunity contact roles but I can't figure out how to add the Opportuntiy Owner and Opportuntiy team through the email code. 

Please see my visualforce code below. Thanks in Advance! 

<messaging:emailTemplate subject="Testing VF" recipientType="User" relatedToType="Opportunity">
<messaging:plainTextEmailBody >
Hello,
 
This is testing the text section....
Opportunity Name: {!Relatedto.name}
Account: {!Relatedto.account.name}
Amount: {!Relatedto.amount}
 
Contact Roles for this Opportunity:
<apex:repeat value="{!RelatedTo.OpportunityContactRoles}" var="ContactRole">
{!ContactRole.Contact.Name} {!ContactRole.Contact.Email}
</apex:repeat>
<apex:repeat var="team" value="{!relatedTo.opportunityteammembers}">
</apex:repeat>

Thanks!
</messaging:plainTextEmailBody>
</messaging:emailTemplate>

I need to write an apex trigger that takes information from some of Opportunity fields and uses them to generate a value for a custom field.
For example, say I have a custom field called "All Opportunity Members." When I create a new opportunity or any time it is edited, the trigger should fire and (using apex code i would write) and populate the Area Code field with the Opportunity Contact Role Members and the Opportunity team members.

The problem is that the triggers I write don't seem to fire correctly. I just start to learn how to write a little code but I am struggling. How can I make a trigger that fires correctly when a record is created or edited?
 

Hello,

I am creating my first visualforce email. 
 

I am trying to list the Opportuntiy; owner, contact roles, and  opportuntiy team all on email template. I been able to figure out how to add the opportunity contact roles but I can't figure out how to add the Opportuntiy Owner and Opportuntiy team through the email code. 

Please see my visualforce code below. Thanks in Advance! 

<messaging:emailTemplate subject="Testing VF" recipientType="User" relatedToType="Opportunity">
<messaging:plainTextEmailBody >
Hello,
 
This is testing the text section....
Opportunity Name: {!Relatedto.name}
Account: {!Relatedto.account.name}
Amount: {!Relatedto.amount}
 
Contact Roles for this Opportunity:
<apex:repeat value="{!RelatedTo.OpportunityContactRoles}" var="ContactRole">
{!ContactRole.Contact.Name} {!ContactRole.Contact.Email}
</apex:repeat>
<apex:repeat var="team" value="{!relatedTo.opportunityteammembers}">
</apex:repeat>

Thanks!
</messaging:plainTextEmailBody>
</messaging:emailTemplate>

Hello, 

Over the past month my Salesforce org has been having Marketo/Saleforce duplicate lead sync problem. For certian leads at random times an action/trigger is duplicating leads as many as 15 times that getting synced over from Marketo. I was able to monitor the action that was setting off the duplicates (Screen shot below).  Has anyone ever had this problem before? If so, how can I stop this from happening? 

What is really strange ....is Salesforce seems to be reading the leads as web to lead. 


Please see action in the screenshot below:

User-added image

I have the following VF page that is called by a button on a Person Account record.

 

 

<apex:page standardController="Account" title="Cancel Account">
    <apex:sectionHeader title="Cancel Account"/>
    <apex:form id="theForm">
        <apex:pageBlock id="theBlock">
            <apex:pageBlockSection id="sectionOne">
                <apex:outputField value="{!Account.Name}" />
                <!-- Bound to Date Field -->                
                <apex:inputField value="{!Account.Account_Cancel_Eff_Date__c}" />
                <!-- Bound to Picklist -->
                <apex:inputField value="{!Account.Account_Cancel_Reason__c}" />
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>

 

When the page is called for a person account, Salesforce returns:

 

Validation Errors While Saving Record(s)

There were custom validation error(s) encountered while saving the affected record(s). The first validation error encountered was "Record Type ID: value not valid for the entity: Account". 

When the page is called for a normal Account, it renders as expected. If I remove the inputField that is bound to the picklist, then call the page for a person account, everything works as expected. What's going on here?

 

  • February 09, 2011
  • Like
  • 0