An Opportunity is a Salesforce Standard Object that represents a sale or pending deal.

learn more… | top users | synonyms

1
vote
1answer
19 views

How Can we create a trigger that updates a counter for closed won consecutive opportunities?

We are thinking to have a field under Contact Object that counts the number of consecutive won opportunities. If the Opportunity has the stage "Failure" the counter must be updated to 0 but if it has ...
2
votes
0answers
30 views

Code coverage is 70% and I get a DUPLICATE_VALUE issue

Code coverage is 70% and when I dive into the problems I get a duplicate error. Please help I am new to writing triggers. Thank you ahead of time! Problem on several Lines Message: [object ...
3
votes
1answer
33 views

Why can't the Opportunity amount be changed by a trigger?

I have more than one discount field in opportunitylineitem, so I created a custom field that sum all opportunity products total__c. But I need see amount in forecasts, so I created a trigger that ...
1
vote
1answer
11 views

Set custom Opportunity fields in convertLead()

I'm fairly new to Apex/Visualforce and I'm a bit stuck here. I have a custom Visualforce page and Apex controller for a Lead Convert button in which a new Opportunity is converted, and I'm trying to ...
0
votes
1answer
24 views

Override Standard Save button on Opportunity Object

I have the below scenario to achieve : At the time of saving the Opportunity record, I want to invoke a webservice call to the external system. If the response of the call is greater than some ...
3
votes
1answer
23 views

Cannot find product to add to Opportunity

I have crated few products. Now I cannot find them when I am trying to add them to the Opportunity. Products are active. They are added to a Price Book. Price Book is also active. Any idea what is ...
3
votes
2answers
65 views

Trigger to update opportunity stage based on Account Status

I have a trigger that updates/ inserts opportunities when the account is created. This was implemented by a third party. Now I would like to update the opportunities to Cancelled when the Account ...
2
votes
1answer
30 views

How to count OpportunityLineItems left in an after delete OpportunityLineItems

I have a trigger on the OpportunityLineItem acting after delete. From that trigger, I want to query all the Opportunities associated to the OpportunityLineItems deleted to see if they still have other ...
0
votes
0answers
28 views

How can i populate the values in a related list i.e Schedule of an opportunity line item

I have an opportunity object ,with the related list as products.We do have different products with their sales price ,quantity ,list price etc.Now when i click on one of the product name ,it takes me ...
2
votes
0answers
21 views

Having a Visualforce page inside of a standard page results in duplicate main.js

I have a custom Visualforce page rendered inside of a standard page Opportunity in one of my layouts. I was researching some performance issues when I noticed that 2 main.js files are travelling down ...
1
vote
1answer
33 views

Dynamically populate the value of pricing request instead of date column

I have an opportunity object ,with the related list as products.We do have different products with their sales price ,quantity ,list price etc.Now when i click on one of the product name ,it takes me ...
0
votes
1answer
14 views

Is it possible to programmatically customize a Customizable Salesforce Forecast?

I'm working on a project where the client wants the following: Somewhat different from SFDC's native concept of a committed Opportunity, the Opportunity should be set to "Committed" if it exceeds a ...
0
votes
0answers
8 views

Getting Opportunities without Partners

Could someone give an idea to retrieve Opportunities without having a partner in salesforce using SOQL or Apex? I have many duplicate opportunities and want to filter out those without having any ...
0
votes
2answers
25 views

Advanced currency feature is effect for child object of opportunity object?

When we enable advanced currency feature is it effect for currency fields on the child object of the opportunity object?
0
votes
1answer
19 views

How to create OpportunityPartner object to test OpportunityPartner functionality?

I want to write some tests to check a logic, related to OpportunityPartner object. The logic reads OpportunityPartner for Account, then reads it's Contacts. partners = [ SELECT OpportunityId, ...
0
votes
0answers
44 views

Error using ExternalID to reference Opportunity when loading Quote via DataLoader commandline

I am getting an error that states "Required fields are missing: [OpportunityId]" when I try to upsert some Quote records via the DataLoader command line (part of a nightly data load process). The ...
2
votes
1answer
39 views

triggers on opportunity stage and probability to prevent the opportunity stage from regressing to a lesser value

For example, probability is high like 70% and it will not revert back with decreasing of probability. Like negotiation review - 90 And it will not back to Value proposition - 50
1
vote
0answers
38 views

Customize Opportunity - Related List Stage History

I have a requirement where I need to add fields in stage history related list. Please help me.
0
votes
1answer
44 views

Update Opportunity stage based on related list

I'm looking to update the opportunity stage based on a field in a related list. My opportunity is linked to the school, and the opportunity has a related list of teachers. We often have several ...
3
votes
1answer
59 views

Is it possible to create a flow that creates an opportunity and an event from the account screen?

I am building out a new SFDC org for my new company and i want to use flows to try to cut down on my users using multiple objects, i have tried this in the past but a few years back in a different ...
1
vote
1answer
29 views

What are the possible ways to ARCHIVE the attachments in Salesforce?

Scenario : Some attachments specific to an opportunity are available under Notes and Attachments of the the Opportunity . Out of those set of attachments,some are obsolete and hence would like to ...
0
votes
2answers
40 views

How To Clone Opportunity With Extra Related Custom Objects

Each Opportunity in our Salesforce system may have zero or more related Opportunity Items which are custom objects. The relationship and use of Opportunity and Opportunity Items is like Orders and ...
1
vote
2answers
44 views

Can we Display a Error Message on Standard Detail Page of Opportunity on Load

I have a requirement on Loading Standard Opportunity Detail Page, if Opportunity Amount is greater than certain value say 500K i need to display a message on top of page. is it possible without ...
0
votes
2answers
84 views

How to create a YTD comparison of This and Last year sales?

I need to compare YTD sales of this and last year sales. How can I achieve that with a simple formula field on the opportunity object? YTD = Year - To - Date - e.g.: all sales until this date. (and ...
1
vote
2answers
49 views

Opportunity is not saving

I'm just trying to create a simple form to save an Opportunity. For some reason, the page isn't saving and not giving me any console errors. Here is the code: <apex:page showHeader="false" ...
0
votes
0answers
15 views

Probability and forecasting fields are not filling by default in Custom Opportunity VF page..?

In Custom VF Page for Opportunity, when selecting Stage field.. Probability and forecasting fields are not filling by default. In Standard Opportunity page, if we select Stage field.. by default ...
1
vote
1answer
36 views

Opportunity Amount field rollup lifecycle

I recently experienced odd behavior where a trigger depending on the the Opportunity.amount field was not picking up the correct values from the amount field even though the context was after update. ...
0
votes
0answers
19 views

Calculate the total forecast revenue for the current year & display in Opportunity field

I am trying to display the revenue forecast for the current year on each Opportunity. The annual total needs to be the sum of the monthly revenue values from the forecast. Can this be done or can the ...
1
vote
2answers
64 views

How do I copy products from one Opportunity to another in apex

So I have a trigger on Order in a certain condition I need to create another opportunity based on the Order's current opportunity. It was pretty straight forward except for getting the products to ...
2
votes
2answers
24 views

Price books only work with opportunities?

Is there a way to use price books without opportunities? I'm working on a small project for a local hotel and the hotel charges different rates for rooms based on day of week and/or weekend, ...
1
vote
2answers
33 views

Change Opportunity's owner without validating Opportunity's fields?

I want to change Owner of an Opportunity (an owner of an opportunity left company and all his opps need to be transferred to another user). Is there any way it can be done without validating record? ...
3
votes
1answer
51 views

Apex Triggers to solve my Opps and Contracts problem

Following from my previous question I'm still trying to link Opportunities and Cotnracts together and report on them. Firstly, I now have a lookup relationship between Opportunities and Contracts so ...
1
vote
1answer
59 views

Opportunity Access for customer community and customer community licenses

I can't show opportunity tab to customer community and customer community licenses users. And on the profile level there is no any option for this. I read the documents and type of licenses and ...
0
votes
1answer
18 views

As admin assign permission to users

I am the admin of an app and have created users. I wanna give permission to one of my users to be able to create opportunities. How to do that?
2
votes
3answers
98 views

How to query open opportunities using the SOAP API

I want to query open opportunities, but do not know the api name of the field. In the Opportunities report one can set Opportunity status in the top middle to be Closed, Closed Won, Open, or Any. ...
0
votes
1answer
28 views

Opportunity Conditional Automation

I'm really unsure how to go about the following validation rule based on a certain condition. My issue is, If Sole Proprietor is selected from the Win Reason drop-down, i.e. ISPICKVAL(Win Reason, "No ...
0
votes
1answer
28 views

Opportunity Validation

I'm trying to perform some validation on my opportunity page and I'm having difficulties. The following is the scenario.. If stage = close won (100%) or closed lost (0%) AND competitor = not known at ...
2
votes
1answer
33 views

Create Record (CObject) from OpportunityLineItem when Opportunity is Closed Won

I'm trying to create a record of each item in the Opportunity when an Opportunity is Closed Won. OpportunityItemList: Date (Date) Product2 Lookup(Product) ExpiryDate__c (Date) ...
1
vote
2answers
88 views

Can't change Opportunity owner from Trigger because Error record is 'read-only' [duplicate]

This is supposed to be a simple trigger that changes the Opportunity Owner to the the Account Owner upon insert or update of the opportunity. However, I keep getting the error, cannot update the ...
0
votes
0answers
73 views

Opportunities and Contracts - ideas welcome!

Morning all, I would like to pilfer your collective brains if possible. I've also asked the question on the Salesforce Ideas Exchange but thought it was best to double up. In my org, when we have a ...
1
vote
0answers
114 views

Insufficient Privileges as System Administrator on Opportunity

I am the System Administrator (Standard Profile) and receiving Insufficient Privileges error when trying to access Opportunity fields. "Insufficient Privileges You do not have the level of access ...
2
votes
1answer
47 views

Query Opportunity join on Partner account lookup (Join two quries)

I have two queries, how can I join both together into one SOQL? SELECT o.Partner_Account__c, o.id, o.name, o.Account.Id, from Opportunity o SELECT a.id, a.name from account a where a.id = ...
1
vote
2answers
86 views

Could an opportunity exists without products? What is the use of it?

I am having a confusion whether an opportunity can exists without products. If such an opportunity exists then what would be the use of it in the context of business perspective? If i recall correctly ...
3
votes
1answer
87 views

How can I get the opportunity owner label?

Simple question. How can I get the opportunity owner label name? I tried the following code but it isn't working. An error occurred. {!$ObjectType.Opportunity.fields.Owner.label} I cannot use the ...
2
votes
1answer
37 views

Add phone field to opportunity page layout?

Is it possible to add a phone field to the Opportunity Page Layout? Screenshot of me trying. No phone fields available - http://screencast.com/t/Uj4lgBEWTcS​ I don't think that it is possible. I ...
0
votes
0answers
46 views

Looking for a way to update a field on an Opportunity Product when a field on the Opportunity is checked

We have a start date on the Opportunity Product that we would like to be able to automatically update to the close date on the opportunity only some of the time. We thought that a check box giving the ...
0
votes
1answer
63 views

HttpCalloutMock in test class fails only if insert an opportunity: You have uncommitted work pending. Please commit or rollback before calling out

Error: You have uncommitted work pending. Please commit or rollback before calling out. Problem: I have a callout request which works only if I don't inserting an opportunity before it in test class. ...
0
votes
0answers
15 views

Access to Partner when the Account added as an Partner to Opportunity

I have a requirement where whenever a Account is added to an Opportunity and if that Account is enabled a partner, then to give access to the Partner users of that Account access to the Opportunity. ...
1
vote
2answers
26 views

disable Opportunity.amount RSF calculation when opportunity products exist

I need to know how to disable the amount field calculation on the opportunity detail so that it is not active when a product is entered OR disable pricebooks. One of the other. Any ideas.
2
votes
1answer
51 views

How to close a task on test method?

I have a opp which contain a task. My scenario is when task is closed on opp update with new task from a lookup field temp on opp(this lookup to another opp) . I have wrote a test class when task is ...