• Christopher Bahr 4
  • NEWBIE
  • 25 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 2
    Likes Received
  • 1
    Likes Given
  • 5
    Questions
  • 4
    Replies
So basically we have opportunity record types and user roles set up by business lines. We want to restrict editing of the Opportunities to where the record type and roles matchup. We have the OWD for opportunities set to private and a sharing rule giving Read/Write access based on the opportunity record type and the role. I look at the sharing heirarchy and it shows read access and write access for the correct record types. However edit access seems to only be controlled by the user's profile. If their profile has Opportunity edit access set, they can edit all opportunties, if it's not set, they cannot edit any opportunties.
Is there a correct way to set this up? Is there anywhere else I can look at to see why this would be occuring?
I have an Opportunity object with potentially a large number of child objects. When I update a date field on my Opportunity a flow trigger updates the child objects, which then fires a flow trigger on the child object. 
The problem is that I will, in rare occasions, hit the SOQL query limit. When I tried changing the Opportunity flow trigger to run asynchronously and update the child object, the child object flow trigger is no longer firing. 

Is there a way to have the Asynchronous call fire a trigger or is there a better solution to avoid the SOQL query limit?
Hi, 

I took over support for an organization and in reviewing their previously written Apex Classes, a lot of them have this PageReference method stuck on at the end and I'm not completely sure what it is for. It's repetitive and many lines, so please forgive the longcat below.

Here's the whole method:
Public PageReference codecoverage()
    {
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        if(Test.isRunningTest()){}
        return null;
    }

The rest of the class code that is actually doing the work is contained in an if statement
 
if(!Test.isRunningTest())
        {
           // code to do work here

         }
         else
        {
            system.debug('test');
        }

Any ideas what this code structure and methods are for?
I'm looking through my event logs for calls to soon to be deprecated API versions. I have a list of calls and it shows the CONNECTED_APP_ID making these calls. How do I find the Connected App in my system that has that ID?
Basically I am trying to create a report on our attachments with the SOQL 2 Report (https://appexchange.salesforce.com/listingDetail?listingId=a0N3A00000FMnZuUAL) app from the appexchange. Is it possible to write a single query that would grab the attachment information from the contentversion table, link to the file, and opportunity information? 
I've tried to write one but I am getting tripped up with the polymorphic relationship and fields between the opportunity table and contentdocumentlink table.
I'm looking through my event logs for calls to soon to be deprecated API versions. I have a list of calls and it shows the CONNECTED_APP_ID making these calls. How do I find the Connected App in my system that has that ID?
I'm looking through my event logs for calls to soon to be deprecated API versions. I have a list of calls and it shows the CONNECTED_APP_ID making these calls. How do I find the Connected App in my system that has that ID?
Basically I am trying to create a report on our attachments with the SOQL 2 Report (https://appexchange.salesforce.com/listingDetail?listingId=a0N3A00000FMnZuUAL) app from the appexchange. Is it possible to write a single query that would grab the attachment information from the contentversion table, link to the file, and opportunity information? 
I've tried to write one but I am getting tripped up with the polymorphic relationship and fields between the opportunity table and contentdocumentlink table.
User-added imageI have lookup field name 'Courier Service' with default lookup showing name(here auto-number). But i want to show field other than name. 

How this is going to be ?? 

Thanks in Advance. 

 
Hi guys, I was wondering how to show a custom field in the search field instead of the "Name" field. As you can see in the image below, I use automatic numbering for the "Name" field (changing to text is not an option) and then I wanted to show another field instead.
User-added image