• larrmill59
  • NEWBIE
  • 85 Points
  • Member since 2008

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 26
    Replies

HI all,

 

is there a way to add a workflow rule that gets triggered when a value is changed twice?

 

For example a closed date is set to 15/04/2013 in january, the in April it is changed to 15/05/2013 and in May it is changed again to 15/09/2013.

I would like to know if there is a way to at that moment have the rule evaluated to true in order to send an email alert.

 

The aim is to identify sales opportunitis which keep on moving right on the calender and get moved from quarter to quarter.

Maybe there are other ways to track it?

 

Many thanks in advance

Cinzia

I have a perplexing issue.  I have a Visualforce page with an input field that has a lookup.  When clicking the "Search" button (magnifying glass), the searched field can be selected but the window does not close, forcing the user to press the "Close Window" button.  Any suggestions on how to fix this?

 

Thanks in advance.

  • February 16, 2012
  • Like
  • 0

Is there any way to change the owner of a Chatter group outside of deleting and re-creating the group? We have an admin who will no longer be in our instance of Salesforce, so his login will be inactivated. We would like him to be removed as owner of all the groups he has created.

 

Thanks

Larry

I have a VForce page which is basically a copy of a custom object detail page. I have the related lists setup in my code, but I can't figure out how to bring back the hoverlinks without implementing the standard apex:detail attribute, which duplicates my entire page.

 

<apex:page standardController="Vendor__c">
<apex:detail relatedListHover="true"/>
<apex:sectionHeader title="{!$ObjectType.Vendor__c.label}" subtitle="{!Vendor__c.name}"/>
<apex:pageBlock title="{!$ObjectType.Vendor__c.label} Detail">

 

Is there another way to turn the hover links on?

 

When a user clicks on the magnifying glass next to a lookup field, the page that comes up contains a list of recent items. Is there any way to not show any recent items and force them to key in some value to search for? The problem is that they are selecting recent items which are for previous months that are no longer valid choices. They need to search for and select the current month only.

 

As an alternative, is there a way to create a new lookup dialog page?

I'm trying to auto name a record as it's created. I want to combine the account name and the current date and use that as the name.

 

The code snip below does work but the date is too complex. How do I get just the mm/dd/yyyy to show?

 

 for(Account a:accountList) {
                  //set your field values here.
   c.Name = a.Name + ' ' + date.today();
   c.Account_Executive__c = a.owner.FirstName + ' ' + a.owner.LastName;
   c.Region__c = a.Region__c;
   c.RME_Date__c = date.today();

Our admin team has been tasked with re-designing the Accounts, Contacts etc. objects using Visualforce to make them cleaner and more user friendly. Has anyone come across any design templates that can be modified to fit a specific org? Basically we are trying to come up with some ideas for custom themes or styles that we can implement.

 

Any examples or hints of where to look would be greatly appreciated.

 

Thanks

I have a page with 5 data entry sections each of which is tied to a specific record type of the object. I would like to only show the one section that applies to the record type that was selected when creating the record. I found the references and code samples for the rendered attribute, but just can't seem to get the syntax correct. The code below is my latest attempt, but it won't save. The error is "Incorrect parameter for operator '='. Expected Object, received Text"

 

<apex:pageBlockSection title="Fee Waiver RME" rendered="{!RME__c.RecordType='012S00000000Pvm'}">

 

Any help would be appreciated.

I am trying to use a trigger to do 2 things upon creation of a new custom object record. First it needs to fill in a field with the name of the account owner. The second is after that field is filled in, it will fire the approval process, since the account owner needs to be specified to the approvers.

 

Thanks to several of you here, I'm getting closer, but still not able to get this to work. Now my trigger compiles fine, but when I create a new record and click Save, it gives me the following error.

 

Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger Approval caused an unexpected exception, contact your administrator: Approval: execution of AfterInsert caused by: System.DmlException: Process failed. First exception on row 0; first error: NO_APPLICABLE_PROCESS, No applicable approval process found.: []: Trigger.Approval: line 33, column 9

 

My code is below. What am I missing here?

 

trigger Approval on RME__c (before insert, after insert) {
    /* Modify the new object here */
    if(Trigger.isBefore) {
        Set<Id> accountIDs = new Set<Id>();
    for(RME__c c:Trigger.new) {
            if(c.account__c != null) {
                accountIDs.add(c.Account__c);
            }
        

        List<Account> accountList = new List<Account>([SELECT Owner.Firstname, Owner.LastName FROM Account WHERE id IN :accountIDs]);
        for(Account a:accountList) {
                  //set your field values here.
   c.Account_Executive__c = a.owner.FirstName + ' ' + a.owner.LastName;
   Database.update(accountList);
        }
        }
       
        }
    /* Perform the approval submit in the after */
    else {

        List<Approval.ProcessRequest> requests = new List<Approval.ProcessRequest>();

        for(RME__c c:Trigger.new) {

            Approval.ProcessSubmitRequest req = new Approval.ProcessSubmitRequest();
            req.setComments('The comment');
            req.setObjectId(c.id);
            requests.add(req);
        }

        Approval.process(requests);
    }

}

I have a trigger that is supposed to update a field on a record and then submit an approval process. The problem is that the approval process is kicking in first which locks the record, thus preventing my field from being updated.

 

How can I insert a break or wait into the code or some other way to force the order of execution?

We want to be able to create a new custom record where the user fills out some info and clicks Save. At that point a trigger fires to populate another field on the record and it also submits the record into the approval process. Question is, can I append the code to submit the approval request into an existing trigger like I'm trying to do here, or do I write the trigger around the approval request and fill in the one field I need as part of that submission?

 

Right now it's telling me the following:

 

Error: Compile Error: Variable does not exist: a.id at line 12 column 18

 

The trigger code is below:

 

trigger RME_Approval on RME__c (after insert) {

  for(RME__c a: trigger.new){
  for  (Account Acct : [select id,owner.FirstName,owner.LastName from account where id = :a.account__c])
           {
   a.Account_Executive__c = Acct.owner.FirstName + ' ' + Acct.owner.LastName;
  update a;
          }
     }
     Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
req1.setComments('Submitting RME request for approval');
req1.setObjectId(a.id);
Approval.ProcessResult result = Approval.process(req1);
     }

 

Thanks

Larry

I'm sure this is a very simple thing but none of the code samples I look at have an example of this.

 

One of the fields I'm trying to populate using a trigger is called Account Executive. I'm pulling the first and last name using account owner. I am able to concatenate the two values, but how do I get a space to appear between the first and last names? Please see the section of code below.

 

 for(RME__c a: trigger.new){
  for  (Account Acct : [select id,owner.FirstName,owner.LastName from account where id = :a.account__c])
           {
   a.Account_Executive__c = Acct.owner.FirstName + Acct.owner.LastName;

 

If there is a different way to get the full name into this field, that would be fine too.

 

Thank you,

Larry

I have a custom detail object where account is the master object. I've set up the Name field of the custom object as an auto number to get some consistency. I originally had just a date and number. Now I want to to have the following:

 

account name - {mm} - {yyyy} - {0} with the account name automatically filling in.

 

Does anyone know how to do this?

I thought this was a new feature of Salesforce but I can't seem to find it. Is there a way to show a running total of a field across all records when looking at the related list for that object?

 

For example, show a total of the Invoice RME Requested column in the footer of the related list below?

 

RME

RMEs

RMEs Help RMEs Help (New Window)
ActionRME: RME NameInvoice RME RequestedFee RME RequestedPricing RME RequestedLock Extension RMEGranted Amt
Edit | Del0810 Certified Federal$325.00$0.00$0.00$0.00 
Edit | Del0810 Cole Taylor$1,250.00$0.00$0.00$0.00 
Edit | Del0810 Cole Taylor2 $0.00$744.47$0.00$744.47
Edit | Del0810 Affinity $0.00$0.00$137.93$137.93
Edit | Del0810 Santa Cruz $250.00$0.00$0.00 

I'm working on a trigger that simply populates a date/time value into a field on the account when a record of a specific record type gets created on a related custom object. The trigger is fine but the test class fails due to the line where I try to specify the record type in the test. The error I get is below.

 


System.StringException: Invalid id: DO NominationClass.AccUpdateTest.SponsorshipInsert: line 11, column 20 External entry point

 

My trigger code:

trigger AccUpdate on AE_Sponsorship__c (after insert, after update) {
//Query for the Account record types
     List<RecordType> rtypes = [Select Name, Id From RecordType 
                  where sObjectType='AE_Sponsorship__c' limit 1];
     
     //Create a map between the Record Type Name and Id for easy retrieval
     Map<String,String> accountRecordTypes = new Map<String,String>{};
     for(RecordType rt: rtypes)
        accountRecordTypes.put(rt.Name,rt.Id);

    for (AE_Sponsorship__c a: trigger.new){
            if(a.RecordTypeId==accountRecordTypes.get('DO Nomination'))
            {
            Account myAcc = [select Id from Account where ID = : a.Account__c];
        myAcc.Test_Update_from_AE_sponsorship__c = a.lastmodifiedDate;
        update myAcc;
        }
    }
}

My test class:

@isTest
private class AccUpdateTest {
    private static testmethod void SponsorshipInsert(){
    AE_Sponsorship__c sponsor1 = new AE_Sponsorship__c(
    Overall_Monthly_Volume__c=100, 
    Met_with__c='jim', 
    Expected_Flagstar_Volume__c=100, 
    Approved_for_CFL__c=TRUE, 
    Account__c = '0015000000Jo7v5',
    Date_of_Visit__c=Date.newInstance(2010, 07, 15),
    RecordTypeID = 'DO Nomination'
);
insert sponsor1;
}
}

 Can anyone help me get this final piece working please? I need to specify the record type without hard coding the record type ID, which is why the trigger has a map for record type.

 

Thank you,

Larry

 

First of all, I know little to nothing about Apex. I can kind of follow existing code and make minor modifications, but that's about it. I enlisted someone's help in writing the trigger below, but their test class only gives 40% code coverage. I can see in the test class what is missing, but I don't know how to write it to pick up the rest. Here is the trigger:

 

trigger AccUpdate on AE_Sponsorship__c (after insert, after update) {

    for (AE_Sponsorship__c a: trigger.new){
            IF(a.RecordTypeId=='012S00000000PV0')
            {
            Account myAcc = [select Id from Account where ID = : a.Account__c];
        myAcc.Test_Update_from_AE_sponsorship__c = a.lastmodifiedDate;
        update myAcc;
        }
    }
}

 

Here is the test class:

 

@isTest
private class AccUpdateTest {
    private static testmethod void SponsorshipInsert(){
    AE_Sponsorship__c sponsor1 = new AE_Sponsorship__c(Overall_Monthly_Volume__c=100, Met_with__c='jim', 
    Expected_Flagstar_Volume__c=100, Approved_for_CFL__c=TRUE, Account__c = '0015000000Jo7v5', Date_of_Visit__c=Date.newInstance(2010, 07, 15));
insert sponsor1;
}
}

As you can see it only inserts the sponsorship but doesn't populate the date/time field on the account record. I know this should be a simple thing but with absolutely no experience in Apex or Java I'm stuck.

 

Thanks

To avoid columns running into each other we would like to center a column instead of it being left justified.

In our example, we have "created by" right next to a column for a number field. The number looks like it is part of the
date from the previous column.

HI all,

 

is there a way to add a workflow rule that gets triggered when a value is changed twice?

 

For example a closed date is set to 15/04/2013 in january, the in April it is changed to 15/05/2013 and in May it is changed again to 15/09/2013.

I would like to know if there is a way to at that moment have the rule evaluated to true in order to send an email alert.

 

The aim is to identify sales opportunitis which keep on moving right on the calender and get moved from quarter to quarter.

Maybe there are other ways to track it?

 

Many thanks in advance

Cinzia

i wish to see stop user from changing status to something on case if activity history which is relative list have 0 or no records.

how can i do it without trigger, is there a way?

Is there any way to change the owner of a Chatter group outside of deleting and re-creating the group? We have an admin who will no longer be in our instance of Salesforce, so his login will be inactivated. We would like him to be removed as owner of all the groups he has created.

 

Thanks

Larry

I am trying to transfer reference information from one custom object to another. The name of the field I am trying to transfer is "Able to Mention Customer's Name". The picklist values for this field are Yes, No, Pending. 

 

I would like the value of this field to be updated into the field "Contract Allows External Use?"

 

Below is my formula. Any advice with what I am doing wrong is greatly appreciated. 

 

CASE( Customer_Information__r.Able_to_Mention_Customer_Name__c ,"Yes", "No", NULL)

 

Hi, 

 

New to formula's and I need to create 2 validation rules... 

 

1.) That will not allow duplicate leads to be registered

2.) If Company & Email & Last Name are null do not register as a lead.

 

Any advice? 

  • December 18, 2012
  • Like
  • 0
Hi all, i have picklist month field wich contains numeric values and year also i have picklist field.Lets say this year when you enter month i.e. Nov or Dec and year i.e. 2012 then it should not allow.So it should allow only month i.e Oct and year i.e.2012 (i.e.Current year of the previous month). Fields:month__c and Year__c Pls provide the example and let me know asap Thanks!
  • November 08, 2012
  • Like
  • 0

Hello Guys,

 

I need some help on a small requirement.

 

If the sales rep do not work on the assigned leads then we want to send a email alert to the VP sales.

First email after 3 days of lead creation/assignment

@nd email after 10 days of lead creation/assignment .

 

Suggestions please.!!

 

Thanks in advance.

Hi!

We've 10 salesforce license- which was purchased some months back.

I recently joined the team,

 

1) How can I find which kind of license(professional, enterprise, unlimited etc).  I think, I could find looking the features available but justed wanted to check, if some easy way available. For now, it seems to me, it is enterprise edition

 

2) We've consumed all 10 licenses and  now we want to give just 'read' access of 'accounts & 'contacts' to atleast 10 more people. Do we need to purchase license for this or any easy way available.

 

I checked chatter free license type, for which I can add 5000 users.. but finding they can't access any such standard object.

 

Please suggest!!

 

When I create a formula field, the only return types available to me are Currency, Date, Date/Time, Number, Percent, & Text.

 

Why no True/False (checkbox) type? (Or for that matter, why no email, phone, or URL types?)

 

I've been creating number fields with values of 1 or 0, but that is far from ideal, especially, because they display on reports as "1.00" or "0.00".

 

Is there a better workaround?

Good afternoon, folks! I am working in Leads. I have a picklist called “Lead Status.” The choices in this picklist are:

  • Zero
  • Open
  • Attempted Contact
  • Actively Engaged
  • Qualified
  • Disqualified.

It’s the controlling field for a dependent picklist called “Reason Disqualified.” The choices in that picklist are:

  • Did not respond
  • Incorrect contact data
  • Not interested
  • Is consultant or vendor
  • Already in pipeline

If "Disqualified" is selected under the Lead Status picklist, I want the user to be required to select one of the choices under the "Reason Disqualified" picklist. The formula I’m currently using is:

 

AND(TEXT(Status) = "Disqualified",

ISBLANK(TEXT(Reason_Disqualified__c))) 

 

Any help/guidance is appreciated! 

I have a perplexing issue.  I have a Visualforce page with an input field that has a lookup.  When clicking the "Search" button (magnifying glass), the searched field can be selected but the window does not close, forcing the user to press the "Close Window" button.  Any suggestions on how to fix this?

 

Thanks in advance.

  • February 16, 2012
  • Like
  • 0

Hi,

 

I have a requirement where in when a user login to the ideas site if he has any comments on his ideas that has been previously posted, he/she should get a pop-up alert that someone has commented on his/her ideas. We have a link that displays the recent activity but we need an alert or pop-up to tell the user that he/she has new messages kind of thing.

 

Could any one help me with this.

Thanks in advance.

 

  • January 13, 2011
  • Like
  • 0

I'm trying to auto name a record as it's created. I want to combine the account name and the current date and use that as the name.

 

The code snip below does work but the date is too complex. How do I get just the mm/dd/yyyy to show?

 

 for(Account a:accountList) {
                  //set your field values here.
   c.Name = a.Name + ' ' + date.today();
   c.Account_Executive__c = a.owner.FirstName + ' ' + a.owner.LastName;
   c.Region__c = a.Region__c;
   c.RME_Date__c = date.today();

I have a page with 5 data entry sections each of which is tied to a specific record type of the object. I would like to only show the one section that applies to the record type that was selected when creating the record. I found the references and code samples for the rendered attribute, but just can't seem to get the syntax correct. The code below is my latest attempt, but it won't save. The error is "Incorrect parameter for operator '='. Expected Object, received Text"

 

<apex:pageBlockSection title="Fee Waiver RME" rendered="{!RME__c.RecordType='012S00000000Pvm'}">

 

Any help would be appreciated.

how to send lost oppertunity link in email using workflows..?????

 

plz help