• CRMsimple
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 38
    Replies

Here's a custom button formula created on the opportunity object that will allow you to find duplicate opportunities from an individual opportunity record:

 

 

/search/SearchResults?searchType=2&str={!
Opportunity.Name}*&search=Search&sen=006

Here's a similar one that allows you to look for opportunities from an individual Lead record. This one was created on the Lead object:

 

 

/search/SearchResults?searchType=2&str={!
Lead.Company}*&search=Search&sen=006
Description

 

Not sure how many of you out there have or will ever have this requirement but I did and this is a good solution.

 

Best-

 

Jeremy

 

 

 

 

I have a trigger that is creating child records when a parent record is created and populates fields on the chiuld record with values from the parent. This is working fine but now I need to make sure the parent record is a certain record type or the trigger should not create the child. This is my very first trigger so I don't have tons of experience to really take it any further.

 

Here's the code I have:

 

 

trigger AutoCreatePartnerCommission on Opportunity (after insert) {List<Commission__c> commissions = new List<Commission__c> () ;//For each opportunity processed by the trigger, add a new//commission record for the specified partner account.//Note that the Trigger.New is a list of all the new opportunities//that are being created.for (Opportunity newOpportunity: Trigger.New) {IF (newOpportunity.Days_Since_Submitted__c >= 0 ) { commissions.add (new Commission__c( Account__c = newOpportunity.Partner_Account__c, Original_Opportunity_Amt__c = newOpportunity.Amount, Opportunity__c = newOpportunity.id, Loan_Amount__c = newOpportunity.Maximum_Loan_Amount__c )); }}insert commissions;}

 Where/how do I get the record type criteria in there? Any help would be appreciated.

 

Jeremy King 

 

 

 

 

 

Message Edited by CRMsimple on 07-16-2009 05:08 PM

Anyone have some sample trigger code that might help me with the following?:
 
On Opportunities, we have a second account lookup field which is a lookup to a partner account. We'd like to be able to mimic the summary roll-up type field to sum the total amount of opportunities that are closed won, lost, open etc. but because the account is secondary, a non master-detail relationship, this isn't possible without a trigger.
 
So I'm thinking that when this account is pulled into the opportunity via the lookup field, the trigger could pull in the opportunity amount value and add it to this "summary roll-up" type field on the partner account and keep increasing the amount each time a new opportunity is linked to this account or is updated, if it already exists. 
 
If it could have the ability to evaluate the stage and record type that would help too.
 
 
Can anyone provide any "starter" code samples that might help me get started? I understand what needs to happen, but my knowledge of writing code is very limited.
 
Any help would be greatly appreciated.
 
Thanks 

I have created a custom button on the Lead object to create another object and populate it with data from the lead. Everything maps over properly except for a few picklist fields. Why is this? The values are exactly the same on both objects.

Any help would be appreciated.

Thanks
I got this to work fine

IMAGE (IF( Days_Open__c < 4,"/img/samples/flag_green.gif", "/img/samples/flag_red.gif"),
"Status Flag")


But now I want to add more statements like Days_Open_c > 4, but < 7 yellow, or >= 7 red

Can anyone help me with this?
Is it possible to prevent users from skipping opportunity stages using a validation rule - maybe PRIORVALUE or something like that?
I have 4 checkbox fields and I like to prevent the user from checking more than 1. Is this possible?
I'm having some difficulty updating the following formula field:


Code:
IF (Days_since_last_review__c   >=  120,"120 Days No Review",
  IF (Days_since_last_review__c   >=  90, "90 Days No Review", 
   IF (Days_since_last_review__c  = 0, "Never Had Review", null)
   )
  )
)

 I am trying to make the IF statements run but only if the picklist field Contact_Status__c is "Client" if not I want to the field to be null

Code:
IF(AND(ISPICKVAL( Contact_Status__c , "Client",
(Days_since_last_review__c   >= 120, "120 Days No Review",
(Days_since_last_review__c   >=  90, "90 Days No Review", 
(Days_since_last_review__c  = 0, "Never Had Review", null
   )
   )
)

 I am getting all sorts of save errors on this one (and any others that I've tried) - Can anyone put me on track?

Thanks
Jeremy


I'm trying to update this formula, which works fine as it is, but I want the formula to run only if the record has a certain value in a picklist field. The existing code is as follows:

Code:
IF( Days_since_last_review__c >= 120, "120 Days No Review",
IF(Days_since_last_review__c >= 90, "90 Days No Review",
IF(Days_since_last_review__c = 0, "Never Had Review", null
)
)
)

What I want it to do now is evaluate ISPICKVAL Contact_Status_c, "Client" to run the rest of the formula only if this is the value. I've tried several ways using AND(ISPICKVAL but I keep getting errors like missing ')' or expected 2 received 3 etc.

Any help would be greatly appreciated. (I'm guessing it's either not possible or I'm missing something extremely simple)

Thanks!

I'm trying to create a custom button so that when I create an Opportunity from a Contact record, it will populate the contact name and the account name. So far, it is only populating the Account name.

Code:
https://na2.salesforce.com/006/e—lookupcmpgn=1&retURL=%2F{!Contact.Id}
&accid={!Account.Id}&
conname={!Contact.Name}&conid={!Contact.Id}

 
I've gotten plenty of these types of buttons to work but usually on custom objects to standard objects. Can anyone help?

:smileysad:


I'm trying to create a validation rule on a picklist field that prevents users in certain roles from changing the value to a specific value.

Can anyone help with this?
I have a custom list button that overrides the standard "New" button on a custom object. The custom object has a master detail relationship with Account. The problem I'm having is this:

1. Causes double tabbing
2. Doesn't re-direct to the Account page that it was created from after saving.

I have the related account Id as the lkid and the retURL and the saveURL. I essentially just copied the URL from my browser when using the standard "New" button for that custom object and inserted the appropriate merge fields and then created the s-control. I'm thinking there must be some way to get me back to the parent location and to kill the double tabbing issue.

Any thoughts?
Code:

https://na5.salesforce.com/a0E/e?CF00N70000001aAkF={!Account.Name}
&CF00N70000001aAkF_lkid={! Account_Profile__c.Return_to_AccountId__c }
&saveURL=%2F{!Account_Profile__c.Return_to_AccountId__c}



Message Edited by CRMsimple on 06-13-2008 11:50 AM

Message Edited by CRMsimple on 06-13-2008 11:52 AM

Message Edited by CRMsimple on 06-13-2008 12:03 PM
Hi,  wondered if anyone could help determine why my Return URL is not working on a custom button.
 
"/a0E/e?CF00N20000001ZdDo_lkid={!Opportunity.Id}&CF00N20000001ZdDo={!Opportunity.Name}&retURL=https://emea.salesforce.com/{!Opportunity.Id}"
 
The above related to a new custom object related to the opportunity, on saving I would like it to return back to the opportunity.   I have tried lots of different options, even sending it to an external website to see what happens, but everytime it just takes me to the saved new record.
 
Is this not possible to do with custom objects, same code "retURL" works on custom event buttons.
 
Thanks for any assistance
 
I have the need for a VisualForce page that will contain three sections, Account, Contact and Product information.

On save, I want the three records created and related or if an Account record (using Name as the key) or the a Contact record (using email address as the key)  already exists, the existing records shoudl be updated with the new information entered.  The Product record will always be new.  On Save, the newly created Product record (Standard Salesforce Product Page) should be displayed.

Ideally, if on the New create page, one could look up the Account and Contact to see if a reord existed and if it did to populate the appropiate fields on the VF page while allowing the user to overwrite the fields if necessary and on Save, update the existing Account/Contact records with the new values.

Please email a cost estimate/timeline if you think you can handle this requirement.  I need it completed and in production no later than November 14th.

Thanks

Denis

dhorgan@veltigconsulting.com
(310) 497-3247



I got this to work fine

IMAGE (IF( Days_Open__c < 4,"/img/samples/flag_green.gif", "/img/samples/flag_red.gif"),
"Status Flag")


But now I want to add more statements like Days_Open_c > 4, but < 7 yellow, or >= 7 red

Can anyone help me with this?
Hello--
 
I am looking for someone to help me make some programming changes to SalesForce.
 
What I need is not very complex and is pretty limited in scope.
 
To get started it is probably only a few hours and I would like to see it get done in the next week. That may increase some in the next month of two.
 
If someone is interested in picking up that kind of work and then has some availability moving forward on an as needed basis please contact me at radtkejim@gmail.com.
 
Thank you,
 
Jim Radtke
I'm having some difficulty updating the following formula field:


Code:
IF (Days_since_last_review__c   >=  120,"120 Days No Review",
  IF (Days_since_last_review__c   >=  90, "90 Days No Review", 
   IF (Days_since_last_review__c  = 0, "Never Had Review", null)
   )
  )
)

 I am trying to make the IF statements run but only if the picklist field Contact_Status__c is "Client" if not I want to the field to be null

Code:
IF(AND(ISPICKVAL( Contact_Status__c , "Client",
(Days_since_last_review__c   >= 120, "120 Days No Review",
(Days_since_last_review__c   >=  90, "90 Days No Review", 
(Days_since_last_review__c  = 0, "Never Had Review", null
   )
   )
)

 I am getting all sorts of save errors on this one (and any others that I've tried) - Can anyone put me on track?

Thanks
Jeremy


I'm trying to update this formula, which works fine as it is, but I want the formula to run only if the record has a certain value in a picklist field. The existing code is as follows:

Code:
IF( Days_since_last_review__c >= 120, "120 Days No Review",
IF(Days_since_last_review__c >= 90, "90 Days No Review",
IF(Days_since_last_review__c = 0, "Never Had Review", null
)
)
)

What I want it to do now is evaluate ISPICKVAL Contact_Status_c, "Client" to run the rest of the formula only if this is the value. I've tried several ways using AND(ISPICKVAL but I keep getting errors like missing ')' or expected 2 received 3 etc.

Any help would be greatly appreciated. (I'm guessing it's either not possible or I'm missing something extremely simple)

Thanks!

I'm looking to make lead status a required change when viewing the lead, but I don't need it to be to anything specific or to the next option in the picklist.  For example if the salesperson is viewing the lead I want them to be require to change the lead status, but if needed they can select the current status.   
 
We are trying to get them to update the lead status more frequently/at all. 


Message Edited by HBrose on 07-22-2008 01:19 PM
Hi all,
 
I am trying to get a formula to update a date field when the stage is changed to Won.  The formula I have is (please pity me, I have no knowledge of formulas and am trying my best to get by)...
 
IF(
ISPICKVAL (StageName , "7 - Prepare for Project Execution"),Today()+0 , NULL)
 
But every time the record it opened it updated to Today again causing inaccurate reports....any suggestions?
 
Leslie
The Lone Newfie
I'm trying to create a validation rule on a picklist field that prevents users in certain roles from changing the value to a specific value.

Can anyone help with this?
My company has what we call "Call Reports" it is a group of custom fields on my opportunity page which sends an email out when first filled out. The problem I have is that there are times when a subsequent "call report" needs to be sent out for the same opportunity. Right now I have them creating an additional opportunity and closing it, but that's messy on the pipeline.

So what I'm thinking is of a custom button on my opportunity, and that custom button takes me to a custom form which logs an activity.

It's essentially recreating the log a call button with different fields.

Any ideas on where i should start?
Please help!
 
I installed the Excel Connector, however, when I click "Sforce Table Query Wizard", there was a error :
 
"The file could not be accessed. Try one of the following:
-Make sure the specified folder exists.
-Make sure the folder that contains the file is not read-only
-Make sure the file name does not contain any of the following characters:<>?[]:sforce_connect_for_pe.xla or *
-Make sure the file/path name doesn't contain more than 218 characters. "
 
 
Is there anyone can tell me what's wrong? Thank you!