• thisisnotapril
  • SMARTIE
  • 1344 Points
  • Member since 2012
  • Lead Operations Manager, UX
  • Salesforce


  • Chatter
    Feed
  • 22
    Best Answers
  • 14
    Likes Received
  • 8
    Likes Given
  • 9
    Questions
  • 243
    Replies
My users have completed their profiles, I typed their name in the search bar but nothing comes back. The only way I can figure out to see someones profile is by clicking their photo on a discussion board. I need to see my users progress with trailhead training. Thanks!
  • March 30, 2016
  • Like
  • 1
I have two accounts, one is linked to an ET email address and the other to my Salesforce email. I am driven to the Salesforce one when I navigate from Aloha. Can I migrate my badges and progress from the ET address to the Salesforce address? 
Anyone else having trouble connecting to the UpWork group for Salesforce.com? I've tried everything and can't get past the screen to start a dev. org. and submit my application. *sigh*
how to change from lightning exp... to normal one?
@jacob lehrbaum Hi , i have completed my trailhead with 5 badges. i have yet not received the mail for shipping details. could you please check and let me know. Thanks
 
Hello,

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
  • January 14, 2016
  • Like
  • 0
i have two work flow rules one is  field update anothr one is task
Status is not started
Priority is high 
but not displayed assained user on page layout  can u telll me
tell me about logn access polices 
Hi,

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


 
  • November 11, 2015
  • Like
  • 0
Hi All,

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 
  • November 11, 2015
  • Like
  • 0
I am currently taking the course Admin Trail Begginer: Getting Started With the Platform, when I proceed to sign up for a DE account I get the following message: "Sorry, we can't enroll you in a Salesforce Developer Edition account because the email address you entered is already in use. To sign up with a different email address, go to https://developer.salesforce.com/form/signup/freetrial.jsp ."

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? 
I have a senario where these 8 field needs to be display on custom vf page 
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>  &nbsp; 
                        <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>

 
Is it possible to enable multi-currency in a developer org? I know this requires sending a case, but since this is not an option within the developer instances I didn't know if there was another way to accomplish this. 
can u explain briefly about above application.
 
Thanks & Regards
Rangareddy
i want to create salesforce develoer user group.
Hello,

My client wants to integrate Google Calendar API https://developers.google.com/google-apps/calendar/ with Salesforce/

What can be steps to do so ?
  • April 17, 2015
  • Like
  • 0
Hi all! We've launched some new features here on the forums today - thanks to you all for your feedback on the new site! Here's today's update:
  • 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
Our development team is actively working on site enhancements, so please keep the feedback coming!! Let us know what you think of the site and what you'd like to see.

Best,
April

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.

Winners will receive American Express gift cards payable in US Dollars.

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!

 

 

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!

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

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!

 

www.developerforce.com/mobile

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

Hi all! We've launched some new features here on the forums today - thanks to you all for your feedback on the new site! Here's today's update:
  • 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
Our development team is actively working on site enhancements, so please keep the feedback coming!! Let us know what you think of the site and what you'd like to see.

Best,
April

Winners will receive American Express gift cards payable in US Dollars.

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!

 

 

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!

My users have completed their profiles, I typed their name in the search bar but nothing comes back. The only way I can figure out to see someones profile is by clicking their photo on a discussion board. I need to see my users progress with trailhead training. Thanks!
  • March 30, 2016
  • Like
  • 1
I have two accounts, one is linked to an ET email address and the other to my Salesforce email. I am driven to the Salesforce one when I navigate from Aloha. Can I migrate my badges and progress from the ET address to the Salesforce address? 
Not sure why but it seems I have two logins in Trailhead, can someone tell me how I can merge them as one login account. I am a new hire and trying to complete some trails as part of the new hire process, however it seems the points and badges I completed are being logged in two accounts.
 I also have a account Pinky Bhandari 7

# multiple logins in trailhead, #missing points and possibly #missing badges
Is their an audio version of trailhead ?
Best Sibylle
Hi,
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.
.User-added image

Thank you.
I am not able to sign into my dev org for trailhead Salesforce Basics work. When I tried to reset the password the message conveyed that it was not possible under SSO. Can someone direct me to how I can get back in to my dev org? Thanks.
Can someone help me in writing the code for the following logic.

Once the lead status is closed the lead last modified date should not be updated.
Hi, I am trying to create a trigger to allow a button when click to create a rule. We need to be able to have a message state a comp is required after clicking the submit button if a comp has not been entered.
HELP please.
Does anyone know of anymore information than what day the Event is going to be.  It's hard to justify to my company that I want to go, if I can't tell them what's on the agenda.  Thanks in advance.

-Nick  Willard
when is the next t-shirt challenge?
I accepted the challenge working on trailhead for badges, actually did 5 badges Friday morning before accepting challenge and 5 more Friday after accepting challenge.  Around 15 minutes after completing first 5 Friday, received email stating I just needed 4 more...On Saturday, I received email stating I just need 5 badges to complete challenge...I had signed into Trailhead before completing badges so I am unsure how the completion did not register correctly.  Can someone review and see that I did DOUBLE the challenge with no confirmation email to date.  Thanks.
how we will switch one tab to another tab with value on same VF page
Hello Community, 

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.
I signed up for the challenge and got my Compass of Wisdom after completing the first badge. I then completed and received 5 badges - but no email even after a day to indicate I'd completed the challenge and would get the Cloak of Adventure. So, I accepted the challenge again and since completed an additional 5 badges, just in case the first 5 weren't associated. Still no email. I'm getting emails from my developer instance, so I know the email address is right. Can someone help me resolve this? I want my Cloak! :)
Please see why I did not receive an email for the Cloak of Adventure?  I have the Badge of Wisdom, received the email after getting that, filled out the form, earned 5 more badges..  still no email.  Please help me?

 
I still haven't receive the email :-( Can someone please verify? I got 6 badges already
I'm flustered, can't understand why this won't work...  help please.

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();
                }
            }
        }
    }
}
I'm trying to integrate Recurly subscription management with an application I am running on force.com. I'd like to host the payment and billing pages with VisualForce but use Recurly servers to process the transactions.

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
We recently started experiencing an error with converting leads and editing accounts, which I suspect was caused by inactivating a user who is no longer with our company (since this is the only change we have made in the period before this problem started last week). When a user (any user, even an admin) attempts to convert a lead or make an edit they receive:

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...
I am using the new Salesforce packages for .Net.  I have sucessfully authenticated with my Salesforce credentials using the following code...

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

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.

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...

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();
 
			 	}
 	 }

 

  • March 14, 2013
  • Like
  • 1

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!