Skip to main content

#Apex33 人正在讨论

<aura:component implements="force:appHostable,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" >

<aura:attribute name="fields" type="String[]" default="['Capital_Markets_Outlook_CMO__c',

'Webcast__c',

'X75_20_Rate_Email_Update__c',

'Bernstein_Market_Insights_BMI__c',

'Quarterly_Video_Update__c',

'Crisis_Communications__c',

'Client_Quarterly__c',

'Quarterly_EE_Deck__c']" />

<div class="slds-box">

<lightning:recordForm

recordId="{!v.recordId}"

objectApiName="Contact"

fields="{!v.fields}"

columns="2"

mode="View"

/>

</div>

</aura:component>

  1. How to apply styling for a checkbox in lighting:recordform
1 个回答
  1. 2019年8月8日 12:25
    Hi Kiran,

    Greetings to you!

    You can use the below CSS:

    .THIS .slds-checkbox [type=checkbox][disabled]+.slds-checkbox__label .slds-checkbox_faux {

    background-color: rgba(201, 199, 197, 0.96);

    }

    Please refer to the below links which might help you further with the above requirement.

    https://salesforce.stackexchange.com/questions/223746/how-to-apply-styling-for-a-checkbox-in-lightingrecordform

    https://github.com/salesforce-ux/design-system/issues/570

    I hope it helps you.

    Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

    Thanks and Regards,

    Khan Anas
0/9000

I spent weeks debugging an obscure Salesforce internal error that made no sense. 

System.QueryException: Aggregate query has too many rows for direct assignment, use FOR loop 

The query had 5 child records with a Long Text Area field and a few hundred records in a completely separate subquery with only Id selected. 

No LTA. No RTA. Just IDs. 

Yet the query was failing. 

After opening a case with Salesforce Support and escalating to the Product Team, I got the official answer: 

"Working as Designed." 

The Apex runtime applies a shared CLOB budget across ALL child subqueries — even ones with no LTA/RTA fields. The reasoning: heap safety across the entire query tree. 

I wasn't satisfied with that answer. So I ran dozens of tests across different field sizes and record counts and reverse-engineered the internal formula. 

Here's what the runtime actually does: 

Step 1 — sum up all declared LTA/RTA field lengths anywhere in the query (parent + every subquery) 

Step 2 — derive a total children row budget: 

 

FLOOR( 1000 / POW(2, MAX( CEILING(LOG2(totalClobLength / 32768)), 0 )) ) 

Which produces this table: 

totalClobLength | Row budget 

--------------- 

256 B - 32 KB | 1,000 

32–64 KB | 500 

64–128 KB | 250 

128–256 KB | 125 

256–512 KB | 62 

 

Both empirical thresholds I observed matched this formula exactly. 

Here's the flaw. 

The row budget is calculated from LTA/RTA field sizes — and then applied to ALL child records across ALL subqueries, including those that select only Id. 

A subquery like (SELECT Id FROM Children2__r) contributes zero bytes of CLOB content. 

But each of its records still consumes one slot from the budget. 

The budget is asking "how many rows can we safely load given the CLOB volume?" 

Then it counts rows that carry no CLOB data at all toward that answer. 

The fix is straightforward: 

Apply the CLOB row budget only to subqueries that actually select LTA/RTA fields. 

Records in (SELECT Id FROM ...) should not count against a heap limit derived from text field sizes. 

I've submitted this to IdeaExchange: 

"Fix Design Flaw in internal totalClobLength calculation" 

If you've ever hit this error in a multi-relationship query — or you work with contracts, documents, or any domain with rich-text fields on parent objects — please vote. 

https://ideas.salesforce.com/s/idea/a0BHp000017Jka1MAC/fix-design-flaw-in-internal-totalcloblength-calculation

 

#Salesforce #Apex #SalesforceArchitect #SalesforceDeveloper #GovernorLimits

1 条评论
  1. 今天,13:36

    Sounds like excellent work and I agree, seems like the design could be improved significantly.

0/9000

You're in the right place — #Open Jobs, Create a Post selected. Paste this directly into the Details box:

Hiring: Senior Salesforce Developer (Agentforce) | Remote India | Immediate

We're Zyphex Tech — an AI solutions firm building production-grade Agentforce and automation systems for clients across industries.

Looking for 2 Senior Salesforce Developers who've deployed Agentforce agents in a live org — not just explored it in a sandbox.

What we need:

  • 5+ years Salesforce (Apex, LWC, Flows, Data Cloud)
  • Agentforce experience — Topics, Actions, Instructions
  • REST/SOAP API integrations, async processing (Batch/Queueable Apex)
  • AI coding tools in daily workflow (Copilot, Cursor, Claude Code)
  • Comfortable working directly with clients and stakeholders

Details:

  • Remote, India
  • ₹1L + GST/month
  • 3+ months, immediate start
  • 2 open positions

If this is you or someone you know — comment below or reach out directly. 

 📩 ishaan.g

#Open Jobs  #Salesforce Developer  #Apex

1 条评论
0/9000

I am working from a completely fresh Salesforce playground. When I open the Dev Console and attempt to create a new Apex Class, I receive the above-mentioned error message.  

 

I am unsure how to resolve this. Any assistance is appreciated. 

 

IDEMPOTENCY_NOT_SUPPORTED when trying to make an Apex Class

 

 

 

#Trailhead Challenges  #Apex  #ApexDevelopment  #ApexSandboxChallenges

1 个回答
  1. 昨天,04:32

    Hi, Close the developer console and reopen it. This is not an expected here. From the File menu, select New | Apex Class.

0/9000
3 个回答
  1. 7月4日 05:12

    Greetings @Saskia Singh

    The answerto yourquestion depends on your end goal? Are you a beginner learning from scratch or studying for PD1 exam or someone transitioning from another language like Java or C#?  

     

    If you specify your end goal, we should beable topoint youin the right direction.  

     

    Be well Katende

0/9000

Hi, i've been working on this for the past 3 days and I can't seem to work it out. Ive downloaded the latest Java 17.0 for apex to work on my org in Visual studio. Unfortunately, the system can't seem to find it and the video provided didn't walk through that step. I'm just not entirely sure what i'm exactly am I doing wrong. Pls help. 

I can't find my Java to work on Visual studio code

 

#Trailhead Challenges  #Salesforce  #Apex  #Java Development  #Apple Mac and OS X

3 个回答
  1. 6月13日 10:50

    I want to mention some common issue:  

    move the file or relocate to anywhere else. 

    search the file in system by name 

    renaming the file etc.

0/9000
11 个回答
  1. 2019年11月4日 05:17
    Hi likitha,

    Please refer to my code below:

    public class QUES {

        public static void addOddNum(){

            Integer n =50;

            Integer sum=0;

            while(n>0){

                if(math.mod(n,2)==1){

                  System.debug(n);

                }

                n=n-1;

            }

        }

    }

    I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

    Thanks and Regards,

    Deepali Kulshrestha

    www.kdeepali.com
0/9000
I have two class:

OpportunityLineItemTriggers

OpportunityLineItemTriggers_Test

In the developer console, I run the test class of which there are 5 and all of them check out as green. Yet the code coverage remains very low on the class. When I open up the OpportunityLineItemTriggers class and select Code Coverage, it's only showing that it ran one test, and it's the last one in the list.

Has anyone else run into this problem, and if so, how can I get the Code Coverage to be cumulative across all of the tests in the test class?
2 个回答
  1. 2015年5月5日 15:16
    No I can't. There are over 1500 lines of code between those classes, and there are other triggers and classes such as Opportunities, Accounts, Contacts which also run. What I'm wondering is why only the last running test is showing up as the one that covers the class when I have 5 test methods. I ran the unit tests again, and each time the Code Coverage showed only one test method running against the class, I commented out that test method and ran the unit tests again. There ended up being two test methods which I had to comment out, and then when I ran the unit tests again, the remaining 3 showed up in the Code Coverage drop down. 

    I'll have to look at the two I commented out to see how they are affecting the other unit tests and why they are not showing up as cumulative.

    Thanks for the reply.
0/9000
I was hoping to find a way to either set up some sort of automatic email should a deployment fail to an org I own, or to set up a scheduled job to query the DeployRequest object and see the status of the last N deployments.

Everything I've found suggests using checkDeployStatus() but for that I need to know the Id of the deployment. I'm more looking for an automated way to be notified when any memeber of my team pushs a deployment that fails. 

I've not seen many posts on the subject since 2014 when I can see if certainly wasn't possible, hoping someone has figured out a way in the past 6 years.

Thanks!
6 个回答
0/9000
Hi Experts,

Let me know What are the components we can't added to change set ? if we can't added to the changeset then how to move production? please write some componenete with highlight.

Regards,

Chanti
3 个回答
0/9000