• Bethann Gonzalez
  • NEWBIE
  • 0 Points
  • Member since 2012

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

The upgrade process for Salesforce Opportunity Splits didn’t complete, so your organization rolled back to its previous state.

 

Why I am not abqle to upgrad the Salesforce Opportunity Split? Please help!

Is there a way to create a duplicate warninig for a custom object?

I created a new partner portal. When the partner user creates a new lead and clicks 'save' they recieve the folloing error:

 

Error: Invalid Data. 
Review all error messages below to correct your data.
Apex trigger UpdateReferrals caused an unexpected exception, contact your administrator: UpdateReferrals: execution of AfterInsert caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.UpdateReferrals: line 33, column 1

 

This is only occuring with this new partner portal.  I logged in into an old partner portal user and they are able to create and save leads with this error occuring. 

 

See Apex Trigger. 

trigger UpdateReferrals on Lead (after insert) {

  Set<Id> createdByIds = new Set<Id>();
  List<Id> referralIds = new List<Id>();
  
  for (Lead l : trigger.new){
    createdByIds.add(l.CreatedById);
  }
  
  // Return all users that created Leads in this trigger
  Map<Id, User> creator = new Map<Id, User>([Select Contact.Divisions__c, UserType FROM User WHERE Id IN :CreatedByIds]);
  
  // Find all of the PowerPartner users who created a Lead in this trigger
  for (Lead l : trigger.new){
    if (creator.get(l.CreatedById).UserType == 'PowerPartner'){
      referralIds.add (l.Id);
    }
  }      
  
  // Get all of the Leads owned by PowerPartner users discovered above
  List<Lead> referrals = new List<Lead>([SELECT CreatedById, Name, Company, ReplyTo__c FROM Lead WHERE ID in :referralIds]);
  
  // Loop through all of those Leads
  for (Lead l : referrals){
    
    // Set the Partner Sales Rep to the creator of the Lead
    l.Partner_Sales_Rep__c = l.CreatedById;
    
    // Get the divisions of the Partner Sales Rep (From its contact record)
    l.Divisions__c = creator.get(l.CreatedById).Contact.Divisions__c;
    
    // Set the singular division on the Lead if the Partner only has one division
    if (creator.get(l.CreatedById).Contact.Divisions__c.indexOf(';', 0) == -1){
      l.Division__c = creator.get(l.CreatedById).contact.Divisions__c;
    }

  }
/*
  for (Lead p : referrals){
    Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
    mail.setTargetObjectId(p.CreatedById);
    mail.setReplyTo(p.ReplyTo__c);
    mail.setSenderDisplayName(p.ReplyTo__c);
    mail.setSaveAsActivity(false);
    mail.setBccSender(false);
    mail.setUseSignature(false);
    mail.setSubject('Thank you for the referral!');
    mail.setHtmlBody('<p>We will review the referral:</p>'+
    '<p>Contact Name: ' + p.Name + '</br>' +
    '<p>Company Name: ' + p.Company + '</p>' +
    '<p>We will follow-up with you shortly.</p>' +
    '<p>'+ p.ReplyTo__c + '</p>');
    Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });        
  }
*/
  update referrals;

}

 

I would like to attach a document to an Calendar event. In order to do, I am assuming I have to create a new button.  What should I select for th content source? "Onclick javascript" or "visual page". Which is easier to accomplish? In addition I am not sure what the javascript would be in order to generate this button. Please help. 

Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger AssetHistory caused an unexpected exception, contact your administrator: AssetHistory: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.AssetHistory: line 113, column 1

 

 

When updatiing the account information on the asset, I recieve the error listed above. Why is this happening? How do I resolve it. 

I'm very new to Apex - or any code for that matter, and I am recieving the following error for two chat buttons that I have created:

 

line 1, column 8: line 1:8 no viable alternative at character '"'

 

Not sure how to fix the error?  Please help!

 

See the code for the two buttons below:

 

<img id="liveagent_button_online_57380000000PAsI" style="display: none; border: 0px none; cursor: pointer" onclick="liveagent.startChat('57380000000PAsI')" src="https://pacificpowersource.secure.force.com/LiveChat/resource/1355859547000/Online_Sales_Button" /><img id="liveagent_button_offline_57380000000PAsI" style="display: none; border: 0px none; " src="https://pacificpowersource.secure.force.com/LiveChat/resource/1355859708000/Offline_Sales_Button" />
<script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline('57380000000PAsI', document.getElementById('liveagent_button_online_57380000000PAsI'));
liveagent.showWhenOffline('57380000000PAsI', document.getElementById('liveagent_button_offline_57380000000PAsI'));
});</script>

 

 

 

<img id="liveagent_button_online_57380000000PAsN" style="display: none; border: 0px none; cursor: pointer" onclick="liveagent.startChat('57380000000PAsN')" src="https://pacificpowersource.secure.force.com/LiveChat/resource/1355860454000/Home_Page_Button" /><img id="liveagent_button_offline_57380000000PAsN" style="display: none; border: 0px none; " src="https://pacificpowersource.secure.force.com/LiveChat/resource/1355871562000/Offline_Home_Button" />
<script type="text/javascript">
if (!window._laq) { window._laq = []; }
window._laq.push(function(){liveagent.showWhenOnline('57380000000PAsN', document.getElementById('liveagent_button_online_57380000000PAsN'));
liveagent.showWhenOffline('57380000000PAsN', document.getElementById('liveagent_button_offline_57380000000PAsN'));
});</script>

 

Thank You!

I'm very new to Apex - or any code for that matter, therefore I tested the code for the follow Live Chat Deployment and recieved the following error: 

 

line 1, column 0: required (...)+ loop did not match anything at input '<

 

I am not sure how to correct this error? This is what I have for the Live Chat Deployment Code:

 

 

<script type='text/javascript' src='https://c.la1s1.salesforceliveagent.com/content/g/deployment.js'></script>
<script type='text/javascript'>
liveagent.init('https://d.la1s1.salesforceliveagent.com/chat', '57280000000PAsN', '00D80000000aNYY');
</script>

I am currently integrating Live Agent in Salesforce. I have created Post-Chat page, however I need to integrated an "Exit Survey" in the Post-Chat page. I do not have strong knowledge in HTML and Javascript and not sure what the code should look like to create the "Exiti Survey". Here is the information that I would like to display:

 

Exit Survey:

Content that will be displayed before and after the survey is submitted:

Thank you for your interest in our products and services. 

Body Text:

Please complete a  quick suvey to rate our online customer service chat. 

Headline Tex (displayed after submission)

Body Test (displayed after submission)

Pacific Power online chat is available 8 am -4:30pm PST-Monday to Friday. 

Field 1:

How would you rate yoiur overall experience?

Select Field:

Exemplary

Satisfactory 

Disaapointing 

Field 2 

Please include any comments:

Text Field Here

Survey window closing after 1 minute 

 

Here is the the Visual Markup that I have for the Post Chat Page:

 

<apex:page showHeader="false">
<h1>Post Chat Page</h1>
<!-- These variables are passed to the post-chat page and can be used to customize your
post-chat experience -->
Request Time: <apex:outputText value="{!$CurrentPage.parameters.requestTime}" /><br/>
Start Time: <apex:outputText value="{!$CurrentPage.parameters.startTime}" /><br/>
Button Id: <apex:outputText value="{!$CurrentPage.parameters.buttonId}" /><br/>
Deployment Id: <apex:outputText value="{!$CurrentPage.parameters.deploymentId}" /><br/>
Last Visited Page: <apex:outputText value="{!$CurrentPage.parameters.lastVisitedPage}"
/><br/>
Original Referer: <apex:outputText value="{!$CurrentPage.parameters.originalReferrer}"
/><br/>
Latitude: <apex:outputText value="{!$CurrentPage.parameters.latitude}" /><br/>
Longitude: <apex:outputText value="{!$CurrentPage.parameters.longitude}" /><br/>
City: <apex:outputText value="{!$CurrentPage.parameters.city}" /><br/>
Region: <apex:outputText value="{!$CurrentPage.parameters.region}" /><br/>
Country: <apex:outputText value="{!$CurrentPage.parameters.country}" /><br/>
Organization: <apex:outputText value="{!$CurrentPage.parameters.organization}" /><br/>
Transcript: <apex:outputText value="{!$CurrentPage.parameters.transcript}" /><br/>
Disconnected By: <apex:outputText value="{!$CurrentPage.parameters.disconnectedBy}"
/><br/>
Error: <apex:outputText value="{!$CurrentPage.parameters.error}" />
<!-- Implement your post-chat message, form, or survey here -->
</apex:page>

 

 

I appreciate any help I can get!

 

Thank you!

 

I have a critical update-generate correctly escaped markup. However I am not sure if my organization contain pages or components that depend on this incorrect processing.  How would I know which pages to be fixed? I am not aware of any issues? Should I activate this update?

Prior to the Winter ’13 release, text in some Visualforce pages and components might have been generated incorrectly. This markup could contain fragments that should have been escaped (for example, the "<" character generated as "&lt;") but were not. These fragments might be interpreted by the browser as markup rather than as text in the page. This problem has been corrected for all pages with API version 26.0 or later.
Your organization might contain pages or components that depend on this incorrect processing. These pages need to be fixed. To fix them, you will generally need to use <apex:outputText> with the attribute escape="false" to cause the text to be generated unescaped, as it was previously.
If your page contains either:
·         <apex:outputText value="{!something}"/>, or
·         A free-standing expression {!something}
And you’re expecting the string returned by the controller for {!something} to be treated as markup, rather than displayed in the page, then this page needs to be changed.
·         For the first case, you need simply set the escape attribute to false, <apex:outputText value="{!something}" escape="false"/>.
·         For the second case, you need to modify the expression to be output using <apex:outputText> as with the first case:
<apex:outputText value="{!something}" escape="false"/>
When you have fixed any affected pages, you should activate this Critical Update.

The upgrade process for Salesforce Opportunity Splits didn’t complete, so your organization rolled back to its previous state.

 

Why I am not abqle to upgrad the Salesforce Opportunity Split? Please help!

Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger AssetHistory caused an unexpected exception, contact your administrator: AssetHistory: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: Trigger.AssetHistory: line 113, column 1

 

 

When updatiing the account information on the asset, I recieve the error listed above. Why is this happening? How do I resolve it.