• Mandy_in_MN
  • NEWBIE
  • 30 Points
  • Member since 2009

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies

Hi,

 

My company needs at least one Quote on every Opportunity we sell.  It would be a big advantage to us to have a Quote be automatically created and synched when the user creates an Opportunity.  We really want to get the Quote Number right away.  The majority of our Opportunities only need one quote, and products can be added later.  

 

Here's how I think we could approach it:

1. Automatically create a Quote for every new Opportunity
2. Automatically Synch that Quote to the Opportunity
3. Add a formula field to the Opportunity to display the Synched Quote Number 

I have Steps 1 and 3 working in my Sandbox, thanks to a previous post, but I'm getting stuck on Step 2.  

 

Automatically Creating a Quote when a New Opportunity is created.  This part is working:

trigger QuoteCreator on Opportunity (after insert) {
for (Opportunity o : Trigger.new) {
Quote q = new Quote();
q.name = 'P-' + o.name;
q.opportunityId = o.id;
insert q;
}
}

 

Attempt to Automatically synch Quote by adding one more line "q.issynching = true."  This part is NOT working :

trigger QuoteCreator on Opportunity (after insert) {
for (Opportunity o : Trigger.new) {
Quote q = new Quote();
q.name = 'P-' + o.name;
q.opportunityId = o.id;
q.issynching = true;
insert q;
}
}

 

I'm getting a message that tells me issynching for SObject Quote is an invalid field.  

 

Has anyone run into this before?  Is it even possible to set a Quote to Synch using Apex?  

 

Thanks.

Mandy

 

I installed CMSFoce 2 following the Guide instructions.  I created a web form to collect leads.  When I click "save & preview," it works correctly.  However, when I test the web form outside of preview-mode, I'm redirected to an error page and my lead data does not save.  Has anyone seen this before?  I've tried recreating the web form and page multiple times.  

 

I have also given this site rights to create leads.  Are there any other rights or preferences I'm missing?  

 

- Mandy

I installed CMSFoce 2 following the Guide instructions.  I created a web form to collect leads.  When I click "save & preview," it works correctly.  However, when I test the web form outside of preview-mode, I'm redirected to an error page and my lead data does not save.  Has anyone seen this before?  I've tried recreating the web form and page multiple times.  

 

I have also given this site rights to create leads.  Are there any other rights or preferences I'm missing?  

 

- Mandy

I am very new to APEX, triggers and classes and trying to create a trigger that will create a new quote record when a new opportunity has been created. (I would like the quote name to be "Quote-"+the opportunity name.)
 
I'm sure this is a very basic code but I am having a hard time getting my bearings straight.
 
Would someone be willing to share how this code would be written.
 
thanks in advance
 
Ben 

I have a custom formula field (text)

 

Formula is: HYPERLINK("/"& WhatId, "Detail Link")

 

It appears as this clickable link which takes you to the account detail page.

Detail Link

 

Does anyone know if and how I can update the formula so that instead of the static name "Detail Link", it can dynamically update to the Account Name value?


Thanks

  • September 11, 2009
  • Like
  • 0