Questions tagged [opportunity]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
15 views

Onclick javascript - How to pass count of records from webservice method to JS button

I am writing logic on new Quote button Opportunity , where the new quote button should display error based on related list available or not. related list is an other object which has OppId associated ...
0
votes
0answers
14 views

Restricting picklist values on Opportunity, when field is a formula text

I have a situation not sure how to solve. Trying to make a pick list field with 4 choices for all users except Administrator and 2 specific users. There will be 15 other choices for Administrator ...
0
votes
0answers
19 views

Is it possible to create OpportunityContactRole when a new Contact is created? [closed]

We are stuck at a particular issue. Accounts have Opportunities (most of the time only one Opportunity) but the Contact Information on the Accounts come a little later after the Opportunity is created....
0
votes
1answer
17 views

Salesforce - Log a call/create a task under an Opportunity via API call

Whenever I open up an Opportunity, under the Activity tab there are 3 things which I can do Log a Call New Task New Event Is there any API documentation to do so via an API call? I've searched high ...
2
votes
1answer
31 views

Why can't I query Opportunity.ContactId's related fields?

When I run the following SOQL query: SELECT Id, ContactId, Contact.LastName FROM Opportunity I get the following error on the Contact.LastName field: System.QueryException: Didn't understand ...
2
votes
1answer
49 views

Opportunity close date is not being set to today when closed while close date is in the future

We are implementing an override of the close date functionality. By default, opportunities that are closed and have a close date set to the future get their close date set to today. We want this to ...
2
votes
1answer
25 views

Only display certain fields based on Opportunity Stage?

We have a use case where we wanted to display certain fields based on the Opportunity stage. As the opportunity progresses through its lifecycle, more and more fields will be required. Has anyone ...
-1
votes
0answers
25 views

how to set product family in apex class?

I want to set the product family of product in apex class but when I use the statement pr.Family='XYZ'; it is giving error that types not compatible. What can I do to fix this?
1
vote
1answer
25 views

How Can I keep a Task from changing assignee when its parent opportunity changes owner?

Our BDRs have a workflow where they create a task on an opportunity and search from a spreadsheet an AE with whom to set up a meeting with the customer. We want to remove the need for a spreadsheet ...
0
votes
2answers
54 views

how to create a trigger that will run when any opportunity line item is added or deleted from the opportunity? [closed]

I am new to apex programming and trying to learn it these days. I want to create a trigger that will run every time an OLI is added or removed from the opportunity. Which standard object is ...
0
votes
2answers
20 views

Not equal to comparison operator does not work

I have a list of opportunities that I fetched via SOQL query. I am trying to check if any of the fetched opportunities is 'Closed Lost' or 'Closed - Lost'or 'Completed' or 'Closed Won'. If not, then I ...
0
votes
0answers
19 views

I´m not able to set Closed Won and Opp

Today, I had a message error... and actually everything is ok in our org. In my case, the opp had been approved for somebody that is no longer in the company.. but all the steps before take as ...
1
vote
3answers
62 views

How to allow OpportunityLineItem delete but not Opportunity delete

How can I stop users from deleting Opportunity's but allow them to delete OpportunityLineItems? Because OpportunityLineItem is a child record of Opportunity it is not possible to control it's object ...
1
vote
1answer
27 views

Get list of contacts associated with an opportunity

I created a ruby on rails service that emails a list of contacts when an opportunity is closed. To do this, I am trying to get all contacts associated with the Opportunity that was just closed. ...
1
vote
0answers
26 views

Selecting the Opportunity Price Book

I'm still fairly new to Salesforce Apex and trying to figure out how to select a price book from the opportunity. The reason being I have a trigger which adds in a product when the opportunity is ...
0
votes
0answers
18 views

Cannot find records in OpportunityShare

I have granted a User access to an Opportunity record through an Opportunity sharing rule. Now I can see in the UserRecordAccess Object that the User has access to this particular Opportunity record. ...
0
votes
0answers
14 views

Is it possible to create a report with Stages on columns with dates they moved into that stage below?

I'd like to create an opportunity report, which shows the stages across the top (columns) and beneath those, the dates for which the oppy entered that stage. Here's a rough mockup: Oppy Name ...
1
vote
0answers
25 views

Custom translation for Type in Stage Opportunity

Is that possible to translate this type of stage Open and closed
0
votes
3answers
44 views

IF Formula on Opportunity Date

I'm sure this is ridiculously simple. I'm trying to put Opportunities into groups based on Age This is the formula I've written IF(Opportunity_Age__c < 100, "Short Term", IF( OR( ...
0
votes
0answers
14 views

after adding product to opportunity line item, the product do not display until and unless refresh the page

I have Embedded the Visualforce page on the Add Product button in lightning experience. when I am adding the product to opportunity, after adding I need to manually refresh the page again to appear ...
1
vote
0answers
39 views

How to populate value when trying to create record from quick create

I have a custom object (XYZ__c) lookup on Opportunity. When I am creating an Opportunity, I can create a new XYZ__c record from quick create on the Opportunity page layout. There is an Account lookup ...
0
votes
2answers
32 views

Trigger Update Opportunity

I have a very simple trigger which is working fine in the sandbox but it doesn't work in the production. If someone change the owner of the opportunity or add a new opportunity the customfield ...
3
votes
1answer
245 views

Bulk API Error: UNABLE_TO_LOCK_ROW:unable to obtain exclusive access to this record or 124 records

During the process of loading 90,000 opportunities into Salesforce using the Bulk API, I get this error: UNABLE_TO_LOCK_ROW:unable to obtain exclusive access to this record or 124 records... After ...
0
votes
1answer
20 views

Copy opportunity information to custom object using a button [closed]

I'm trying to create a new custom object when an opportunity is closed won. For that I chose to use a button in the opportunity's page layout to create a new custom record. I want to fill ...
0
votes
0answers
19 views

Print the Opportunity Stage as a field on Product object

My sales team wants to see the current Opportunity Stage as a top-area field in the Product object (not a related list and not a lookup field) but a 'live' pull from the Opportunity object. We use ...
0
votes
0answers
25 views

link between oppurtunity product and invoice line item

The opportunity we had originally sold two instances of the same product. These instance numbers are show on the Opportunity product level, one as a dynamic link and one as text under the ‘Additional ...
0
votes
0answers
54 views

“Apex trigger SBQQ.OpportunityAfter caused an unexpected exception message when on a opportunity and click on ”Contracted" checkbox

I got this in my email Error type: SBQQ.ContractService.ContractServiceException Reason for error: A primary quote is not specified for this opportunity. Please make sure you have the primary ...
0
votes
0answers
50 views

Before Insert, Before Update Trigger

I have a trigger that runs on before insert and before update using trigger.new. I am sending data in batches, so the tirgger.new holds multiple records, some inserts, some updates. I also have some ...
0
votes
0answers
37 views

Opportunity Trigger with Upsert

I have an opportunity trigger that runs before insert and before update. It has a recursive check on the before update and a separate one on the before insert so that each only run once. I am pushing ...
0
votes
1answer
78 views

Deactivate forecast category value in Opportunity

Salesforce throws error when deactivating a forecast category. I need to deactivate 'Commit' forecast category. Please refer below stage and forecast category mapping. I have mapped 'Commit' to '...
0
votes
1answer
29 views

Creating a Pie Chart In an Opportunity

We'd like to build a pie chart that can be displayed on the Opportunity Page Layout that calculates the following: Custom Field 1 + Custom Field 2 + Custom Field 3 = Amount I imagine we would start ...
0
votes
0answers
17 views

How to report on serialized data in a custom field on Opportunities?

I added a custom field (Long text )to Opportunities called 'Month_Breakdown'. It carries data like: 'Jan=10000&Feb=50000&Jun=20000&Dec=89000'. I would like to have a report that shows ...
1
vote
0answers
21 views

How to edit the UI of the Opportunity stages?

An opportunity record can go from 'Out for signature' to 'Closed' Or to 'Starting at Risk' on the Opportunity detail page. The UI does not do a good job in showing that so I would ideally like to show ...
2
votes
1answer
28 views

How to make Action Button appear for certain opportunity stages?

I have a custom button called 'Revenue Forecast' in the 'Salesforce Mobile and Lightning Experience Actions' in my Opportunity layout. How do I make this button appear/diaasppear only in certain ...
1
vote
1answer
41 views

How to get all account IDs with only one opportunity which is in 'New Opportunity' stage using SOQL query?

I attempted using this query, however this gets all accounts that have one related opportunity in the 'New Opportunity' stage, but the account may have more related opportunities in any other stage. ...
2
votes
1answer
51 views

How to associate a Individual email result record to Opportunity in Salesforce?

I have a journey in Marketing Cloud which runs on the Opportunity records in Salesforce. Whenever an email is sent out of the journey record an "Individual Email Result" record (email tracking record) ...
0
votes
0answers
30 views

Calculating Variance by Month and Year

I am trying to create a report to show the variance % between 2019 and 2018, on a month level. I.e., Jan'18 Amount v. Jan'19 Amount and so forth. I tried creating 2 custom formula fields that would ...
0
votes
0answers
67 views

Test class error: System.NullPointerException: Argument cannot be null

Please help me on fixing this error in my test class @isTest private class ItemizedReceiptTest { static testMethod void testMethodPostive(){ Product2 prod = new Product2( Name ...
3
votes
1answer
401 views

Salesforce opportunity stages

Is that possible to get the stage name, probability and forecast category using SOQL/Apex/APIs ? and I could not find that you can pull that data.
0
votes
1answer
22 views

Tagging Object Fields for Selection in a Trigger

I have ~25 checkboxes fields on my Opportunity object that I'm using in a trigger. If one of these fields is updated, I need to trigger an update on a corresponding field in a custom object that ...
0
votes
1answer
28 views

I am getting an issue in opportunity for stage where I put trigger

I got this message. " You encountered some errors when trying to save this record There's a problem saving this record. You might not have permission to edit it, or it might have been deleted or ...
0
votes
1answer
43 views

Updating 600 rows of opportunity gives error time limit exceeded [duplicate]

I have the following apex file to update about 600 opportunity records that have status1 as Active and status2 as Inactive. status2 is a formula, status1 is a text field. Running this via Execute ...
1
vote
1answer
18 views

How to get the Email field in a SOQL query mapped from a custom Opportunity field?

I have custom field in the Opportunity object that is a Lookup and maps the Opportunity object to the User object. I'm trying to write a query that retrieves fields from the Opportunity, and also ...
0
votes
1answer
32 views

Fields not addable to related list

I have Item object to which Opportunity Product object has look up. What I wanted is to add related list to Item with all of Opp Products, but I can't add columns for the fields Account or Opportunity,...
1
vote
1answer
36 views

What would cause a standard object to load slowly?

I'm working in a sandbox(salesforce classic layout) where opening an Opportunity record would sometimes hit the time limit(2 minutes). I'm trying to figure out why that's happening. I've never seen ...
1
vote
1answer
15 views

OpportunityFieldHistory EditedBy or ModifiedBy attribute

I have a question on the OpportunityFieldHistory tracking. Per the following, the "Edited By" field is available. OpportunityFieldHistory Report https://help.salesforce.com/articleView?id=...
0
votes
1answer
53 views

Lock all opportunities Based on User

I created a checkbox field on User Table named Can Unlock. I have a requirement based on this field I have to lock all opportunities for any particular user. can some help?
2
votes
2answers
41 views

How to prevent manually changes of Status field for Cases and Opportunities?

The Status field of Case and Opportunity objects cannot be read only for any profile. How could I prevent the manual changes only? I've tried with a validation rule that allows a free choice when ...
0
votes
0answers
30 views

Select Opportunity Product Instead re create them

I have a dynamic picklist (SelectOption) of PricebookEntry Which I build with a SOQL after selecting a product. after selecting few PricebookEntries - I need to create a new Opportunity and insert ...
0
votes
0answers
16 views

Unable to view the complete PDF document in salesforce classic Preview and Lightning Quick View

We have PDF document attached in the Opportunity notes and attachment section in salesforce. When we click on Preview in salesforce classic it wont show us Page 5 and 6 of the PDF. Similarly, In ...