Hot answers tagged

8

To enable quote to opportunity sync'ing you have to set Opportunity.SyncedQuoteId to the quote id you want to sync with. From salesforce docs: public void startQuoteSync() { Opportunity opp = new Opportunity(); opp.setId(new ID("006D000000CpOSy")); opp.setSyncedQuoteId(new ID("0Q0D000000002OZ")); // Invoke the update call ...


7

It may seem simple and I'm sorry if I'm wrong, but I suspect you haven't enabled quotes for your org. It is not enabled by default, you have to manually do this step to use quotes. Setup -> Customize -> Quotes -> Settings -> Enable Quotes


7

Your issue is you are using quotes in two places for two conflicting use cases As RecordsetVar ​<apex:page controller="QuotePageController" recordSetVar="quotes"> As Getter in controller public void getQuotes() { QuoteList = new list<Quote>([SELECT Id, QuoteNumber, Name, Status from Quote WHERE Status =: StatusPickvalue]); } ...


6

There's no need to depend on organization data, and this just a Bad Idea™. Instead, create a new product, attach it to the standard price book, create a new opportunity with the standard price book, then create a new quote, and finally, a new quote line item. Regrettably, you still need SeeAllData for the price book. Example forthwith: Product2 pr = ...


6

I feel this has to do with the way salesforce has set up quote object, after looking around looks like there is no tab for Quotes making it pretty obvious building a list views/enhancedview is going to impossible. I may be wrong, but would happy if someone here can post a solution!!! Idea: https://success.salesforce.com/ideaView?id=08730000000I2Tj Update: ...


6

You can take help from below: controller : public with sharing class QuoteController { public Quote q {get;set;} public string qName{ get; set;} public QuoteController(ApexPages.StandardController sc) { q = new Quote(); q = (Quote)sc.getRecord(); } public Pagereference saveQuote() { q.name = qName; q.opportunityid = '0069000000OaWIM'; ...


6

I've found a solution by experiment (with a hat tip to @KeithC, who got me speculating on a productive path), but I don't understand why it works/the direct path doesn't work. I would be happy to accept an answer from anyone who's able to help me understand the principle behind the behavior. I was able to successfully complete the quote generation and ...


5

QuoteLineItem does not have a direct reference back to OpportunityLineItem. The Product and Schedule Objects ERD shows the relationships. While both objects have a Lookup to PricebookEntry that does not relate them in a way that would allow you to get from QuoteLineItem to OpportunityLineItem, since on PricebookEntry could be related to multiple ...


5

Service Contracts represent (per the doc) customer support agreements (warranties, subscriptions, Service level agreements) Service Contracts typically surface within Service Cloud interactions. Contracts are more like a B2B contract between you and a customer. They surface more in connection with closed won Opportunities in Sales Cloud. In one of my ...


5

This error is because you haven't added your product to a standard price book. To be used in custom price books, all standard prices must be added as price book entries to the standard price book. More info on Product object So you can modify your code like that: Pricebook2 pb = new Pricebook2(Name = 'Standard Price Book 2009', Description = 'Price ...


4

According to http://login.salesforce.com/help/doc/en/patches_creating.htm no new feature dependencies can be added when creating a patch. Is this the first time Quotes have been referenced in the package? If so that would make sense why the new feature dependency and hence you may need to look into developing as a new package version rather than a patch?


4

The way i handled this was by using the same javascript used in the standard create pdf button. Note you would need to change the summlid( which is the quotes templateId) This is hardcoded for now. Not sure if we can get the id of this dynamically if("{!Quote.Needs_Approval__c}" == true) { alert('Pls submit this Quote for approval'); } else { var ...


4

Do you have a custom controller for your Quote PDF generator? If not, you can easily create one by creating an extension of the existing one that has a boolean object linked to a checkbox. If the checkbox is true, then the PDF is created, if it's false, then the PDF is aborted. Before any work is done, the controller checks the status of the custom boolean ...


4

A bit of reverse engineering and the code behind the Create PDF button on the Standard Quote page reveals that it invokes /quote/quoteTemplateDataViewer.apexp?id=<QUoteId>&summlid=<TemplateId> Pasting this into the Browser sure enough renders the Quote similar to how it is rendered on clicking the Create PDF Button. Also, if doing this in ...


4

You can't do that. A web server can give the browser a clue about the filename of the downloaded PDF using the "Content-disposition" http header. But you can't provide a local folder name this way. Which makes sense if you think about it. Here we're talking about a web server trying to tell a browser where to store stuff on the user's drive. Not a good ...


4

It should work with an after insert trigger on the quote object. You check in the trigger if the quote meets your criteria and you also have the opportunity id which you can use to follow this method to get it synced http://hisrinu.wordpress.com/2012/03/28/syncing-quotes-using-apex-5/


4

You have used inputText instead of inputField. For lookup add Id in value. And you have to add all required fields in your vf page. Use the instance you created on your controller i.e. Record in your value as described below. The same you have to do for your other page. -----Vf Page ---------- <apex:page standardController="Order" extensions="Orders" ...


4

You need to reference the lookup field. Contact represents the relationship, which is always null in a trigger (you can query for it if you need it). The field you need to check is ContactId.


4

There are few thing which should be considered when using Contract:- Contract are signed for Organisation and signed by Contact of the Organisation. Opportunity can be associated with one Contract. Contract is parent of Opportunity. Once the Contract is activated it can be deleted or cloned but not deactivated. Order are also can be Activated and ...


4

In a parent query , you can use a child sub-query, formally known as a Left Outer Join: SELECT Id, (SELECT Id FROM QuoteLineItems) FROM Quote WHERE ... As a separate query: SELECT Id FROM QuoteLineItem WHERE QuoteId = :parent.Id


4

The getContentAsPDF call operates in a separate transaction. So if you make that call from within the transaction that sets up the data, that getContentAsPDF call will not see the data at all as the transaction that sets up the data won't have committed. Making two sequential calls from the Lightning Component - one to setup the data and then after that one ...


4

The Subscription Term on the Product and Quote are controlling different things. On the product, this is saying that a subscription product is priced at X cost for that term. If you have a product with a subscription term of 12 months and quote it on a Quote for 3 years, CPQ needs to take the 12 month price x 3. It is possible that you could select a ...


3

It's located in an object called QuoteDocument. The Document field contains the binary data (encoded in Base64), while the rest of it contains some basic information, like the total, quote ID, and so on. You'll need to pull this file out using the data loader, as it appears that the standard export doesn't include this data (at least, not by default). It ...


3

Same happens when you force going to Quote tab: https://instance.salesforce.com/0Q0 And for extra fun - try making a different listview: I wonder whether it's a "real" limitation / error or maybe my Dev Edition doesn't have some feature enabled (Customizable Forecasts and whatnot). So looks like you have to hand-craft everything from scratch, show rao's ...


3

One way to guarantee a child would be to query against the child object. SELECT PricebookEntry.ID FROM QuoteLineItem WHERE PricebookEntry.Product2Id IN:P2Valid LIMIT 1


3

Yes, you're going to have to store the ID as text. Currently lookups to OpportunityLineItem's aren't supported :( I've done this before using Apex to manage the lookups and it's worked just fine.


3

As @PeterKnolle pointed out, there isn't a relationship. Fortunately, there is a Force.com lab packages out there that can let you sync custom fields from opportunity line items to quote line items, we've been using it for a while without any major issues. It's rough if you look at the code, but considering the lack of maintenance it's very effective and ...


3

The reason it's because a Quote Object is always related to an Opportunity via a master relationship. It's a bit like Opportunity Product, you can't create a publisher action for that object too. I'm not sure what's your business logic, but you might create your publisher action on your opportunity instead, and with some logic redirect you to the right ...


3

Visualforce pages cannot reach out of their namespace using apex:include or apex:composition (this applies to both managed packages and the unmanaged c context) To do this we must leverage either a data model relation, or a global Visualforce Component, or an Apex controller class that pulls in the rendered page using PageReference.getContent()


3

Have you looked into the apex:relatedList tag yet? https://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_relatedList.htm If this is not a solution for you, please share your full VisualForce page. I think you've only copied the last two lines. You'll have a add a where-clause in your query based on the ID that you pass to the class in ...


Only top voted, non community-wiki answers of a minimum length are eligible