• Aaron2010
  • NEWBIE
  • 25 Points
  • Member since 2010

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

Hello All,

 

Is there any way to create a popup messages on home page when the users first login to salesforce? 

 

The popup message should appear only when the users login for the first time in a day and one of the user should have ability to customize the messages every day. These messages should appear only to a particular group of users.

 

Any help on this is greatly appreciated.

 

Thanks in Advance.

 

 

 

Is there a way to control a record's visibility to a user based on the Opportunity Stage? For my organization, I want to have Opportunities that are Closed Won visible to all, but if they are still in the potential stages (prospecting, etc), only the Opportunity Owner and their superiors should be able to view that. Happy to code whatever I need to make this happen, but would love some pointers on whether it is even possible and if so, strategy to achieve that.

 

Thanks!

System.DmlException: Update failed. First exception on row 0 with id a1H80000000LzOyEAK; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: []

 

Can anyone of you help me resolving this issue. Everyday i receive 15 emails about this error from ApexApplication [info@salesforce.com]. 

 

Thanks in advance.

I am using data loader to upload 900K records. During this process it stops for every 50k - 100k records. Then i have to look back into success file, start the data loader again from a particular row.. It took me almost 8 hours to load all the data. Does any one know why data loader stops during this process? Is there any work around for this?

 

Any kind of help would be greatly appreciated!

 

Thanks

Can we upload a file from visualforce sites into salesforce? Can anyone tell me the procedure / provide the sample code.

 

Thanks.

Does anyone have an Idea on the best method for migrating data from netsuite into salesforce. I am fimiliar with Salesforce but I have never worked with a Netsuite demo account. What tools would you recommend when transferring data from netsuite to salesforce? This would include all activities, notes, and attachments associated with defualt objects such as accounts, contacts, leads, and opportunites? Is infomatica the best solution for data migration?  Any useful information would be helpful. Thanks

Hello everyone,

                             In the following piece of code I am unable to fetch the rows if the groupName consists of left open paranthesis '('  and right open paranthesis ')'.

 

for Eg: if groupName = Assisted Health program (AHP) Japan

 If i remove (AHP) then it is working fine. like if i have my groupname as 'Assisted Health Program'. I am able to fetch the rows.

 

So, how to fetch the rows even if it consists of paranthesis in the groupName?

 

 

 

this.groupName = ApexPages.currentPage().getParameters().get('group');
if (groupName != null) {
evs = [Select Time_Zone_Offset__c, Start_Time__c, Start_Date__c, Name, Id, End_Time__c From Offmax_cal__c where Business__c like :(groupName + '%')];

I am trying to write a select statement like this:

 

[select ID, sum(field1) sum1, sum(field2) sum2, (sum1/sum2) from Account Group by ID]

 

Is it possible to embed a calculation like (sum1/sum2) in a select statement when I'm using aggregate functions?  Or can someone recommend how you could so this in an SOQL statement?  Thanks.

Hello All,

                 We have a registration system where the user receives Registration email upon registration.  Here we used Visualforce email Template. Is it possible, if the registrant do not want to receive email after the registration and he wants email to be sent only to CC address.

 

Here is code that is used to send emails.. I m posting only the part of code that is used for emails...

 

Here before calling sendEventConfirmation i am changing the email of the contact to cc emailaddress and after email is sent i am resetting back to old email.  But still the email is reaching both To and CC addresses...

 

 

 private void sendConfirmation() {
                   
         if (this.contact.IsPersonAccount || this.registrantIsDoctor) {
             this.oldemail = this.email;
             this.account.PersonEmail =  this.reg.CC_Email__c;
             this.contactId = RegistrantPersister.persistAccount(this.account);
         } else{
                 this.oldemail = this.email; 
                 this.contact.Email = this.email;
                 this.contactId = RegistrantPersister.persistContact(this.contact);
         }
        RegistrationEmailSender.sendEventConfirmation(this.eventId, this.reg.Id, this.contactId, this.reg.CC_Email__c, this.event.Planner_Email__c, testingEmail);
        
         if (this.contact.IsPersonAccount || this.registrantIsDoctor) {
                 this.account.PersonEmail =  this.oldemail;
                 this.contactId = RegistrantPersister.persistAccount(this.account);
         } else{
                 this.contact.Email = this.oldemail;
                 this.contactId = RegistrantPersister.persistContact(this.contact);
         }
     
        
        }
}

 

 

 

 

 

 webservice static Boolean sendEventConfirmation(Id eventId, Id registrantId, Id contactId, String ccEmailAddress, String plannerEmailAddress, Boolean testing) {
        Boolean emailSent = false;
        // Have to query to get the Id of the template and From address
        EmailTemplate et = [select Id from EmailTemplate where DeveloperName = 'Event_Registration_Confirmed' limit 1];
        OrgWideEmailAddress oe = [Select Id From OrgWideEmailAddress where DisplayName = 'Events' and Address = 'gem.meetings@events.com' limit 1];
        
        // Load attachments
        Integer totalAttachmentSize = 0;
        Attachment[] atts = [select id, name, body, bodylength from attachment where parentid = :eventId and name not in ('header', 'footer')];
        List<Messaging.EmailFileAttachment> fileAttachments = new List<Messaging.EmailFileAttachment>();
        
        for(Attachment a : atts) {
            totalAttachmentSize += a.bodylength;
            Messaging.EmailFileAttachment fileAttachment = new Messaging.EmailFileAttachment();
            fileAttachment.setFileName(a.name);
            fileAttachment.setBody(a.body);
            fileAttachments.add(fileAttachment);
        }
        
        string email1 = [select id,email from contact where id = :contactId][0].email;
        system.debug('this is email id that is changed------------------>>>>>>>'+email1);
                
        // Build mail sending object
        Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
        
        // Sender
        //mail.setSenderDisplayName('Events');           
        //mail.setReplyTo(plannerEmailAddress);
        mail.setOrgWideEmailAddressId(oe.id);
        
        // Recipient(s) and Content
        mail.setTargetObjectId(contactId);
        mail.setWhatId(registrantId);
        mail.setTemplateId(et.id);
              
        if (ccEmailAddress != null && ccEmailAddress != '') {
            List<String> ccAddresses = new List<String>();
            ccAddresses.add(ccEmailAddress);
            mail.setCcAddresses(ccAddresses);
        }
             
        if (fileAttachments.size() > 0 && totalAttachmentSize < 10485760) {
            mail.setFileAttachments(fileAttachments);
        }
        
        // Other misc options 
        mail.setBccSender(false);
        mail.setUseSignature(false);
        mail.setSaveAsActivity(false);
        
         
        if (!testing) {
            List<Messaging.SendEmailResult> results = Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
            if (results.get(0).isSuccess())
                emailSent = true;
        }
            
        return emailSent;
    }
}

 So is there any other way to stop emails to "TO" address and send only to cc address.

 

Any help would be appreciated.

 

Thanks

 

Hello all,

                I am a newbie to apex development. Can any one help me in bulkifying this trigger.

 

  trigger PopulateRegistrantGroup on Event_Registrant_zem__c (before insert, before update) {      

        String s;

        Id id1;

         for (Event_Registrant_zem__c e :Trigger.new)

          {
                 id1 = e.registrant_type__c;
                s = [select id,name from Registrant_Type_zem__c where id = :id1].name;
        
         if(e.Registrant_type_group__c == NULL)
          {
            e.Registrant_type_group__c = [select epz.Id from Event_permission_zem__c epz where epz.zimmer_event__c = :e.zimmer_event__c and epz.type__c = 'Event Capacity' and epz.Registrant_Types__c INCLUDES (:s)][0].id;
          }
       }

}

 

Any help is appriciated. Thanks in advance.

Hi,

 

Does anybody know how to install data loader on UNIX.

 

Thanks