-
ChatterFeed
-
22Best Answers
-
14Likes Received
-
8Likes Given
-
9Questions
-
243Replies
How to find community users to view badges
- Lzap
- March 30, 2016
- Like
- 1
- Continue reading or reply
Migrating Badges
- Richard Bell 3
- March 18, 2016
- Like
- 0
- Continue reading or reply
UpWork Connection
- Alex Rowland
- January 26, 2016
- Like
- 1
- Continue reading or reply
- Nitin Navali
- January 25, 2016
- Like
- 0
- Continue reading or reply
cloak of adventure sweatshirt
- Rajsekhar Mishra
- January 25, 2016
- Like
- 1
- Continue reading or reply
Delete old post in the forum?
I would like to delete some of my old post which contants email address and contact number is still possible to delete here in the forum
thanks
- BENJB
- January 14, 2016
- Like
- 0
- Continue reading or reply
how can do work flow
Status is not started
Priority is high
but not displayed assained user on page layout can u telll me
- sandeep reddy 37
- January 12, 2016
- Like
- 0
- Continue reading or reply
- sandeep reddy 37
- January 12, 2016
- Like
- 0
- Continue reading or reply
How to pass the result of page2 to page1
I have simple question and very useful to me..............
In first page there are One "Next Page" custom buttom and two output text......Once the user clicks on next Page button...it redirects to page2
is that two input text fields ........here the user gives the value in those fields and output should display in the page1(two output text's)
Is it possible???????????
If possible please explain with small sample code
Advance thanks
Siv
- VSK98
- November 11, 2015
- Like
- 0
- Continue reading or reply
capture the comment when reject button clicks in vf page salesforce
I am new to salesforce,
I have done the vf page ....in my page i am displaying the records with checkbox using wrapper class......created the reject button also......
When the user clicks reject button i need to capture the comments and saved to particular record...
Please help me out with your ideas & sample codes
Advance Thanks
Siv
- VSK98
- November 11, 2015
- Like
- 0
- Continue reading or reply
Not able to enroll for a Salesforce Developer Edition Account
Does this mean I already have a Development Edition Account? If so where would I access it?
Or should/can I sign up with any email adress fir a DE?
- Rob Sarno
- October 20, 2015
- Like
- 1
- Continue reading or reply
dynamic field display
Object / API Name Field API Name Type
Opportunity Transaction Type Transaction_Type__c Picklist
Opportunity Partner Reseller__c Lookup(Account)
Opportunity Partner Opportunity Owner Reseller_Contact__c Lookup(Contact)
Opportunity Distributor Distributor_6__c Lookup(Account)
Opportunity Distributor Opportunity Owner Distributor_Contact__c Lookup(Contact)
Opportunity Partner Engagement Partner_Engagement__c Picklist
Opportunity Service Provider Platform Cloud_Platform__c Picklist
Opportunity End User End_User_Contact__c Lookup(Contact)
but few field should hide if i select some value here are the condition
Transaction Type should default to Direct.The following logic will need to be applied to these fields as they appear on the Convert_Lead visual force page.If Transaction Type = Direct or OEM or ERWIN
Make the following fields unavailable for edit (hide if possible) and should be blank.
Partner
Partner Opportunity Owner
Distributor
Distributor Opportunity Owner
Partner Engagement
Service Provider Platform
End User
how do i achieve this
i already have a custom page i am working
<apex:page standardController="Lead" extensions="DE_ConverLead_cls" id="customconvertleadpageid" action="{!CheckIsConverted}">
<script>
var newWin;
window.onload=function()
{
//alert("{!leadrec.Commercial_Account__r.Name}");
var accountName = "{!leadrec.Commercial_Account__r.Name}";
//alert(accountName);
//var accountId = "{!leadrec.Commercial_Account__c}";
//Fill in Account Name
if(document.getElementById("{!$Component.customconvertleadpageid:theForm:hdnAccountName}").value != null)
document.getElementById('targetName').innerHTML = document.getElementById("{!$Component.customconvertleadpageid:theForm:hdnAccountName}").value;
else if(accountName != '')
document.getElementById('targetName').innerHTML = accountName;
else
document.getElementById('targetName').innerHTML = '';
//alert(document.getElementById('targetName').innerHTML);
}
function showhidecomponents()
{
document.getElementById("{!$Component.customconvertleadpageid:theForm:theBlock:pgblkConvertLeadid:pgblkConvertLeadid_4:opprnametextid}").disabled = document.getElementById("{!$Component.customconvertleadpageid:theForm:theBlock:pgblkConvertLeadid:pgblkConvertLeadid_4:chkoptyid}").checked;
if(document.getElementById("{!$Component.customconvertleadpageid:theForm:theBlock:pgblkConvertLeadid:pgblkConvertLeadid_4:chkoptyid}").checked)
document.getElementById("{!$Component.customconvertleadpageid:theForm:theBlock:pgblkConvertLeadid:pgblkConvertLeadid_4:opprnametextid}").value = '';
else
document.getElementById("{!$Component.customconvertleadpageid:theForm:theBlock:pgblkConvertLeadid:pgblkConvertLeadid_4:opprnametextid}").value = "{!opprName}";
}
function openLookupPopup(searchPage,name, id,lid) {
var url="/apex/" + searchPage + "?namefield=" + name + "&idfield=" + id + "&lid=" + lid;// + "&frompage=fromlead";
newWin=window.open(url, 'Popup','height=500,width=1000,left=100,top=100,resizable=no,scrollbars=yes,toolbar=no,status=no');
if (window.focus) {
newWin.focus();
}
return false;
}
function closeLookupPopup()
{
//Added today
if (null!=newWin)
{
newWin.close();
}
}
function validateFields() {
var isOpptycreate = document.getElementById("{!$Component.customconvertleadpageid:theForm:theBlock:pgblkConvertLeadid:pgblkConvertLeadid_4:chkoptyid}").checked;
//alert(document.getElementById("{!$Component.customconvertleadpageid:theForm:theBlock:pgblkConvertLeadid:pgblkConvertLeadid_4:opprnametextid}").value);
if(document.getElementById("{!$Component.theForm.hdnAccountID}").value == '') {
alert('Please Select an Account');
return false;
}
else if(document.getElementById("{!$Component.customconvertleadpageid:theForm:theBlock:pgblkConvertLeadid:pgblkConvertLeadid_4:opprnametextid}").value == '' && !isOpptycreate) {
alert('Please Enter Opportunity Name');
return flase;
}
else {
//doConvert();
doCheckContacts();
}
}
function backfunc() {
switchblocks();
}
</script>
<apex:pageMessages ></apex:pageMessages>
<apex:form id="theForm">
<!--<apex:actionFunction name="doConvert" action="{!ConvertLeadRecord_1}" />-->
<apex:actionFunction name="doCheckContacts" action="{!checkContacts}" />
<apex:pageBlock id="theBlock" mode="edit" rendered="{!isConvertLeadBlock}">
<apex:pageblockButtons >
<apex:commandButton value="Convert" onclick="validateFields(); return false;"/>
<apex:commandButton value="Cancel" action="{!cancelMeth}"/>
</apex:pageblockButtons>
<apex:pageBlockSection columns="1" title="Convert Lead" id="pgblkConvertLeadid">
<apex:pageBlockSectionItem >
<apex:outputLabel value="Record Owner"/>
<apex:inputField value="{!leadrec.ownerid}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Send Email to the Owner" />
<apex:inputcheckbox value="{!IsSendEmailChecked}"/>
</apex:pageBlockSectionItem>
<apex:pageblockSectionItem >
<apex:outputLabel value="Account Name" />
<apex:outputPanel styleClass="requiredInput" layout="block" >
<apex:outputPanel styleClass="requiredBlock" layout="block"/>
<div id="targetName" style="float:left;font-size:12px"></div>
<a href="#" onclick="openLookupPopup('DE_AccSearch_VFP','{!$component.theForm.hdnAccountName}', '{!$component.theForm.hdnAccountID}', '{!leadrec.id}'); return false">
<!--<a href="#" onclick="openLookupPopup('CAEndUserAccountSearch','{!$Component.hdnAccountName}', '{!$Component.hdnAccountID}'); return false">-->
<img title="Account Name Lookup (New Window)" class="lookupIcon" alt="Account Name Lookup (New Window)" src="/s.gif"/>
</a>
</apex:outputPanel>
</apex:pageblockSectionItem>
<apex:pageblockSectionItem id="pgblkConvertLeadid_4">
<apex:outputLabel value="Opportunity Name" id="Opptylabelid"/>
<apex:outputPanel >
<apex:outputPanel styleClass="requiredInput" layout="block" id="optyoutputpanelid">
<apex:outputPanel styleClass="requiredBlock" layout="block" />
<apex:outputpanel >
<apex:inputtext value="{!opprName}" id="opprnametextid"/><br/>
</apex:outputpanel>
</apex:outputPanel>
<apex:outputPanel >
<apex:inputcheckbox value="{!isOpportunityCreate}" id="chkoptyid" onclick="showhidecomponents();"/>
<apex:outputlabel value="Do not create a new opprtunity upon conversion" />
</apex:outputPanel>
</apex:outputPanel>
</apex:pageblockSectionItem>
<apex:pageblockSectionItem >
<apex:outputLabel value="Converted Status"/>
<apex:selectList value="{!selctedConvertedStatus}" size="1" onchange="RTMTypeValues()">
<apex:selectOptions value="{!ConvertedStatusList}"></apex:selectOptions>
</apex:selectList>
</apex:pageblockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockSection columns="2" title="Task Information">
<apex:pageBlockSectionItem >
<apex:outputLabel value="Subject"/>
<apex:inputField value="{!taskrec.Subject}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Due Date"/>
<apex:inputField value="{!taskrec.ActivityDate}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Type"/>
<apex:inputField value="{!taskrec.Type}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Status"/>
<apex:inputField value="{!taskrec.Status}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Priority"/>
<apex:inputField value="{!taskrec.Priority}"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockSection columns="1" title="Task Information">
<apex:pageBlockSectionItem >
<apex:outputLabel value="Comments"/>
<apex:inputField value="{!taskrec.Description}" style="width:420px;height:80px"/>
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputpanel id="commnentsid">
<apex:inputcheckbox value="{!setSendNotificationEmail}"/>
<apex:outputLabel value="Send Notification Email" />
</apex:outputpanel>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockSection columns="2" title="Reminder">
<apex:pageBlockSectionItem >
<apex:outputLabel value="Reminder"/>
<apex:outputPanel id="reminderpanelid">
<apex:outputLabel value=""></apex:outputLabel>
<apex:inputcheckbox value="{!taskrec.IsReminderSet}"/>
<apex:inputField value="{!taskrec.ReminderDateTime}"/>
</apex:outputPanel>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</apex:pageBlock>
<apex:inputHidden id="hdnAccountName" value="{!endUserAccountName}"/>
<apex:inputHidden id="hdnAccountID" value="{!hdnAccountId}"/>
<!--Contact Block-->
<apex:pageBlock title="Convert Lead" rendered="{!isContactBlock}" mode="edit">
<apex:pageBlockSection columns="1" title="Contacts">
<apex:pageBlockSectionItem >
<apex:outputLabel value="Account Name" />
<apex:outputText value="{!endUserAccountName}" />
</apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >
<apex:outputLabel value="Contact Name" />
<apex:outputPanel styleClass="requiredInput" layout="block" >
<apex:outputPanel styleClass="requiredBlock" layout="block" />
<apex:selectList value="{!selectedContact}" size="1">
<apex:selectOptions value="{!contactPickList}"></apex:selectOptions>
</apex:selectList>
</apex:outputPanel>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockButtons >
<apex:commandButton value="Convert" action="{!ConvertLeadRecord_1}" />
<apex:commandButton value="Back" onclick="backfunc"/>
<apex:actionfunction name="switchblocks" action="{!switchBlock}"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
- manish kumar 39
- October 15, 2015
- Like
- 0
- Continue reading or reply
Multi-Currency enabled in developer instance
- NinjaMagician
- October 08, 2015
- Like
- 0
- Continue reading or reply
Real Estate (Manage Your Real Estate Business with Salesforce)
Thanks & Regards
Rangareddy
- udayarangareddy mekala
- July 09, 2015
- Like
- 0
- Continue reading or reply
CPQ OnDemand by FPX (Configure-Price-Quote®) Solutions for Smarter Selling from the Inventor of Configure-Price-Quote®
Thanks & Regards
Ranga Reddy
- udayarangareddy mekala
- July 09, 2015
- Like
- 0
- Continue reading or reply
how to create salesforce developer user group?.
- Bhushan Mahajan 10
- June 03, 2015
- Like
- 0
- Continue reading or reply
- Ravi Kumar 259
- May 15, 2015
- Like
- 0
- Continue reading or reply
Integrating Google API with Salesforce
My client wants to integrate Google Calendar API https://developers.google.com/google-apps/calendar/ with Salesforce/
What can be steps to do so ?
- Simrin
- April 17, 2015
- Like
- 0
- Continue reading or reply
New features on the forums!
- New "Start a Discussion" button to make it easier for you to start a new thread (we still strongly encourage you to search the existing topics before you post though as it's very likely your topic has been addressed before!)
- Infinite scroll starts higher up on the page to provide a smoother experience
- Added a "Continue Reading" link on each discussion card
- Fixed a bug affecting the display of dates on some profile pages
- Fixes to how notifications are sent when you like or reply to posts
Best,
April
- thisisnotapril
- January 22, 2014
- Like
- 4
- Continue reading or reply
Need to Make a Change to Your Team?
We're getting many questions about how to add or drop someone from the team you registered with for the hackathon. Per the rules and regulations, you're allowed one change prior to teams locking on November 19th. If you'd like to make a change please email us at info@developerforce.com with the names of the team members you are adding or dropping. We'll need their names, email addresses, and registration number for Dreamforce - either from a Hacker Pass or a conference registration.
- thisisnotapril
- November 14, 2013
- Like
- 0
- Continue reading or reply
Question: How are 2nd-5th place winners paid out?
Winners will receive American Express gift cards payable in US Dollars.
- thisisnotapril
- October 25, 2013
- Like
- 1
- Continue reading or reply
- thisisnotapril
- October 25, 2013
- Like
- 1
- Continue reading or reply
Join the Salesforce $1 Million Hackathon
Salesforce.com loves developers. And it’s amazing to see how quickly our developer community builds next-generation apps on the Salesforce Platform. So we thought we’d cook up a little surprise. OK, a huge surprise. How about the world’s first hackathon with a single $1 million prize?
It’s on. Come to Dreamforce. Build a next-generation mobile app, and change the world. And win a million bucks. Really. What better way to say thank you to our developers than to put on the biggest on-site hackathon in history. Today, we are thrilled to launch the Salesforce $1 Million Hackathon!
Read the full announcement at: http://blogs.developerforce.com/developer-relations/2013/10/salesforce-one-million-dollar-hackathon.html
Get the full details at: www.dreamforce.com/hackathon
Use this board to form teams, ask questions, and connect with your fellow developers!
- thisisnotapril
- October 25, 2013
- Like
- 3
- Continue reading or reply
Rules of the Jobs Board
We are happy to provide a space for you to list developer and admin openings that may be of interest to the Force.com community. Please ensure your posts are effectively titled with the position and location you're looking for, and don't forget to include instructions for applying or getting in touch with you when you post.
If you are a developer looking for work, you are allowed to post that here, however you are not allowed to post the same information repeatedly (spamming). You also may not use this space for advertising your business.
This board is offered as a service to our community and those found to be abusing it will be banned from posting. Examples of abuse include posting blanket generic responses to job listings & starting new topics that only serve to advertise your business.
I welcome your feedback and suggestions!
- thisisnotapril
- August 13, 2013
- Like
- 3
- Continue reading or reply
Salesforce API Webinar Series
Want to make sure you're all aware of the Salesforce API Series we'll be kicking off on August 7th. These webinars are designed to get you familar with Force.com integration and APIs. Please join us for Episode 1 on August 7! http://events.developerforce.com/en/events/webinars/salesforce_platform-apis?d=70130000000tLu2
- thisisnotapril
- July 26, 2013
- Like
- 0
- Continue reading or reply
Announcing Salesforce Mobile Services
Have you seen the news about the Salesforce Mobile Services and Mobile Developer Week? Check out the new Mobile Packs, and find an event near you for Mobile Developer Week!
- thisisnotapril
- April 09, 2013
- Like
- 0
- Continue reading or reply
New Discussion Board Features - Kudos, Quick Reply, & Search Before Post
I'm excited to announce that we've turned on some great new features for the discussion boards! The biggest new feature is the addition of Kudos. You may have noticed the new blue star that appears on posts right under the user's avatar. The number to the left of the star is how many kudos that post has received. If you want to give a user kudos for their post, just click the star and watch the number rise. The kudos count for an entire thread will show up in the message list so you can at a glance tell which threads are getting a lot of kudos. There's also a leaderboard for Top Kudoed Authors that you'll see on each category board as well as for overall board posts. This leaderboard spans a 30-day time frame so to stay at the top you'll have to be active in the community. Leaderboards are also available for Top Kudoed Posts and Top Kudo Givers. You can give out unlimited kudos, so don't be stingy! Kudos should highlight the quality posts on the boards.
Another new feature is Search Before Post. Now as you go to create a new topic on the boards you'll notice a search drop down appearing as you type in a topic subject. The seach is looking for other topics that have similar words in the subject. This will help you locate any previous post that has already addressed your question, and you can go ahead and skip to the solution.
The final new feature is Quick Reply - which you'll see right below in this post! This will allow you to reply right from the post itself without having to navigate to another screen. Because this is a Quick Reply, you won't have the full WYSIWYG controls or be able to paste code; but it's great for quickly answering or asking a follow-up question.
I want to hear from you what you think of these new features and what else we can do to make the boards work best for you. There's some exciting stuff in the works, including a new ranking system, contests, and other fun stuff. This is your community; I want to hear from you!
Thanks,
April
anassi@salesforce.com
- thisisnotapril
- February 05, 2013
- Like
- 0
- Continue reading or reply
New features on the forums!
- New "Start a Discussion" button to make it easier for you to start a new thread (we still strongly encourage you to search the existing topics before you post though as it's very likely your topic has been addressed before!)
- Infinite scroll starts higher up on the page to provide a smoother experience
- Added a "Continue Reading" link on each discussion card
- Fixed a bug affecting the display of dates on some profile pages
- Fixes to how notifications are sent when you like or reply to posts
Best,
April
- thisisnotapril
- January 22, 2014
- Like
- 4
- Continue reading or reply
Question: How are 2nd-5th place winners paid out?
Winners will receive American Express gift cards payable in US Dollars.
- thisisnotapril
- October 25, 2013
- Like
- 1
- Continue reading or reply
- thisisnotapril
- October 25, 2013
- Like
- 1
- Continue reading or reply
Join the Salesforce $1 Million Hackathon
Salesforce.com loves developers. And it’s amazing to see how quickly our developer community builds next-generation apps on the Salesforce Platform. So we thought we’d cook up a little surprise. OK, a huge surprise. How about the world’s first hackathon with a single $1 million prize?
It’s on. Come to Dreamforce. Build a next-generation mobile app, and change the world. And win a million bucks. Really. What better way to say thank you to our developers than to put on the biggest on-site hackathon in history. Today, we are thrilled to launch the Salesforce $1 Million Hackathon!
Read the full announcement at: http://blogs.developerforce.com/developer-relations/2013/10/salesforce-one-million-dollar-hackathon.html
Get the full details at: www.dreamforce.com/hackathon
Use this board to form teams, ask questions, and connect with your fellow developers!
- thisisnotapril
- October 25, 2013
- Like
- 3
- Continue reading or reply
Rules of the Jobs Board
We are happy to provide a space for you to list developer and admin openings that may be of interest to the Force.com community. Please ensure your posts are effectively titled with the position and location you're looking for, and don't forget to include instructions for applying or getting in touch with you when you post.
If you are a developer looking for work, you are allowed to post that here, however you are not allowed to post the same information repeatedly (spamming). You also may not use this space for advertising your business.
This board is offered as a service to our community and those found to be abusing it will be banned from posting. Examples of abuse include posting blanket generic responses to job listings & starting new topics that only serve to advertise your business.
I welcome your feedback and suggestions!
- thisisnotapril
- August 13, 2013
- Like
- 3
- Continue reading or reply
How to find community users to view badges
- Lzap
- March 30, 2016
- Like
- 1
- Continue reading or reply
- Diane Williamson
- March 18, 2016
- Like
- 0
- Continue reading or reply
Migrating Badges
- Richard Bell 3
- March 18, 2016
- Like
- 0
- Continue reading or reply
missing points
I also have a account Pinky Bhandari 7
# multiple logins in trailhead, #missing points and possibly #missing badges
- Pinky Bhandari 6
- March 18, 2016
- Like
- 0
- Continue reading or reply
- starforce
- March 18, 2016
- Like
- 0
- Continue reading or reply
Facing issue while logging into DE for working on challenge.
Recently i tried to login to my DE to take challenge and i am facing this error.
Please provide solution for this.
Screenshot of the error is attached below.
.
Thank you.
- Prashant Gandhi
- February 10, 2016
- Like
- 1
- Continue reading or reply
Dev org logon
- John Hislop 13
- February 04, 2016
- Like
- 0
- Continue reading or reply
Once Lead is closed no update the record
Once the lead status is closed the lead last modified date should not be updated.
- Steve Holohan
- February 04, 2016
- Like
- 0
- Continue reading or reply
Create a trigger to allow button to create rule
HELP please.
- Heather Farkas
- February 03, 2016
- Like
- 0
- Continue reading or reply
World Tour Chicago
-Nick Willard
- Nick Willard
- February 03, 2016
- Like
- 0
- Continue reading or reply
- eega mahesh reddy
- February 03, 2016
- Like
- 0
- Continue reading or reply
Sweatshirt earned, emails do not acknowledge...
- Angie MCILVAINE
- February 02, 2016
- Like
- 0
- Continue reading or reply
switch one tab to another tab with value on same VF page
- rupesh ranjan
- February 02, 2016
- Like
- 0
- Continue reading or reply
- Narendra Reddy 13
- February 02, 2016
- Like
- 0
- Continue reading or reply
Creating a New Development Org...for Trailhead Issues
I have a inquiry that may, or may not, have been answered here but i'm a little uncertain on how to go about it. I've read on some issues with Trailhead challenges that many recommend spinning up a new Dev Org and taking the challenge in that org to resolve the challenge and "still" get the challenge points on the same username you use in Trailhead.
I'm uncertain of the process of how to go about doing both of those things. Could someone walk me through how this is done, and how to make sure the new dev org sessions apply the challenge points to my exisiting Trailhead login credentials. Thanx in advance.
- Andrew Eversley
- February 02, 2016
- Like
- 0
- Continue reading or reply
Trailhead Challenge - Not getting any acknowledgement for completion
- Rondakr
- January 29, 2016
- Like
- 0
- Continue reading or reply
I still have not received my email. I did all of the badges, filled out the form (several times now).
- Paula Rae Nelson
- January 28, 2016
- Like
- 0
- Continue reading or reply
Cloak of Adventure, no email yet
- Richard Camina 45
- January 28, 2016
- Like
- 1
- Continue reading or reply
- Shiksha Chourasia
- June 24, 2015
- Like
- 0
- Continue reading or reply
Help with Apex - send mail, update event
Here's my code, it works fine like this but I want to add an update to the event survey_sent__c field so that once the email is successfully sent the flag on the event that triggered this action is updated. I want to do this to eliminate the recursive trigger. Also, when the survey is actually completed the event gets updated again and I want to insure another message isn't sent.
public with sharing class SurveyEmail {
//
// this is called from a before update trigger by SurveyEmail.checkEvents(Trigger.new);
//
public void checkEvents(Event[] ev){
List<Id>EventMembers = new List<Id>();
Map<Id,Id> EventMap = new Map<Id, Id>();
If (ev!=null){
For (Event e:ev){
if(e.Send_Survey__c==true && e.Event_Status__c=='Completed' && e.survey_sent__c==false){ // if e.survey_sent__c is true then abort
System.debug('##### Survey box checked, processing Event with ID = ' + e.id);
If(e.WhoId != null){
EventMembers.add(e.WhoId);
EventMap.put(e.whoid, e.id);
e.survey_sent__c = true; // tried this with the update statement at the end and it won't work - also tried creating a 2nd list and updating that, also fails
}
}
}
}
If(EventMembers.size()>0){
string EmailFailure=null;
// generate list of contacts to send message to
System.debug('##### Creating List of Contacts to send message too... ');
List<Contact>myRecipients = [SELECT id, firstname, lastname, email FROM contact WHERE id IN :EventMembers AND (NOT email LIKE '%forbidden%') ];
// create email objects as a list
System.debug('##### Creating list of messages ...');
List<Messaging.SingleEmailMessage> allMsg = new List<Messaging.SingleEmailMessage>();
OrgWideEmailAddress owa = [SELECT id, DisplayName, Address FROM OrgWideEmailAddress WHERE DisplayName='Global Sender' LIMIT 1];
// append new message to above list for each Contact
For (Contact c:myRecipients){
Id EvId = EventMap.get(c.id);
String theMsg = ('Please click the link below, or copy and paste into your browser to complete a brief survey ');
theMsg = theMsg + ('related to your recent interaction with an awesome service representative. \n \n ');
theMsg = theMsg + ('http://www.thethirdparty.com/survey?iv=############&q1=' + EvId + '&q2=' + c.id);
System.debug('##### Creating an instance of the message ...');
try{
Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
mail.setSenderDisplayname(owa.DisplayName);
mail.setReplyTo(owa.Address);
mail.setTargetObjectId(c.id);
mail.setUseSignature(false);
mail.setSubject('Please complete this survey from the company.');
mail.setPlainTextBody(theMsg);
mail.setSaveAsActivity(true);
System.debug('##### Sending message ...');
Messaging.SendEmailResult[] mailResult=Messaging.sendemail(new Messaging.SingleEmailMessage[]{mail});
Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});
if (!mailResult[0].isSuccess() ){
EmailFailure = 'Email Failed: ' + mailResult[0].getErrors()[0].getMessage();
}
}
catch(Exception Exp){
EmailFailure='Exception: ' + Exp.getCause();
}
}
}
}
}
- bouscal
- February 18, 2014
- Like
- 2
- Continue reading or reply
Visualforce Digital Signature --> Recurly + Force.com App integration
In order to do this I am using the Recurly.js files (https://docs.recurly.com/recurlyjs) However, I need a signature to be created - I have tried all of the different ways (Crypto.sign, Apex, doing a canvas app leveraging the prebuilt PHP libraries, etc) but I am wondering if there is an easier way to do this:
Here is the code from the php page that works leveraging the PHP libraries. Does anyone know how to do this in salesforce without having to have a completly different environment host the PHP/Ruby/Python libraries?
<?php
require_once('lib/recurly.php');
// Required for the API
Recurly_Client::$subdomain = 'subdomain';
Recurly_Client::$apiKey = '111111111111111111111111111';
Recurly_js::$privateKey = 'a111111111111111111111111111111';
$planCode = 'innovator-yearly';
$currency = 'USD';
$signature = Recurly_js::sign(array($planCode));
?>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Innovator Yearly Subscription</title>
<html>
<head>
<link rel="stylesheet" href="css/recurly.css" type="text/css" />
<script src="js/jquery.js"></script>
<script src="js/recurly.js"></script>
<script>
$(function(){
Recurly.config({
subdomain: 'subdomain'
, currency: 'USD' // GBP | CAD | EUR, etc...
});
Recurly.buildSubscriptionForm({
target: '#recurly-subscribe',
planCode: 'innovator-yearly',
successURL: 'success.php',
signature: '<?php echo $signature;?>',
distinguishContactFromBillingInfo: false,
collectCompany: false,
collectContact: true,
termsOfServiceURL: 'http://subdomain.com/contact/terms-of-use/',
acceptPaypal: false,
acceptedCards: ['mastercard',
'discover',
'american_express',
'visa'],
});
});
</script>
</head>
<body>
<div id="recurly-subscribe">
</div>
</body>
</html>
</apex:page>
keywords: digital signature, crypto, PHP, Recurly, Subscription service
- Sheri@SupportPay
- February 18, 2014
- Like
- 3
- Continue reading or reply
Help Needed - Error with trigger thrown when trying to convert leads, update and edit accounts
Error: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, GenerateNewOrder: execution of AfterInsert caused by: System.QueryException: List has no rows for assignment to SObject Trigger.GenerateNewOrder: line 6, column 1: [] (System Code)
After contacting Salesforce Support they suggested that there was an issue with a trigger that was causing the error we were receiving since the trigger was referencing a user who no longer existed. However, I miffed as to WHICH trigger it may be since we have dozens set up. Salesforce support has suggested the following which is essentially Greek to me and I am not quite sure where to start:
1. Check the Debug logs and get to the line number of the class where it's throwing that error message.
You will get a query on that line number.
Run that query in the developer console and you should get zero records.
This error occurs when query doesn't return any rows. For e.g.
Account a = [select id, name from Account where name = 'test'];
To avoid this exception, create a list of account
List<Account> lstAccount = [select id, name from Account where name = 'test'];
if (lstAccount.size() > 0)
{
Account a = lstAccount.get(0);
}
2. Alternatively, you now know the exception, so you can use try/catch as well.
Any suggestions? I'm really unsure where to start by even narrowing down which trigger it should be, just short of going through each and every one...
- Adrien Smith
- February 18, 2014
- Like
- 1
- Continue reading or reply
Working with ForceClient in SalesForce.Force.dll
var client = await GetForceClient(httpClient);
var accounts = client.QueryAsync<Account>("SELECT id, name, description FROM Account");
GetContacts(client);
When this posts I see valid access token information in the object. Then problem is that when I try to use the client to get contact information using this code:
private static async Task<object> GetContacts(ForceClient client)
{
try
{
var contacts = await client.QueryAsync<Contact>("SELECT AccountId,AssistantName,AssistantPhone,Birthdate,CreatedById,CreatedDate,Department,Description,Email,EmailBouncedDate,EmailBouncedReason,Fax,FirstName,HomePhone,Id,IsDeleted,IsEmailBounced,Jigsaw,JigsawContactId,Languages__c,LastActivityDate,LastCURequestDate,LastCUUpdateDate,LastModifiedById,LastModifiedDate,LastName,LastReferencedDate,LastViewedDate,LeadSource,Level__c,MailingCity,MailingCountry,MailingLatitude,MailingLongitude,MailingPostalCode,MailingState,MailingStreet,MasterRecordId,MobilePhone,Name,OtherCity,OtherCountry,OtherLatitude,OtherLongitude,OtherPhone,OtherPostalCode,OtherState,OtherStreet,OwnerId,Phone,ReportsToId,Salutation,SystemModstamp,Title FROM Contact");
if (contacts == null)
{
Console.WriteLine("Failed to retrieve contact by query!");
}
Console.WriteLine("Retrieved contacts.");
return contacts;
}
catch (Exception ex)
{
Console.WriteLine(ex);
return null;
}
}
An exception is always thrown-- {"A task was canceled."}
Am I missing something? It seems like I should be able to make multiple calls using the same client-- and since I have to have the _accesstoken to make my calls I would seem like this is the only way I can do this.
Thank you for your help.
Chris Albright
- calbright1.3916321021228982E12
- February 18, 2014
- Like
- 1
- Continue reading or reply
ExactTarget Dreamforce Hackathon Developer Edition
ExactTarget hasn't offered a "developer edition" in the past. We will have this ready in time for Dreamforce so you can implement it.
If you'd like to receive notice when the "developer edition" is ready for you, please visit this URL:
https://code.exacttarget.com/hackathon-dreamforce
You'll need to understand how to use ExactTarget, and we have a Developer Community dedicated to reducing the learning curve:
https://code.exacttarget.com
If you're not already part of our community, please signup to become a member of Code@. Once you're a member, you can register as a developer in App Center.
Take some time and read about the ExactTarget Fuel REST APIs and ExactTarget Fuel SOAP APIs. The REST APIs have live API consoles available so you can see the payloads for most of the APIs and services. Additionally, we have the Fuel SDKs which provide an abstraction layer for the SOAP and REST APIs. If you have questions, you can ask them on the Code@ QA boards.
- bdeanet
- November 05, 2013
- Like
- 1
- Continue reading or reply
What JavaScript client-side frameworks would you like to see in future Mobile Packs?
We now have Mobile Packs for jQuery Mobile, Backbone.js and AngularJS, with (safe harbor!!!) Knockout.js in the pipeline. What other client-side framework(s) are you using? We've heard from fans of Ember.js and Sencha, but we need your help in prioritizing the next set of Mobile Packs.
Let us know here what you're looking for...
- Pat Patterson
- May 02, 2013
- Like
- 2
- Continue reading or reply
I'd like to share Apex code I wrote for Using a Trigger to make a rollup field
Check it out here: http://www.liorgot.com/1/post/2013/03/using-a-trigger-as-rollup-field-for-lookup-relationship.html
trigger TotalChargedCalculator on OpportunityLineItem (after insert, after update, after delete) { Set<Id> customObjIds = new Set<Id>(); // Grab Ids of all the Custom Object records affected by operation for (OpportunityLineItem oli : trigger.new == null ? trigger.old : trigger.new) { if (trigger.isDelete) { if (oli.Custom_Object__c != null) customObjIds.add(oli.Custom_Object__c); } else { if (oli.Custom_Object__c != null) customObjIds.add(oli.Custom_Object__c); if (trigger.isUpdate) { if (trigger.oldMap.get(oli.Id).Custom_Object__c != null && oli.Custom_Object__c == null) { customObjIds.add(trigger.oldMap.get(oli.Id).Custom_Object__c); } } } } if (customObjIds.size() > 0) { Map<Id, Custom_Object__c> customObjsToUpdateMap = new Map<Id, Custom_Object__c>([ Select Id, Total_Charged__c From Custom_Object__c Where Id IN :customObjIds]); // Query for an Aggregate Result List finds the sum of all the Opp line Item's total price per Custom Object AggregateResult[] customObjIdTotalChargedAgg = [ Select SUM(TotalPrice) totalCharged, Custom_Object__c From OpportunityLineItem Where Custom_Object__c = :customObjIds Group By Custom_Object__c]; // Create Map of custom object Id and sum of total price of related Opp Line Items Map<Id, Decimal> customObjIdToTotalChargedMap = new Map<Id, Decimal>(); for (AggregateResult agg : customObjIdTotalChargedAgg) customObjIdToTotalChargedMap.put((Id)agg.get('Custom_Object__c'), (Decimal)agg.get('totalCharged')); // Get new total charge value from customObjIdToTotalChargedMap, if it doesn't exist in the map, it means TotalPrice Sum is 0 for (Id cId : customObjsToUpdateMap.keySet()) customObjsToUpdateMap.get(cId).Total_Charged__c = customObjIdToTotalChargedMap.get(cId) != null ? customObjIdToTotalChargedMap.get(cId) : 0; update customObjsToUpdateMap.values(); } }
- LiorG
- March 14, 2013
- Like
- 1
- Continue reading or reply
order of trigger execution logic on a list of inserts
Hi All,
this may be a silly question but I am going to ask and confirm my understanding of the order in which triggers are executed when a list of records are inserted.
This is my current proposed plan on my code in pseudo:
- A list emal message records are inserted into Salesforce (relating to one case), i.e. more than one email inserted at the same time and updated on case - which I know is rare but it's good practice to bulkify my trigger.
- When the list of email inserted, a BEFORE INSERT trigger and fired whick updates a string COMMON FIELD on the CASE.
- An AFTER INSERT than attempts to call a class method that sends out SingleEmailMessage (that includes this COMMON FIELD in the email message) to the Case Team updating everyone on the new Email Message Record that is inserted.
My question is this:
If the it so happens that we have a list of Email Records inserted at the same time will:
a) the list execute each Email Message Record individually, i.e. run the particuarly Email Message Record until it completes the BEFORE & AFTER INSERT Code meaning my COMMON FIELD that is being updated by every insert is unique to every new Email Message record?
b) Or does the list execute the inserts of the Email Message record list all at the same time such that it fires BEFORE INSERT first on all records, than fire the AFTER INSERT after which will evidentily cause issues where the COMMON FIELD when its being updated?
Thanks for your help!
- Joey Ho
- January 28, 2013
- Like
- 1
- Continue reading or reply