• MarioC
  • NEWBIE
  • 25 Points
  • Member since 2008

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 20
    Replies

I have a formula that adds 6 months to today's date, but it bombs out when we get to July...  The formula I currently have is- DATE( YEAR(TODAY()) , (MONTH(TODAY()+6)), DAY(TODAY()))

 

How can I get it to increment the year if it is July or after?  I will admit that date formulas seem to be the most confusing things to me. 

 

Thanks in advance.

  • March 24, 2009
  • Like
  • 0

I know this sounds simple, but I cannot figure out how to do it.  When a user creates a new account, the creator is automatically assigned as the owner of the account.  I have Customer Service Reps that create accounts, but need to assign the account owner to one of our sales persons.  Is there a way to do this on initial creation?  Without having to save it, then go back in and change the owner?

 

Thanks.

  • March 16, 2009
  • Like
  • 0

I have an issue I am hoping to get resovled soon.  On my page layouts for Opportunities, Opp Name and Close Date are required fields (as we all know).  I want to be able to automatically have the fields assigned a value wiothout user interaction.  I can create a workflow that does this, but then they still need to enter something in the fields in order for the workflow to run.  Can I use a trigger to assign the fields?  I would like the Opp Name to be the account name+date and time.  Then I would like the Close date to be today + 6 months.  I have the formulas already from the workflow, I just need to know if I should look to use a trigger- or something else.

 

Thanks, 

  • March 09, 2009
  • Like
  • 0

OK.  After months of trying to learn VF and Apex, I am starting to look at everything I did and I think I may have just complicated my life immensly.  I think I started with trying to do one thing, then that led to having to do this other thing and before you know it- things are starting to get really complex for me.  So I wanted to get a fresh take on what I am trying to do and I hope someone might help me with determining if I am on the right path or if I should start over from scratch.

 

Here is what I am trying to do and then I can say what I have done to date.  Just as a quick note- we use SFDC in US and UK, but we have different record types, page layouts, roles and profiles for both groups.

 

 

1. I need to re-create an Opp page layout so that if there are two specific fields selected, that a page section is shown with new fields (here are 5 possible variations of the same section). 

 

What I did-

I created a VF page that uses the render feature to add the section I need (code provided at the end of this posting).  That looks like it works for me, until I tried to implement it.  I cannot simply override the New/Edit/View buttons with it since we have the UK division that will not use this.  So I went and followed the cookbook on "how to override a page for some, but not all" and that worked to get the people to the VF page, but I cannot seem to get the rest of the users to hit the other OPP form- it only comes up blank (might just need to do more research on it, but the cookbook says it stays on the same page, which I would have thought would be the users standard page layout). 

2.  Would like to have the new VF page view override to be inline editable as the standard OPP form is out of the box, but there are going to be different sections that appear on the form based on the fields from part 1.  I think VF pages in view mode cannot be inline edittable (or so I read somewhere), so this might not be something I can do with VF.  Can I write some Apex code to select the pagelayout according to the fields that I have in part 1?

 

What I did-

I have gone and created a VF page with only OutputText fields so that the values can be seen, but the rendering piece is what I am not sure of.  How to render when you are in view mode and not edit mode. 

3. When viewing a contact, if I scroll to the related lists sections for Opps, and select New Opportunity- it opens the VF page but does not carry over the account and contact info from the contact I was in.  Is it possible to do this?

 

What I did- nothing yet..  just starting to look around

 

 

So, I have had no training on development, but I have been able to piecemail something that is somewhat working, but am I going after it in the correct way? 

Should I look to continue down the path, or should I look to use different page layouts instead of a VF page?  I probably am more comfortable using page layouts rather than VF, but can I do what I need with that?

 

I thank you for reading this long winded message and appreciate any feedback...  below is the VF page code that I am using for my new/edit Opp.

 

*The code is too long to add here, so you can see the code by going to this post- http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=10202&page=1

  • March 03, 2009
  • Like
  • 0

OK.  I have spent hours trying to figure this out, so I thought I would post up and ask for some assistance.  To begin, I have not had any training other than Admin- no development training.  My company is not looking to spend money on training- so i need to figure it out myself.  Here is what I am doing-

I needed to create a dynamic section on an opportunity page.  I created it using VF and it looks like I want it, but I am having difficulties taking the next step.  I am using the standard opp controller on my new VF Opp page, and I added it to the layout of one of my page layouts using the new Spring 09 page layout tool.  When I do a Preview As..it comes up with a grey empty box where the VF form should be.  

 

Now I have been reading about Force ide and using Eclipse, but I think that is only used if I am not going to us the standardcontroller for opportunities.  

 

Am I missing anything?  I am going to keep trying to learn, but I would appreciate it if anyone can help me out.

I would like to know how to make it appear, because I think once I do that- the rest is pretty much done...

 

Thanks in advance for any assistance.

Message Edited by MarioC on 02-21-2009 04:11 PM
  • February 22, 2009
  • Like
  • 0
Hi all...  this is my first question I am posting here.  I am new to SFDC and I hope this is a quick one.  I have a formula that I need to figure out.  I want to figure out this formula   = [(end of year date) - (expected close date)] * (Revenue Annualized/366)
So this pretty much calculates the amount of days left in the year and multiplies it by the daily Revenue...
 
I am sure this will be a quick one... I appreciate everyone's assistance.
 
Mario

I have a formula that adds 6 months to today's date, but it bombs out when we get to July...  The formula I currently have is- DATE( YEAR(TODAY()) , (MONTH(TODAY()+6)), DAY(TODAY()))

 

How can I get it to increment the year if it is July or after?  I will admit that date formulas seem to be the most confusing things to me. 

 

Thanks in advance.

  • March 24, 2009
  • Like
  • 0

I have an issue I am hoping to get resovled soon.  On my page layouts for Opportunities, Opp Name and Close Date are required fields (as we all know).  I want to be able to automatically have the fields assigned a value wiothout user interaction.  I can create a workflow that does this, but then they still need to enter something in the fields in order for the workflow to run.  Can I use a trigger to assign the fields?  I would like the Opp Name to be the account name+date and time.  Then I would like the Close date to be today + 6 months.  I have the formulas already from the workflow, I just need to know if I should look to use a trigger- or something else.

 

Thanks, 

  • March 09, 2009
  • Like
  • 0

OK.  After months of trying to learn VF and Apex, I am starting to look at everything I did and I think I may have just complicated my life immensly.  I think I started with trying to do one thing, then that led to having to do this other thing and before you know it- things are starting to get really complex for me.  So I wanted to get a fresh take on what I am trying to do and I hope someone might help me with determining if I am on the right path or if I should start over from scratch.

 

Here is what I am trying to do and then I can say what I have done to date.  Just as a quick note- we use SFDC in US and UK, but we have different record types, page layouts, roles and profiles for both groups.

 

 

1. I need to re-create an Opp page layout so that if there are two specific fields selected, that a page section is shown with new fields (here are 5 possible variations of the same section). 

 

What I did-

I created a VF page that uses the render feature to add the section I need (code provided at the end of this posting).  That looks like it works for me, until I tried to implement it.  I cannot simply override the New/Edit/View buttons with it since we have the UK division that will not use this.  So I went and followed the cookbook on "how to override a page for some, but not all" and that worked to get the people to the VF page, but I cannot seem to get the rest of the users to hit the other OPP form- it only comes up blank (might just need to do more research on it, but the cookbook says it stays on the same page, which I would have thought would be the users standard page layout). 

2.  Would like to have the new VF page view override to be inline editable as the standard OPP form is out of the box, but there are going to be different sections that appear on the form based on the fields from part 1.  I think VF pages in view mode cannot be inline edittable (or so I read somewhere), so this might not be something I can do with VF.  Can I write some Apex code to select the pagelayout according to the fields that I have in part 1?

 

What I did-

I have gone and created a VF page with only OutputText fields so that the values can be seen, but the rendering piece is what I am not sure of.  How to render when you are in view mode and not edit mode. 

3. When viewing a contact, if I scroll to the related lists sections for Opps, and select New Opportunity- it opens the VF page but does not carry over the account and contact info from the contact I was in.  Is it possible to do this?

 

What I did- nothing yet..  just starting to look around

 

 

So, I have had no training on development, but I have been able to piecemail something that is somewhat working, but am I going after it in the correct way? 

Should I look to continue down the path, or should I look to use different page layouts instead of a VF page?  I probably am more comfortable using page layouts rather than VF, but can I do what I need with that?

 

I thank you for reading this long winded message and appreciate any feedback...  below is the VF page code that I am using for my new/edit Opp.

 

*The code is too long to add here, so you can see the code by going to this post- http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=10202&page=1

  • March 03, 2009
  • Like
  • 0

OK.  I have spent hours trying to figure this out, so I thought I would post up and ask for some assistance.  To begin, I have not had any training other than Admin- no development training.  My company is not looking to spend money on training- so i need to figure it out myself.  Here is what I am doing-

I needed to create a dynamic section on an opportunity page.  I created it using VF and it looks like I want it, but I am having difficulties taking the next step.  I am using the standard opp controller on my new VF Opp page, and I added it to the layout of one of my page layouts using the new Spring 09 page layout tool.  When I do a Preview As..it comes up with a grey empty box where the VF form should be.  

 

Now I have been reading about Force ide and using Eclipse, but I think that is only used if I am not going to us the standardcontroller for opportunities.  

 

Am I missing anything?  I am going to keep trying to learn, but I would appreciate it if anyone can help me out.

I would like to know how to make it appear, because I think once I do that- the rest is pretty much done...

 

Thanks in advance for any assistance.

Message Edited by MarioC on 02-21-2009 04:11 PM
  • February 22, 2009
  • Like
  • 0

As discussed in Ideas (http://ideas.salesforce.com/article/show/69729) here's a solution we have used for clients to enable customisation of the Clone button on Opportunities. This can be used to selectively choose which fields to copy and set default values:

 

For full details and the code to clone opportunity Line Items please contact me directly. We will be re-writing this in VisualForce over the coming months to make it futureproof.

 

Steps to Implement - Admins only

1. Setup -> Customize -> Opportunity -> Buttons and Links

2. Create new custom button called Clone, behaviour is Execute Javascript, Display Type Detail Page Button.

3. Paste in the code below and edit to match your requirements.

4. Remember to add the new button to the Opportunity page layout(s) and hide the original Clone button.

4. Test!

 

// Copyright 2008 BrightGen Ltd - All Rights Reserved 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.Product_Type__c, o.Planned_Opportunity__c, o.MarketSector__c, o.CampaignId, o.Business_Unit__c, 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 = "Clone {!Opportunity.Name}"; // ** EDIT THESE FIELDS TO SET DEFAULT ANY VALUES ** newOpp[0].StageName = "1. Prospecting"; newOpp[0].CloseDate = new Date(2099, 0, 1); var saveResult = sforce.connection.create(newOpp); if (saveResult[0].getBoolean("success")) { newOpp[0].id = saveResult[0].id; alert("Opportunity cloned without line items"); } 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 ); }

 

 
Message Edited by bg_richard on 02-05-2009 07:11 AM
Hi all...  this is my first question I am posting here.  I am new to SFDC and I hope this is a quick one.  I have a formula that I need to figure out.  I want to figure out this formula   = [(end of year date) - (expected close date)] * (Revenue Annualized/366)
So this pretty much calculates the amount of days left in the year and multiplies it by the daily Revenue...
 
I am sure this will be a quick one... I appreciate everyone's assistance.
 
Mario