• saintrj
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 18
    Replies
In one of our lead environments, we have added a Account lookup to the lead. When the lead is "sales ready" (Custom field "MSD Sales Ready", Checkbox (True)), then we would like to convert all the leads with that Account link to contacts using the account link as the account that the contacts are created in.

That means we need to select the existing account and then create the contact, but also anyother lead with that account link as well.

Any ideas?
  • September 22, 2014
  • Like
  • 0
I want to modify the code on the accept button that resides on the View List for Inbound Email Sort. This is the queue for all incoming email cases from email to case.
Currently, when a case is selected and the accept button is pushed  the case ownership transfers. The issue is , having multiple users, selecting cases from this view, if a user selects a case and then takes ownership, the second user does not see the case having been selected unless they refresh. Instead I would lie to modify the code so that the accept button only changes ownership if the case owner is Inbound Email Sort,

As I am nmot a coder, I am wondering is anyone can help.
We have an object called zipcodelookup that have all the US and Can postal codes and the salespeople for each zip. We have a trigger that assings the people to an account based on the zip code. ( well actually that is in the sandbox and I'm working on mocing it to production).. The trigger works when an account is created or edited. Is there a way to allow me to update all the accounts in my database with this lookup as a batch.  When a new person starts or the assignments change we would like to update all the accounts at once. Can a button be created that would do that? Or some other method?
As I am not an Apex guy, I need some help. I have this trigger that I inheritied, but it only works for US zip code. I need to eithr modify it or add another trigger that will work for Canadian zip codes. We have a custom object called zip code table that lists all Us zip code by 5 digit, but canadian zip codes by first 3 digits (that is where this breaks down, I bleieve) 

Can anyone assist>
trigger UpdateZipCode on Account (before insert, before update) {
  list<string> zipcodeList = new List<string>();

  string zipCode;
 
  for (integer i = 0; i <trigger.new.size(); i++) {
    zipcode = trigger.new[i].billingpostalCode;
    system.debug('ZipCode: ' + zipcode);
   
    if (zipcode != null) {
      integer index = zipcode.indexof('-',0);
   
      if (index != -1) {
      zipcode = zipcode.substring(0, index);
      }
      system.debug('ZipCode after the filter: ' + zipcode);
      zipcodeList.add(zipCode);
    }
  }
  system.debug('zipcode size: ' + zipcodelist.size());

    if (zipcodelist.size() > 0) {
      List<Zip_Code_Table__c> zipCodeTableList = [Select id, name from Zip_Code_Table__c where name in :zipcodeList];
    system.debug('Data returned by zipcodeTable : ' + zipCodeTableList.size());
   
   
    if (zipCodeTableList.size() > 0) {
      //Add the zip code into a map
      map<string, id> mapZipName= new map<string, id>();
    for (integer i=0; i<zipcodeTableList.size(); i++) {
      mapZipName.put(zipcodeTableList[i].name, zipcodeTableList[i].id);
    }
         
      //There is possibility that the number of zipcode from account is more than the zipcodeid return from zipcode table
      id zipcodeid;
      for (integer i = 0; i <trigger.new.size(); i++) {
      zipcode = trigger.new[i].billingpostalCode;
      if (zipcode != null) {
        integer index = zipcode.indexof('-',0);
     
        if (index != -1) {
        zipcode = zipcode.substring(0, index);
        }
       
        zipcodeid = mapZipName.get(zipcode);
        system.debug('zipcodeid: ' + zipcodeid);
        Trigger.new[i].Zip_Code__c = zipcodeid;
      }
      }
    }
    }
}

I have creted a workflow rule that is supposed to run only if a text field is not blank. I used the syntax IS NOT EQUAL TO "NULL"

 

However it is running the rule for every edit.   Clearly I'm doing something wrong, but I am not sure what.

I have this code on an email template but the error says that the field name "Product2" is not valid. Is this because it is a picklist? If so How do I capture this value for the table>

 

<apex:repeat var="cx"

value="{!relatedTo.QuoteLineItems}">
          <tr>
             <td><a

href="https://na1.salesforce.com/{!cx.id}">View</a> |
             <a

href="https://na1.salesforce.com/{!cx.id}/e">Edit</a></td>
             <td>{!cx.Product2}</td>
             <td>{!cx.Quantity}</td>
             <td>{!cx.OSTI_Requested_Multiplier__c}</td>
             <td>{!cx.OSTI_Disty_Allowed_Margin__c}</td>
          </tr>
</apex:repeat> 

Can I create a workflow that locks the quote when I save the quote pdf via the save and/or save and email buttons?

I am new , and have what is a little different, I thinkg environment.

 

We vase the approval of quotes on a multiplier value. I have created a custom field at the Line Item object and want to include that field in the approval email. The problem I am having is that this custom field does not appear on the lsit of custom fields available in the email template cration tool.

 

Secondarily. my approval process requires one or both of two individuals to approve.

 

I wanted to create a picklist to choose the approver, but I cant seem to create a multi pick list field to do that.

 

Any guidenace will be greatly appreciated

I have a lookup field on the account that pulls from a list of accounts that have a specific value in a custom field.

I want to be able to take that value and populate a filed on the opportunity, and also use that account info to populate the address of that account on the opportunity as well.

 

The goal is to be able to use the related account and address information in the quote pdf template. If there is another way to do that I am eager to find out.

 

I don;t want my users to have to enter the same information multiple times.

As I am not an Apex guy, I need some help. I have this trigger that I inheritied, but it only works for US zip code. I need to eithr modify it or add another trigger that will work for Canadian zip codes. We have a custom object called zip code table that lists all Us zip code by 5 digit, but canadian zip codes by first 3 digits (that is where this breaks down, I bleieve) 

Can anyone assist>
trigger UpdateZipCode on Account (before insert, before update) {
  list<string> zipcodeList = new List<string>();

  string zipCode;
 
  for (integer i = 0; i <trigger.new.size(); i++) {
    zipcode = trigger.new[i].billingpostalCode;
    system.debug('ZipCode: ' + zipcode);
   
    if (zipcode != null) {
      integer index = zipcode.indexof('-',0);
   
      if (index != -1) {
      zipcode = zipcode.substring(0, index);
      }
      system.debug('ZipCode after the filter: ' + zipcode);
      zipcodeList.add(zipCode);
    }
  }
  system.debug('zipcode size: ' + zipcodelist.size());

    if (zipcodelist.size() > 0) {
      List<Zip_Code_Table__c> zipCodeTableList = [Select id, name from Zip_Code_Table__c where name in :zipcodeList];
    system.debug('Data returned by zipcodeTable : ' + zipCodeTableList.size());
   
   
    if (zipCodeTableList.size() > 0) {
      //Add the zip code into a map
      map<string, id> mapZipName= new map<string, id>();
    for (integer i=0; i<zipcodeTableList.size(); i++) {
      mapZipName.put(zipcodeTableList[i].name, zipcodeTableList[i].id);
    }
         
      //There is possibility that the number of zipcode from account is more than the zipcodeid return from zipcode table
      id zipcodeid;
      for (integer i = 0; i <trigger.new.size(); i++) {
      zipcode = trigger.new[i].billingpostalCode;
      if (zipcode != null) {
        integer index = zipcode.indexof('-',0);
     
        if (index != -1) {
        zipcode = zipcode.substring(0, index);
        }
       
        zipcodeid = mapZipName.get(zipcode);
        system.debug('zipcodeid: ' + zipcodeid);
        Trigger.new[i].Zip_Code__c = zipcodeid;
      }
      }
    }
    }
}
As I am not an Apex guy, I need some help. I have this trigger that I inheritied, but it only works for US zip code. I need to eithr modify it or add another trigger that will work for Canadian zip codes. We have a custom object called zip code table that lists all Us zip code by 5 digit, but canadian zip codes by first 3 digits (that is where this breaks down, I bleieve) 

Can anyone assist>
trigger UpdateZipCode on Account (before insert, before update) {
  list<string> zipcodeList = new List<string>();

  string zipCode;
 
  for (integer i = 0; i <trigger.new.size(); i++) {
    zipcode = trigger.new[i].billingpostalCode;
    system.debug('ZipCode: ' + zipcode);
   
    if (zipcode != null) {
      integer index = zipcode.indexof('-',0);
   
      if (index != -1) {
      zipcode = zipcode.substring(0, index);
      }
      system.debug('ZipCode after the filter: ' + zipcode);
      zipcodeList.add(zipCode);
    }
  }
  system.debug('zipcode size: ' + zipcodelist.size());

    if (zipcodelist.size() > 0) {
      List<Zip_Code_Table__c> zipCodeTableList = [Select id, name from Zip_Code_Table__c where name in :zipcodeList];
    system.debug('Data returned by zipcodeTable : ' + zipCodeTableList.size());
   
   
    if (zipCodeTableList.size() > 0) {
      //Add the zip code into a map
      map<string, id> mapZipName= new map<string, id>();
    for (integer i=0; i<zipcodeTableList.size(); i++) {
      mapZipName.put(zipcodeTableList[i].name, zipcodeTableList[i].id);
    }
         
      //There is possibility that the number of zipcode from account is more than the zipcodeid return from zipcode table
      id zipcodeid;
      for (integer i = 0; i <trigger.new.size(); i++) {
      zipcode = trigger.new[i].billingpostalCode;
      if (zipcode != null) {
        integer index = zipcode.indexof('-',0);
     
        if (index != -1) {
        zipcode = zipcode.substring(0, index);
        }
       
        zipcodeid = mapZipName.get(zipcode);
        system.debug('zipcodeid: ' + zipcodeid);
        Trigger.new[i].Zip_Code__c = zipcodeid;
      }
      }
    }
    }
}

I have creted a workflow rule that is supposed to run only if a text field is not blank. I used the syntax IS NOT EQUAL TO "NULL"

 

However it is running the rule for every edit.   Clearly I'm doing something wrong, but I am not sure what.

I have this code on an email template but the error says that the field name "Product2" is not valid. Is this because it is a picklist? If so How do I capture this value for the table>

 

<apex:repeat var="cx"

value="{!relatedTo.QuoteLineItems}">
          <tr>
             <td><a

href="https://na1.salesforce.com/{!cx.id}">View</a> |
             <a

href="https://na1.salesforce.com/{!cx.id}/e">Edit</a></td>
             <td>{!cx.Product2}</td>
             <td>{!cx.Quantity}</td>
             <td>{!cx.OSTI_Requested_Multiplier__c}</td>
             <td>{!cx.OSTI_Disty_Allowed_Margin__c}</td>
          </tr>
</apex:repeat> 

I am new , and have what is a little different, I thinkg environment.

 

We vase the approval of quotes on a multiplier value. I have created a custom field at the Line Item object and want to include that field in the approval email. The problem I am having is that this custom field does not appear on the lsit of custom fields available in the email template cration tool.

 

Secondarily. my approval process requires one or both of two individuals to approve.

 

I wanted to create a picklist to choose the approver, but I cant seem to create a multi pick list field to do that.

 

Any guidenace will be greatly appreciated

I have created a custom object called Quote__c which I am trying to hookup an approval process.

 

When a record gets submitted into the approval process I have conditions on each of the approval steps.  

 

What I am trying to accomplish here is I want all Quote objects to be submitted for approval.  If conditions are such that no approval is required then still perform the "Initial Submission Actions"...and when none of the formulas for the steps evaluate to true then approve the record and perform the "Final Approval Actions".  In this way I can use the "Actions" to do field updates and such to put the Quote record into appropriate statuses.

 

What happens right now is that after submitting for approval the "Initial Submission Actions" execute...but then it instantly rejects and executes the "Final Rejection Actions".

 

This may be by design...however, what is interesting is that if you view the "Diagram" for my approval process it shows the process flows for executing the "Final Approval Actions" if the formula for the last step does not trigger assignment.

 

Any ideas here?

 

 

I wrote my first trigger, and it works great in my sandbox.  I would like to promote it to my production environment.  We are using Enterprise edition.  How exactly do I move a new trigger to production?  Is there is an easy set of instructions online somewhere?  I cannot seem to find one.

  • March 05, 2010
  • Like
  • 0

I'm attempting to create a formula field that will the display the data of a field on a related record.

 

i.e - on the Opportunity record I want to see the last activity date field that is on the account record

My formula is simply Last Activity_c

 

This works fine

 

I try to use this with a pick list data type and I get an error.  Is this not possible?

Hello everyone,

I am seeking some help and advice regarding email templates.

Our ORG currently is configured with Accounts >> Opportunities >> Opportunity Line Items (multiple "items" per opp is possible).

What I'm trying to accomplish is:

Pull Account Information, Pull Opportunity Information, BUT ALSO pull Opportunity Line Items for an email template.

Currently, if I send an email template from the opportunity object, it only pulls account and opportunity information.

Anyone have the same problem?  I've tried using VF/APEX templates but I'm pretty new to that.

Please help.

Thanks
Hello,

I am new to SFDC an need a little help.

When an opportunity changes stages there's an option to automatically send out an approval e-mail using a pre-made template for  managerial purposes. My question is, is it possible to add the products, to the e-mail for approval, that are attached to that opportunity? This is necessary to do in order for managers to completely understand what products are associated with which opportunities. This automated process would relieve users from manually creating a mail-merge and uploading it to an e-mail, and so on so forth. Is this possible using apex, workflows, etc?

Any help would be great. Thank You.