• zen_nj
  • NEWBIE
  • 270 Points
  • Member since 2006

  • Chatter
    Feed
  • 10
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 31
    Questions
  • 69
    Replies

Hi

 

We have a formula field (text) in our Opportunity called Account Manager which essentially is just a formula field that is referencing the same-named field in the Account entry: Opportunity.Account_Manager__c=Account.Account_Manager__c

This allows us to show our users who is the Account Manager associated with this Opportunity.
This works great for when the opportunity is still Open since we want to know who is the Account Manager associated with this Opportunity while it's still being worked on.

 

But once the opportunity is closed, we don't want the value in the Opportunity.Account_Manager__c to be updated any more with subsequent changes to the Account.Account_Manger__c since when we run reports later, we want to make sure we show who was in fact the Account Manager associated with this opportunity during its life cycle and not have a situation where after the opportunity has closed, the Account went through an ownership change and so the Account.Account_Manager__c now has a new value and this then gets automatically pushed into our closed opportunity's Opportunity.Account_Manager__c field (even though this person is not at all involved with the opportunity)

 

I tried to do something in the formula like this where if the Opportunity is closed, then the formula field won't get changed:

Opportunity.Account_Manager__c=If (IsClosed, Account.Account_Manager__c, Account_Manager__c)

but i get the error message "Formula cannot use another formula field that directly or indirectly refers to itself"

 

Is there a way to selectively disable a formula field from being updated?

Or can someone think of a way to do this elegantly?

 

I thought of using workflow rules and instead of Opportunity.Account_Manager__c being a formula field, just a text field. And then the workflow will automatically update Opportunities each time it is being updated (i.e. field update to always get the Account.Account_Manager__c value for as long as Opportunity is Open), but this won't work if someone just updated the Account entry and the opportunity itself doesn't get updated.

 

I thought of having a custom button from account page labeled "New Opportunity" so that when someone clicks on that, it will create a new opportunity with the Account Manager field pre-populated in Opportunity. But again, this doesn't allow changes in Account.Account_Manager__c to be automatically reflected in the Opportunity.Account_Manager__c field.

I think I can do this using apex code/trigger but I want to avoid doing that if there is another way to do this.

 

I have a simple requirement and I am hoping it's straight forward to do.  I am still a beginner in Visualforce and apex code so am looking for someone to help out.

 

The requirement is pretty simple - when someone edits an entry in the custom object (but it can be standard object as well like Case),  and if one of the field in the object has a certain value, then when the entry has been saved, I want to have a pop up window with a message reminding someone to do something.

 

So for simplicity, let's say the custom object is called Conn__c, and the field is a picklist field called Status__c.

So whenever Status__c="Closed" (or other value), I want to have a message window pop up reminding the user to do xyz.

There should be an ok button in the popup window that the user could then click to get rid of the pop-up window and return control back to the main window (i.e. the Conn__c entry that was just saved)

 

Can someone please provide me with some guidance on this. It doesn't have to be a complete code, but something specific (and combined with pseudocode) would be helpful so I can at least figure out what direction to take.

 

I guess I need to have an apex class/trigger that will check whenever the Conn__c object is saved/edited and if the condition is met, then it will generate a popup message. 

Or maybe it can just be a custom button that override the "Save" button when someone is in edit.

I had some sample code before from someone that was using s-control but that isn't supported anymore in salesforce and it looks like the way to go now is with apex code and visualforce page.


Thanks in advance.

 

New to VF and we have a requirement where for specific picklist field  values, we want to be able to display additional fields.  So I have seen some sample VF examples (i.e. the DynamicEditPage (http://wiki.developerforce.com/page/Visualforce_DynamicEditPage) which shows how this can be done.

 

But what I need though is to still have different page layouts for the various opportunities record types and so wanted to know if there is a way to still use the settings (i.e. fields and sections created for those oppty page layout) and just somehow add on to the page layout with a VF section that will display additional fields depending on specific picklist field value (in our case, it is also the Opportunity stage picklist).

 

The example provided only show how we can call on the VF page to edit some basic oppty info and the VF page actually had to define the fields to be displayed and the section name where the fields are being created.  This is not really practical for us since we have 6 opportunity page layouts for each of our oppty record type and then each page layout can easily have over 50 fields and 4/5 sections.  And I don't want to be maintaining the VF page whenever we are just adding a new field or removing a field from a specific opportunity record type.

 

Can someone let me know if we can in fact use VF page so that it will just call on the default oppty page layout and then have a section where depending on the picklist values, it wll pop up/display additional fields?

And if this is do-able, please point me to the right link/discussion or provide some sample code?

 

I tried to search through the board but wasn't sure how exactly to find the right discussions on this (assuming someone else had asked this before - and I would think someone else surely must have)

 

Thanks in advance for your help.

Hi


We currently are using Workspace/Content to store our executed contracts (i.e. MSA, Amendments, NDA, etc) and we have created Content type which contain custom fields like a lookup to Account as well as Contract type picklist.  So from this we can see from our Account page the various Content (i.e. legal documents) associated with the customer.

 

Now we would also like to leverage our Content library so that in a new custom object "Order Request",  we want our users to be filling out a Order Request for a customer (so a lookup field to Account) and also a lookup field to Content where it essentially would return the MSA associated with that account that authorizes the order.

However, it looks like when we are creating a new lookup field, there is no option to select Content as the object to be looked up.  

 

Does someone have a way around this or have some best practice/alternative options on how this can be done?

 

I know salesforce have a standard object Contract but we haven't really been using that. And I don't really want to revamp the way the company is currently using salesforce (i.e. we require sales to upload any signed contract to Content and associate it with an account) and now tell them they need to not only do that, but also now create a Contract entry and then associate somehow that Contract entry with a Content entry (i.e. signed legal doc that was uploaded to salesforce content).

 

Any advice/suggestion?

 

 

 

I'm having a hard time getting my brain around a new trigger I'm trying to write:

 

Business Case: Users add Weekly Notes (a custom child object to Opportunities) records to Opportunities every week ahead of a weekly meeting on Tuesdays.  The users should not be able to revise their notes after the meeting, but should have to log a new record.  Note: I have a custom formula date field that identifies the next Tuesday's date from the Created Date.

 

Issue: I want to lock a record from editing after a specific date and time: local midnight before Tuesday's meeting.  This also needs to happen with no action on a user's part to trigger the update.

 

Ideas on how to handle this?  I already have one formula field to calculate the date of the next Tuesday meeting, and I have located a simple trigger to identify a user's local midnight here.

 

Thanks!

Hi all,

 

I want to create a rollup summary field which sums up the amount from its child records.

This summing of amounts should take place only if flag is checked on the child record. Otherwise, the rollup field should ignore this amount field on the child records.

 

Really appreciate any help or idea on how to implement this.

 

Thanks,

VK86

Hi


I am new to visualforce so am probably doing things by trial and error and looking at examples (and so not getting the whole picture).

 

But I have controller extension for a custom object (call it FSL) and part of what the controller extension is trying to do is to generate a case off the save of this FSL custom object (PageReference save() function) and then have in the Case Description field the value of the full url of this custom object's entry.

 

Specifically, if this custom object entryhas id of xxxyyz and I am in my sandbox instance, then I want to be able to have in Case Description something like 'For more detail on this object, please refer to '+CustomObject_Link;  and the CustomerObject_Link would return say https://tapp0.salesforce.com/xxxyyz.

 

Right now, I  have the following code:

 

public PageReference Save() {

PageReference CustomObject_Link = new PageReference('/' + FSL.id);

.

.

cases.Description='You can see more detail for the FSL entry related to this request by clicking on this link: '+CustomObject_Link;

 

 

And when the case is generated, the Case Description would just contain:

 

 You can see more detail for the FSL entry related to this request by clicking on this link:/xxxyyz.

 

 

I can hardcode the CustomObject_link in sandbox so that it has:

public PageReference Save() {

PageReference CustomObject_Link = 'https://tapp0.salesforce.com'+new PageReference('/' + FSL.id);

 

And this will allow Case Description to contain:

 You can see more detail for the FSL entry related to this request by clicking on this link:https://tapp0.salesforce.com/xxxyyz.

 

Problem is when I bring this to production, we have a different instance (i.e. it would be https://na2.salesforce.com).

 

So how does one extract the instance information (i.e. that it's na2 instead of tapp0) in visualforce so I can do something like:

 

  PageReference CustomObject_Link = 'https://'+CurrentInstance+'.salesforce.com'+new PageReference('/' + FSL.id);

 

Or how do I just issue a PageReference properly so that it would return the full url (https://<salesforce instance url>/xxyyz) and not just /xxxyyz?

 

 

 

 

 

Hey Folks, I'm new to SF, so I apologize if this is an obvious problem, but I've been unable to find a solution through searching.

 

I have a simple customer object with a few custom fields, the data for which is entered by a basic user. I am the SysAdmin, and have read/write access to everything. In views of this custom object, I can see all of the records, but in creating based on the data in this custom object, only those records that I own appear in the report. I've tried everything I can think of, removing any filtering options from the report, making sure that my user account is SysAdmin and that my access rights are universal, but I can't seem to find the solution.

 

Thanks in advance for any help you can provide!

--Jim 

This is similar to my last request, but the required field is a picklist.  I used the last formula for a text field needs to be completed before an opportunity is saved:

 

AND(


ISPICKVAL(Reseller_Involved__c,"Yes"),
LEN(Reseller_Name__c)=0


)

 

 

Now, I need a picklist field to be required:  If Picklist field 'Type' (standard field) is selected 'Vendor', then Picklist field 'Vendor Group' (custom) is required.  I have:

 

 AND(


ISPICKVAL(TYPE,"Vendor"),
ISPICKVAL(Vendor_Vendor__c)  (I know I'm missing something here)

 

)

 

 

What is missing or do I have the wrong function in the second line?  Thx.

The main goal is to notify Account Owner and additional email of a Case. So I set up a new Workflow Rules with criteria "Case Comment: Body not equal to null". The workflow is working fine. Then I also set up a new Email Alert.

 

I did these steps:
http://blogs.salesforce.com/support/2009/06/new-in-summer-09-workflow-email-alerts-for-case-comments.html

 

Here is my current obstacle, I cannot send the email alert to the Case Account Owner and Email Field I created. There is options for both, but Account Owner from the list is basically My Account (logged in account), not the Case Account Owner. And the email field I created does not show up on the list.

 

Any idea? Thanks in advance

Message Edited by madimulia on 09-16-2009 01:44 PM

Currently it's set up to set the close date to the last day in the quarter, but I would prefer it just be 120 days from the date of entry.  I need some help deciding if this is a worklfow or validiation solution.  thanks!

Hi Friends,

 

I have a requirement for doing the calculation in formula field,

 

when I save the calculation of a formula field,

 

it is showing the,

 

Compiled formula is too big to execute (6,395 characters). Maximum size is 5,000 characters.

 

formula is looking like this,

[CV* ( 1+IPV/100)**( NM/12)] +[ Sum from Y= 1to Y=NY of { AC* [( 1+ INCC/100)**( NY-Y+1)] *[ (1+IPV/100)**Y]},

as our requirement i did this formula is like this,

Financial_Detail__r.Plan_current_value__c * ( ( Financial_Detail__r.Rate_of_Increase_in_Plan_Value__c ) ^ ( CEILING( Complete_month_bwn_maturity_year_today__c / 12) ) )

+

( Complete_years_bwn_Maturity_yr_today__c )
*
(( Plan_Annual_Contribution__c )
*
(( ((1+ Rate_of_incr_in_contributions_this_plan__c ) ^CEILING ( Complete_years_bwn_Maturity_yr_today__c-( YEAR( TODAY() ) - YEAR( Financial_Detail__r.Plan_beginning_year__c ) )+1 ))

*

((1+ Financial_Detail__r.Rate_of_Increase_in_Plan_Value__c )^CEILING(YEAR( TODAY() ) - YEAR( Financial_Detail__r.Plan_beginning_year__c ))))))

 

 

Can any one please tell me,how to resolve this problem?

 

Thanks in Advance,

 

Thanks and Regards,

Srinivas Chittela

Message Edited by csrsak on 09-10-2009 02:40 AM

I would like SF to create a new case automatically when another one with certain conditions has been closed.

- Create a new case with custom case type and assign it to a queue.

- Closed case has to fill certain criterias: case type, some field values must match criteria, and so on..

 

How can this be done? I'm not able to do very complicated programming. Do you have any pointers on how to proceed with this task?

Hello

 

I'm a very new in all the salesforce business

i'm trying to make a new button in the account that will open me a new task with some data in the fields

 

 

Someone can help me ?

 

Thanks

Elad

 

 

Hi Does anyone know how to edit the following code to add 365 days to the close date of the new opp.

 

The Code i have so far:

try{

{!REQUIRESCRIPT("/soap/ajax/14.0/connection.js")}



// ** EDIT THIS QUERY TO LIST THE FIELDS YOU WANT TO COPY **

var result = sforce.connection.query("Select o.Type, o.StageName, o.Description, o.Amount, o.AccountId From Opportunity o WHERE o.Id = '{!Opportunity.Id}'");

var newOpp = result.getArray("records");



// Reset the Opp Id and reset fields to default values

newOpp[0].Id = '';
newOpp[0].Name = "Renewal - {!Opportunity.Name}";

// ** EDIT THESE FIELDS TO SET DEFAULT ANY VALUES **
newOpp[0].StageName = "Prospecting";
newOpp[0].CloseDate = new DATE((TODAY()-CloseDate)+365)
newOpp[0].Type = "Renewal"

var saveResult = sforce.connection.create(newOpp);

if (saveResult[0].getBoolean("success")) {
newOpp[0].id = saveResult[0].id;
alert("Renewal Opportunity Has Been Created.");
}
else {
alert("Failed to create clone: " + saveResult[0]);
}

// Refresh the page to display the new oppportunity
window.location = newOpp[0].id;
}
catch (err) {
alert (err.description );
}

 

But i am getting Undefined message.

 

Thanks if someone can help im sure its somthing simple i must be missing ?

 

 

Kind Regards,

 

Jake


Hi folks

Not sure if this is visualforce question or apex question in general. But I wanted to render a section of the page only when certain criteria are met. In this case, the criteria is when two fields in my object have specific value.

In my situation, I am using Case object and also using the case standard controller. And in my visualforce page, I want certain sections to be rendered if say:
field 1 contains any value - field 1 is a multi-picklist field
field 2 to contains a specific text value - field 2 is a text field.

I can get the render logic working when I am basing it off just one of the field:

for example:

<apex:form rendered="{!case.field1__c != null}">
this would work and the section would be rendered depending on if field1 (a multi-picklist field) contained any value.

Also,
<apex:form rendered="{!case.field2__c == 'specific text value'}">
this also work and the section would be rendered when field2 (a text field) contains the specific value.

However, I can't seem to get it working so that the section would be rendered only when both conditions are met.
I tried the following variations below but not seem to be working, can someone shed some light on this please?

<apex:form rendered="{ IF (AND(!case.field1__c != null,!case.field2__c=='specific text value'),true,false}">

<apex:form rendered="{ (!case.field1__c != null) && (!case.field2__c =='specific text value') }">