Questions tagged [opportunity]

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

Filter by
Sorted by
Tagged with
43
votes
2answers
79k views

How to fix insufficient access rights on cross-reference id?

I am getting the error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: [] Scenario is, I am inserting an Opportunity and then Opportunity Line ...
25
votes
9answers
27k views

Is it possible to remove/hide the “New” button?

When you click on the Opportunities tab, (assuming you haven't modified standard salesforce layout), you see a "Recent Opportunities" list. At the top of the list, there is a "New" button. Is there ...
22
votes
1answer
2k views

Refresh lightning component Opportunity page on Stage progress bar

I have a lightning component on the opportunity layout. I want it to refresh on stage change. Currently, it works when you change the stage using the edit button using the following code. <aura:...
9
votes
3answers
13k views

Make Validation Rule bypass if TRIGGER is run?

Is there a way to make a Validation Rule BYPASS via it's logic when a Trigger is doing it's job? I've already tried various methods including setting a hidden field on the object in the Trigger (can'...
9
votes
1answer
4k views

How can i query for the type in opportunity stage?

How do i query for all opportunities which has the type "Closed/won" on opportunityStage not the stage "Closed/Won". We have a few stages which are of Type Closed/Won but not with the stagename as ...
9
votes
1answer
16k views

INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access rights on cross-reference id: [] on opportunity

I have created an object named as "Component" which has Master-Detail Relationship with Opportunity Object. On Opportunity we have a button says "Create Component", when user clicks on it it takes ...
9
votes
2answers
5k views

Can we delete records in share table with row cause as Rule?

delete [Select o.UserOrGroupId, o.RowCause, o.OpportunityId, o.OpportunityAccessLevel, o.Id From OpportunityShare o where RowCause='Rule' and o.OpportunityId='######']; Trying the above and looks ...
8
votes
1answer
727 views

How to make field visible only when opportunity reaches 90% probability

I have a requirement where i have to make some field visible only when the probability reaches 90 %. Field is on opportunity Is doing through workflow rule is the best way to do that. Or any other ...
8
votes
2answers
7k views

Sending Email using Email Author in custom button

I have tried this code for custom button for single click email sending. Unfortunately it is not working and returns an error. Could anyone tell me what I am doing wrong and correct me please. Thank ...
8
votes
1answer
10k views

Relation Between Opportunity Products and Opportunity Line Items

I read about Opportunity Object and OpportunityLineItems and sub object in Opportunity named Opportunity Product Object.Is OpportunityLineItems and Opportunity Products are same thing or different?? ...
7
votes
2answers
12k views

How to query Products by Opportunity?

I want to query products only related to particular opportunity. And I tried this using sub-queries but I was able to retrieve PricebookEntries related to Opportunities. I'll hit a dead end if I tried ...
7
votes
2answers
6k views

Using Apex Managed Sharing to share an opportunity

Here's the use case. When a lead is converted to an Opportunity, I want to automatically share the opportunity with the previous owner of the lead. This is needed because upon conversion, the ...
7
votes
6answers
17k views

Run Trigger As A Specific User (or Profile)?

Is this possible? I'm not finding help, Google or otherwise, for this. Situation: A trigger runs and cycles through groups of Opportunities. Some of these Opportunities are Closed Won, and most ...
6
votes
2answers
8k views

How to get Opportunity Stage History SOQL

What is the best way to get Opportunity Stage Change History using SOQL? Basically, what I need is the same list as in Opportunity page in Salesforce, where list of stages and dates of modifications ...
6
votes
2answers
3k views

Required fields are missing:

I am writing a test class. When i run my test class i am getting an error System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are ...
6
votes
1answer
2k views

How to Change the Opportunity Amount

Once I add Products to the Opportunity I can no longer edit the Opportunity's Amount field. Is it possible to change that amount so that it is saved on the Opportunity as a different amount? Possibly ...
6
votes
1answer
2k views

Account Owner changes Opportunity Owner?

Q1: When I change the owner of an Account record to UserA, the associated Opportunity record's owner is set to UserA automatically. Is it a native behavior? (I checked all the workflows and account ...
6
votes
2answers
2k views

Cases related list on Opportunity for person account shows the same cases

I wanted to have an ability to associate an case with an opportunity. So i created a lookup field on cases to opportunity and added the cases related list in opportunity page layout. The issue i am ...
6
votes
1answer
718 views

Account lookup on Opportunity not filtered correctly from Visualforce page

Visualforce Our organization uses a Visualforce page to override the New Opportunity action. Below is a functional sample of the Visualforce page that specifies the Account lookup field and ...
6
votes
1answer
2k views

Copy Opportunity Products to Contract Line Items

I have created a flow does several actions: create a new Service contract with user input (start date, end date, name) create a new license key to send to end user change the opportunity to closed ...
6
votes
2answers
1k views

Why does Salesforce not have an out-of-the-box option to merge opportunities?

In our org we regularly end up with duplicate opportunities due to small problems in our API integration (out of my control, unfortunately, but I am responsible for much of the de-duping -- hence my ...
5
votes
3answers
9k views

Upload and attach a file to an account or opportunity

So I was wondering how I can attach a file to an account. Basically what we do is sell a product online that requires an agreement. When they buy the product, we generate a pdf of the agreement and ...
5
votes
1answer
8k views

How do you change an Opportunity's Record Type in the web UI?

Originally our org only had one record type for opportunities but we've since added a second. I want to manually change a few opportunities to this new type. However, the Opportunity Record Type field ...
5
votes
3answers
673 views

Apex CPU time limit exceeded

I am experiencing an Apex Cpu Limit and as per checking am I correct that it is in the opportunitytrigger? shoudl I optimize it more? if(Trigger.isBefore){ if(Trigger.isInsert){ ...
5
votes
5answers
4k views

How can I identify whether an Opportunity is a renewal?

My sales team would like a clear flag on Opportunity records indicating whether the Opp is a renewal or a new opportunity. The information should be displayed on the Opp record, and also available ...
5
votes
2answers
294 views

Add app in Opportunities page

You are building an app for Salesforce and you want to add the app container in Opportunities page, like Evernote app does (see image below). How you can do that? Best Regards, Fabrício Ferrari de ...
5
votes
2answers
3k views

Is it possible to add products to an opportunity using the standard price?

Salesforce wants me to choose a price book in order to add products to an opportunity, but our organisation has opted not to use price books because we never deviate from the standard price. However ...
5
votes
1answer
42 views

When Advanced Currency Management (ACM) is enabled, is there a way to bypass the default 2 trailing zeros?

With ACM enabled, it defaults currency fields to have 2 decimal places. My client is in the manufacturing industry and they require 4 decimal places. Enabling ACM is necessary for this project due to ...
5
votes
3answers
2k views

Prevent Stage Skipping But Allow Regression

I'd like to prevent users from "skipping" Opportunity Stages, but not from reverting the Stage back. For example, I do not want a user to advance to Stage 5 without having been in Stage 4 immediately ...
5
votes
2answers
438 views

Is there a way to set SystemModstamp on a newly created SObject in a unit test?

I need to create a SObject in a unit test with the SystemModstamp set. I've been using Opportunities in my unit test, but I am not tied to that specific SObject. I also am not tied down to ...
5
votes
1answer
986 views

Locking Opportunity Splits

We are looking to enable opportunity splits (enabled in summer 13). Anyone using this along with some approval/lockdown mechanism? Goal would be to prevent the changing of splits once agreed upon. ...
5
votes
1answer
500 views

LastModifiedDate on Parent Opportunities

If we edit the Parent Opportunity (Parent_Opportunity__c) field On an opportunity, It was observed that LastModifiedDate of both parent and child opportunity get updated.Last Modified Date was getting ...
4
votes
2answers
5k views

How to Link to a Record View?

Is there a way I can make an Opportunity hyperlink? In the code below, I want the user be able to click and view their own Opportunity records. Extension public with sharing class OppExt { ...
4
votes
3answers
3k views

What are the implications of an Opportunity without an Account?

I see that you can make an Opportunity without an Account: http://www.screencast.com/t/kjElV8BEf39 What are the implications of creating an Opportunity without an Account? I'm considering it for ...
4
votes
2answers
8k 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 ...
4
votes
1answer
3k views

How to upload an Excel file into ContentVersion Object

I need to upload an Excel file on an opportunity. I want to user ContentVersion standard object to store these excel files. Can anyone please explain or share a code snippet to show how can we ...
4
votes
1answer
3k views

How to customise columns in Add Products popup

Question How do I customise the columns that appear in the Add Products popup which appears if you click the Add Products button on the Products related list on the Opportunities record page? What I'...
4
votes
1answer
8k views

Relationships of Opportunities, Quotes, Contracts and orders

We are using Opportunities, quotes, Contracts and Orders in our Org. This is a brand new instance of Salesforce and we are in the process of streamlining the sales and order process. The proposed ...
4
votes
2answers
2k views

How to get Opportunities from Contacts

I am trying to get Opportunities from Contacts but hitting the below error: Save error: The configuration of your org has changed, please reload the page. Missing dependent object: Field: ...
4
votes
1answer
736 views

Different currencies in the same opportunity

it's possible to have different currencies in one opportunity? for example: line item 1 $USD line item 2 $MXN Thanks
4
votes
2answers
4k views

Access ListView via REST API

I am trying to use the REST api to access Opportunities in SalesForce. I seem to be able to do this quite easily with a call to services/data/v26.0/sobjects/Opportunity/ and enumerating over the ...
4
votes
1answer
906 views

How to convert leads without setting opportunity to closed won?

Whenever I convert Leads, and create an Opportunity on the go, all these Opportunities get the status Closed Won. I could not find where to change that, as it's obviously nonsense. How to change that?...
4
votes
2answers
6k views

After Delete - Need To “Cleanup” When An Opp Is Deleted

I have a hole in the logic of a huge Trigger that "piggybacks" data from Opportunities to Account (summarized). If someone touches an Opp, this trigger fires and checks ALL OPPS under that Account ...
4
votes
1answer
14k views

REQUIRED_FIELD_MISSING, Required fields are missing: [Name]: [Name]

when i trying to insert opportunity in my testclass i am getting an error Test_opportunityTrigger.Test_opportunityTrigger: line 24, column 1 22:28:17.312 (312087000)|FATAL_ERROR|System....
4
votes
4answers
304 views

How to translate “Closed” in Opportunity?

How do I change the textual value of 'Closed' to "I like cheese" in English, and 「チーズが好き」 in Japanese? "Closed" isn't an actual stage, so it's not in the "Stage" picklist translations: And I've ...
4
votes
1answer
2k views

Using the REST api to create parent and child records in a single http request

I know that it is possible to insert Orders and Order Products together with a single HTTP request: Salesforce Place Order REST api p23 But when trying the same basic thing with Opportunities, I'm ...
4
votes
1answer
1k views

How to associate contacts to opportunities?

I need to associate Contacts to Opportunities. One way will be to delete/hide the "New" button, and only leave it on the contact page: That's not acceptable by sales/marketing team. So, what's my ...
4
votes
1answer
1k views

Creating Sharing Rules on run-time(While opportunity is being saved/edit) using apex code

Is it possible to create sharing rules at run-time? If yes then please explain how can we do that in save method/trigger? Actually i need to bypass role hierarchy setting and for that i need to ...
4
votes
1answer
1k views

Cyclic Trigger Calls

I am trying to stop a cyclic situation between two triggers. Trigger B is the primary - it runs when an Opp is edited (to put some data on the ACCOUNT). Trigger A was written so that if the Account ...
4
votes
1answer
3k views

Process Builder Sandbox vs. Production

I've created a process in Process builder to coincide with a workflow. The idea is to create a new opportunity ( time based ) once the criteria is met after the workflow has been triggered. For ...

1
2 3 4 5
19