• yespee
  • NEWBIE
  • 60 Points
  • Member since 2008

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 21
    Questions
  • 34
    Replies

Hi all,

 

I have created an Approval Process on Case object and i have select Approver option manully.

 

I have one trigger that trigger the Approval process but i am unable to findout any Option or Method for assigning Approver for Approval process.

 

Please let me know if any one has any idea?

  

 

-- Deepak 

Hi folks, 

 

 

We have a custom object which is a child to Account object with a master detail relation.

 

A visualforce page with Accounts standard contoller is extended to list all child records associated with each account.

 

A new button on above VF page opens standard create child record page. We have below code

 

<apex:outputLink value="{!URLFOR($Action.btr_stores__c.New)}

 

 The problem with above code Account Name is not being populated.

 

Is there a way to populated Account Name when user click  a new link from VF page?

 

    

  • September 13, 2012
  • Like
  • 0

wondering if anyone came across a requiment like this. we need to call a Salesforce web service from within a html form embedded in email (accessed via browser) body. Has anyone tried this before. Appreciate any kind help. 

We have an after update and insert, trigger on Opportunities which fetches a valude from an account field and updates back on opportunity. It works perfectly fine when any opportunity recorde is created or updated from UI. However the trigger is not getting fired when an opportunity record is updated using excel connector.

Can some one please throw some light on this. Thanks. 

  • April 12, 2009
  • Like
  • 0

Is it possible to mimic 'Submit Lead' button on a visual force page? Not sure if this question was asked before. Searched the forums could not find anythign. 

 

To give a background, I created a visual force wizard that creates new leads. We also have a lead approval process on leads object. I wanted the users to be able to either save the lead or submit it for approval in the final screen of the wizard. I am kind of stuck with the submit part.Appreciate any help on this. 

 

 

  • March 10, 2009
  • Like
  • 0

Is there a way to generate Salesforce data model using the open source tool Open ModelSphere?

Any other ways to generate a Salesforce data model?

 

I tried exporting XML from Eclipse and import it into above tool. But is throws an error XML format not supported. 

  • February 25, 2009
  • Like
  • 0

Is there a way to avoid creation of contact by overriding lead convert functionality?

We want only an opportunity to be created upon conversion.

Thanks.

Message Edited by yespee on 01-26-2009 11:14 PM
  • January 27, 2009
  • Like
  • 0
I am trying to override convert button on lead. One of the main reasons is to automatically associated the opportunity to an account which is already associated with lead instead of manually selecting an account during conversion. We also need to set a pre-determined opportunity owner from lead details, instead of the defaulting to lead owner. Can some one please guide me with some suggestions on where to start.  Thanks to all.

  • December 30, 2009
  • Like
  • 0
Hi All,
I need to override default New lead creation using a wizard created using visual force. However I came to know from Salesforce support I cannot override 'New' button of leads using a custom controller. So I am planning to use an S-control to over ride New button which in turn calls a Visual force page. However I am not sure if this can be done. I would appreciate any kinds inputs. Thanks.
  • November 22, 2008
  • Like
  • 0
Wondering if there any simple way to create pop-up windows for alerts. e.g. Wanted to show a pop-up window when there is a validation error.
Is this possible at all?

Thanks.
  • November 12, 2008
  • Like
  • 0
Can we auto submit a lead form? When a new lead is created and saved I want that to be auto submitted for approval.

Thanks

  • November 06, 2008
  • Like
  • 0
Account Name (from Accounts) is a look-up field on Opportunity. We wanted to update another opportunity field with a value from Account selected in the first field. I know this can be done using a trigger. Trying to simplify this update process and wanted to know if this can be achieved using a field update. Would appreciate any help on this.
  • October 24, 2008
  • Like
  • 0
I am not sure if answer to my question below is pretty simple and not getting in to my head...

Salesforce allows to use only one communication template for all steps in an approval process. Is there a way to use different templates for different stages.  Basically we wanted to send an email alert to user with whom action is pending next in case of rejection or approval in current level. Right now same email is sent for all events. Please let me know of there is any issue with out setup.

Thanks in anticipation,

  • October 07, 2008
  • Like
  • 0
New to Apex and I wrote an apex class for email to case based on some sample code. Everything works fine but does not work when there  is an attachment in the mail. Here is my code. I believe I am making some small mistake with this. Can some one guide me through please. 

Code:
global class CreateSupportCase implements Messaging.InboundEmailHandler {
 
  global Messaging.InboundEmailResult handleInboundEmail(Messaging.inboundEmail email, 
                                                       Messaging.InboundEnvelope env){
 
  // Create an inboundEmailResult object for returning the result of the Apex Email Service
    Messaging.InboundEmailResult result = new Messaging.InboundEmailResult();
 

  String myPlainText= '';
  
  // Add the email plain text into the local variable 
 
  myPlainText = email.plainTextBody;
 
  // New Case object to be created
  
  Case[] newCase = new Case[0];
 
  // Try to lookup any contacts based on the email from address
  // If there is more than 1 contact with the same email address,
  // an exception will be thrown and the catch statement will be called.
  try {
  Contact vCon = [Select Id, Name, Email
    From Contact
    Where Email = :email.fromAddress
    Limit 1];
  
  // Add a new Case to the contact record we just found above.
  newCase.add(new Case(Description =  myPlainText,
       Priority = 'Normal',
       Status = 'New',
       Subject = email.subject,
       Origin = 'Email',
       SuppliedEmail =  email.fromAddress,
       contact= vCon));
 
 // for email attachments
 
 if (email.binaryAttachments!=null && email.binaryAttachments.size() > 0) {
             for (integer i = 0 ; i < email.binaryAttachments.size() ; i++) {
 
 System.debug('Binary Attachments - filename: ' + email.binaryAttachments[i].filename);
 System.debug('Binary Attachments - size: ' +   email.binaryAttachments[i].mimeTypeSubType);
            
             Attachment a = new Attachment(ParentId = newCase[0].Id,
                                           Name = email.binaryAttachments[i].filename,
                                           Body = email.binaryAttachments[i].body);
             insert a;
             }
    }
 
 
 
 // Insert a new Case 
 insert newCase;
  
 
 System.debug('New Case Object: ' + newCase );
 
  }
  // If an exception occurs when the query accesses 
  // the contact record, a QueryException is called.
  // The exception is written to the Apex debug log.

 catch (QueryException e) {
  System.debug('Query Issue: ' + e);
 }
 
 // Set the result to true. No need to send an email back to the user 
 // with an error message
 
    result.success = true;
 
 // Return the result for the Apex Email Service
    return result;
 
  }
 }

 
Thanks in advance
  • September 26, 2008
  • Like
  • 0
I need to save some data captured on a visual force page on Lead object. Looking for page reference syntax.
Above visual force page is called using a custom link on lead.
Thanks
  • September 22, 2008
  • Like
  • 0
What is the easiest way to replicate a developer org and make it  look exactly like a client's org?
I am not looking for data here, just the configuration.


  • September 19, 2008
  • Like
  • 0
We wanted some custom fields to look different, so I used html in label to change color. It worked but help text is gone now. How to get back help text. Is there a better way to change color?
  • September 16, 2008
  • Like
  • 0
Can someone please help me with syntax for using IN clause in a trigger. I could not find any examples.  Kindly let me know if this is not possible at all. 
 
eg.
if (color <contains / IN> ('BL', 'RE', 'YE') 
medal_color = 'classA';
} else if (......;
  • September 16, 2008
  • Like
  • 0
I am writing my first apex trigger and need your help please.

Trying to set a flag on lead record by checking if Lead.SP_Model_Number__c belongs to certain family by looking into the product2 table. 

Picked up an example from cookbook and started working on it. But there is no direct relation ship between Lead and the Product2 table except SP_Model_Number__c is  a look-up field on Lead looking up Product2.Model_Number__c.

Kind of stuck and am unable to go anywhere from here. Would appreciate any kind of help. Please find my code below

Code:
trigger validateProductFamily on Lead (before update, before insert){

 Set<String> Names = new Set<String>();

        
    for (Lead lead : Trigger.new) 
 Names.add(lead.SP_Model_Number__c);   

         Map<String, Lead> stmodel = new Map<String, Lead>(
   [SELECT SP_Model_Number__c FROM Lead WHERE SP_Model_Number__c in :Names]);

        
     for (Lead lead : Trigger.new)
    lead.textest__c = stmodel.get(lead.SP_Model_Number__c).product2.Product_Family;    
}

 






Message Edited by yespee on 09-13-2008 10:12 AM
  • September 13, 2008
  • Like
  • 0
Hello All,

I need to to write an apex trigger (my first) that looks up family name in product table based on model number selected on a lead and update a status back on lead object. Can someone help me where to start. Would appreciate sample code or any thing like that.

Thanks
sp

  • September 11, 2008
  • Like
  • 0
Generally for any Salesforce object, last visited view (standard or custom) gets defaulted when user logs in next time. Is there a way to force a default view at user or profile level? Also how to make this default view refresh without having to hit the Go button.

  • September 09, 2008
  • Like
  • 0
Need to disable some fields after a button si being clicked so that field cannot be edited further.
How can we do it .
I am migrating reports from one Org to another. When migrating some reports I am having trouble. This reports contains the following markup.

<params>
        <name>scopeid</name>
        <value>701800000011GlK</value>
    </params>
  <params>
        <name>co</name>
        <value>1</value>
  </params>

Please clarify what this exactly means.

We wanted to restict activity related list on a custom object to certain profiles. One way to do this is by page layout assignment. Just wondering what are the other ways. Tried permission sets but looks like related lists cannot be added to  permission set definition. What are other ways. Can some one throw some light on best practices. Thanks. 

Hi folks, 

 

 

We have a custom object which is a child to Account object with a master detail relation.

 

A visualforce page with Accounts standard contoller is extended to list all child records associated with each account.

 

A new button on above VF page opens standard create child record page. We have below code

 

<apex:outputLink value="{!URLFOR($Action.btr_stores__c.New)}

 

 The problem with above code Account Name is not being populated.

 

Is there a way to populated Account Name when user click  a new link from VF page?

 

    

  • September 13, 2012
  • Like
  • 0

Hi,

 

When a user goes to add a new contact they see the error below.  Any ideas why?

 

Unable to Access Page Invalid parameter value "null" for parameter "id".

Error: The value of the parameter specified above contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and re-submit. If the error still persists, please report it to our Customer Support team and provide the URL of the page you were requesting as well as any other related information.

  • May 09, 2011
  • Like
  • 0

Hi,

Just curious to find out if there is any limit on number of custom objects per org and number of custom fields on a standard or custom object?

 

Does it depend on license level? If yes, how much is for each license level?

 

Thanks

Raj

We have an after update and insert, trigger on Opportunities which fetches a valude from an account field and updates back on opportunity. It works perfectly fine when any opportunity recorde is created or updated from UI. However the trigger is not getting fired when an opportunity record is updated using excel connector.

Can some one please throw some light on this. Thanks. 

  • April 12, 2009
  • Like
  • 0

Hi all,

 

I have created an Approval Process on Case object and i have select Approver option manully.

 

I have one trigger that trigger the Approval process but i am unable to findout any Option or Method for assigning Approver for Approval process.

 

Please let me know if any one has any idea?

  

 

-- Deepak 

Is it possible to mimic 'Submit Lead' button on a visual force page? Not sure if this question was asked before. Searched the forums could not find anythign. 

 

To give a background, I created a visual force wizard that creates new leads. We also have a lead approval process on leads object. I wanted the users to be able to either save the lead or submit it for approval in the final screen of the wizard. I am kind of stuck with the submit part.Appreciate any help on this. 

 

 

  • March 10, 2009
  • Like
  • 0
I'm trying to see if I can utilize the cookbook code for the apex trigger on preventing lead duplicates, but have encountered a serious roadblock - if someone submits a web to lead form that is a duplicate and references it in our database, it completely prevents creation of that lead.

For example:

unique lead in database has email of random@google.com

same person with different company submits another web to lead form, with random@google.com - this lead is never created, and we miss out on it.

Any possible workarounds to this? Is there a way to only trigger when a user manually creates a new lead?
Hi,
 
Does the API provide a service to find out the amount of remaining licenses using Apex?
 
Thanks!
  • December 01, 2008
  • Like
  • 0
Hi there.
I was wondering could anyone help me out.
Im trying to send an email when a visualforce page is loaded.
I have changed the email addresses for the purpose of this post.
 
Basically I have a simple visualforce page which consists of:
 
<apex:page controller="EmailCardListController" action="sendMail" title="Email Card List">
   <apex:outputText value="{!emailSent}" />
</apex:page>
 
and a relatively simple controller that sends an email (taken pretty much from the Apex pdf guide)
 
public class EmailCardListController {
    //Did the email send successfully?
    public Boolean emailSent { get; set; }
    //Create the email handler;
    public Messaging.SingleEmailMessage mailHandler = new Messaging.SingleEmailMessage();
   
    //The recipient
    String[] emailRecipient = new String[] {'jbloggs@acme.com'};
    public void sendMail() {
   
        //set the recipient
        mailHandler.setToAddresses(emailRecipient);
       
        //set the reply email address
        mailHandler.setReplyTo('jbloggs@acme.com');
       
        //set the display name
        mailHandler.setSenderDisplayName('Keith Nixon');
       
        //set the subject
        mailHandler.setSubject('Card List');
       
        //set the template ID
        //mailHandler.setTemplateId('00X200000015XFL');
       
        mailHandler.setHtmlBody('This is a simple email from me');
       
        try {
            Messaging.sendEmail(new Messaging.Email[] { mailHandler });
            emailSent = true;
        }catch(EmailException e) {
            System.debug(e.getMessage());
            emailSent = false;
        }
    }  
}
 
Unfortunately when I call up the VisualForce page, I get the following error:
 
Illegal view ID sendMail. The ID must begin with /
 
 
  • November 26, 2008
  • Like
  • 0
Hi All,
I need to override default New lead creation using a wizard created using visual force. However I came to know from Salesforce support I cannot override 'New' button of leads using a custom controller. So I am planning to use an S-control to over ride New button which in turn calls a Visual force page. However I am not sure if this can be done. I would appreciate any kinds inputs. Thanks.
  • November 22, 2008
  • Like
  • 0
Account Name (from Accounts) is a look-up field on Opportunity. We wanted to update another opportunity field with a value from Account selected in the first field. I know this can be done using a trigger. Trying to simplify this update process and wanted to know if this can be achieved using a field update. Would appreciate any help on this.
  • October 24, 2008
  • Like
  • 0

I got great advice from a recent post, so maybe someone can help me with a sporadic message I receive, usually when opening a new Excel sheet after successfully running some queries (both insert and update).

The message is:

'sforce_connect1.xls' could not be found.  Check the spelling of the file name, and verify that the file location is correct.  If you are tyring to open the file from your list of most recently used files on the File menu, make sure that the file has not been renamed, moved, or deleted.

Of course, I have never opened or created a file named sforce_connect nor sforce_connect1.

I am running sforce version 5.51, Excel 2003 (SP1) and have gotten this message both on Windows Server 2003 and Windows XP Professional (SP 2)

I have tried logging out (same error message), and it seems to trap me in an endless loop of error messages.

Any and all help greatly appreciated!

 

  • May 03, 2005
  • Like
  • 0