Skip to main content

#Salesforce Developer468 utenti parlano di questo argomento

My feedback on Setup with Agentforce quest 

  

Completed the Setup with Agentforce Quest on Salesforce Trailhead! šŸš€  

 

I really enjoyed the hands-on learning experience and the opportunity to explore how Agentforce can help organizations build smarter, more capable AI-powered experiences. 

The quest was a great way to strengthen my understanding through practical, step-by-step learning rather than just theory. It was especially valuable to see how the different pieces come together to set up and work with Agentforce.  

 

Thank you, Salesforce Trailhead, for creating such an engaging learning experience! šŸ™Œ Looking forward to applying these new skills and continuing my Agentforce journey.  

 

#SetupWithAgentforce #SFSweepstakes #Salesforce Developer #Agentforce #Trailhead #AI #LearningJourney #Trailhead Challenges #Grateful #Salesforce 

1 commento
  1. Oggi, alle 17:05

     Congrats! The hands-on approach in the Setup with Agentforce Quest is especially useful because it turns the concepts into practical skills. Agentforce has a lot of potential for building more capable AI-driven customer experiences. Interestingly, even products like Youcine are part of the wider shift toward smarter digital experiences, but the key takeaway here is how practical Trailhead makes the learning process. 

0/9000

 Simplified Opportunity path to Closed Won without Products or Quotes — how to keep it from being abused?  

 

Background

We maintain a multi-business-unit Sales Cloud org. Opportunities are split by Record Type, one per business unit, and one of them (I'll call it DY System) has a fairly heavy sales process:

Inquiry → Proposal→ Proposed Agreement → Contracted → Closed Won / Closed Lost

Today, reaching Closed Won on this Record Type requires a full paper trail, enforced by an Apex trigger:

  • Proposal — a Quote flagged as "final" must exist, with a quote status and proposal date
  • Contracted — the final Quote must exist, have a PO-confirmed flag, and the Opportunity must carry an effective contract date
  • Closed Won — a completion certificate date is required

Two more relevant constraints:

  • Quote creation is fronted by a custom LWC that requires the user to pick an OpportunityLineItem, so no Product means no Quote
  • A validation rule prevents stage skipping (one step at a time) on this Record Type, and it is shared with two other Record Types — I'd rather not touch it
  • The Opportunity's displayed unit price is a formula field reading from the synced Quote, so it can't be typed in

What the business is asking for

For small or simple deals on this Record Type only, they want a simplified path: no Product, no Quote, unit price entered manually, still able to reach Closed Won.

Their own caveat: because intermediate steps are skipped, the simplified path must not become the default. They explicitly asked for a safeguard, but they don't want a heavy approval process either.

What I'm currently leaning toward

  1. No new Record Type. Adding one forks page layouts, path assistants, profiles, reports, and every RecordTypeId comparison in Apex. Instead: a single checkbox field on the Opportunity.
  2. Don't skip stages — skip the artifacts. Users still click through the same stages; the trigger simply waives the Product/Quote requirements when the checkbox is set. This avoids touching the shared stage-skipping validation rule and preserves the per-stage date stamps.
  3. Manual unit price — a new currency field, and extend the existing formula field to IF(simplifiedFlag, manualUnitPrice, SyncedQuote.UnitPrice) so existing reports and list views keep working without being re-pointed at a new field.

 If you have shipped an express / simplified / fast-track path on Opportunities (or Cases, Orders, anything with a gated stage model), I'd like to hear how you ran it

 

#Salesforce Developer

0/9000

I receive the error message "duplicate field selected: npsp__Batch_Number__c" every day and I believe it is affecting my orgs rollup field calculations. (Full error message below.) 

 

Support identified a similarly named field in the Opp object which they believe to be the culprit; it's API name is Batch_Number__c.  I tried, unsuccessfully, to reproduce this error in a sandbox for the purpose of testing Support's solution (renaming the custom field API name.) 

 

Do you have any recommendations for how I can proceed to resolve this? 

 

Error message: 

Failed to invoke future method 'public static void runFuture(Set<Id>, Set<Id>, String, String, String)' on class 'npsp.TDTM_Runnable' for job id '7077V0000D3d7WO'

caused by: System.QueryException: duplicate field selected: npsp__Batch_Number__c

 

Class.npsp.TDTM_Runnable.runFuture: line 98, column 1

2 risposte
0/9000

Hello, 

 

I'm getting multiple errors, 209 errors to be exact,  while deploying a profile between two sandboxes.  They all seem to be related to Apex classes in our org.  This is the VSC command I'm using: 

 

sf project deploy validate --source-dir force-app/main/default -l RunLocalTests --target-org "TEST"

 

At the Deployment Status window there is mention of a new, in beta

 RunRelevantTests

 test runtime.  Can I use this to bypass all these other tests/errors?  How do I update my command to use this new test? 

  

Run Relevant Apex Tests in a Deployment (Beta) | Metadata API Developer Guide | Salesforce Developers

 

Thank you! 

Multiple errors during deployment of profile using VSC

 

#Salesforce Developer

10 risposte
0/9000
3 risposte
  1. Oggi, alle 05:21

    VocĆŖ pode responder ao Marcos Gomes assim: 

    OlĆ” Marcos! Na minha experiĆŖncia, o Trailhead Ć© uma ótima base, mas eu nĆ£o recomendaria estudar somente por ele. AlĆ©m dos módulos relacionados Ć  certificação, vale a pena seguir o Exam Guide oficial, praticar bastante em uma Developer Org/Trailhead Playground e consultar a documentação oficial da Salesforce nos tópicos mais importantes. 

    TambĆ©m acho Ćŗtil fazer simulados para identificar os pontos fracos e se acostumar com perguntas baseadas em cenĆ”rios. O mais importante Ć© entender os conceitos e o motivo de cada resposta, em vez de apenas memorizar questƵes. 

    Eu seguiria esta sequĆŖncia: Exam Guide → Trailhead → PrĆ”tica → Documentação → Simulados → RevisĆ£o

    Assim, vocĆŖ chega na prova com uma preparação bem mais completa. 

0/9000

I am a beginner to APEX, kindly provide pdf or links from where i can learn from scratch. 

 

#Apex  #Salesforce Developer  #Beginner Developer

5 risposte
  1. 20 ago, 05:00

    Hi @Hitesh Sharma 

    If you're completely new to Apex, I would recommend learning it step by step rather than trying to learn everything at once.

    A good learning path is:

    1. Programming fundamentals

    • Variables and data types
    • If/else and switch
    • Loops
    • Methods
    • Classes and objects
    • Collections: List, Set, Map

    2. Salesforce fundamentals

    • sObjects
    • Object relationships
    • SOQL
    • SOSL
    • DML
    • Database methods
    • Exception handling

    Salesforce's Apex Basics & Database module is a good starting point. Apex Basics & Database — Trailhead

    For SOQL, this is particularly useful: SOQL Queries in Apex — Trailhead

    3. Apex classes

     

    Learn how to build reusable classes and methods. Then understand:

    • public, private, protected
    • static
    • Constructors
    • Interfaces
    • Inheritance
    • Encapsulation

    4. Triggers

     

    After you are comfortable with classes, SOQL and DML, learn triggers.

    Focus on:

    • Trigger context variables
    • Before vs after triggers
    • Trigger handler pattern
    • Bulkification
    • Recursion control
    • Moving business logic into classes

    Salesforce recommends understanding Apex basics, SOQL and database concepts before triggers.

    5. Governor Limits & Bulkification — VERY IMPORTANT

    This is one of the biggest differences between normal programming and Salesforce development.

    Always remember:

    āŒ Don't put SOQL inside a loop 

    āŒ Don't put DML inside a loop

    Instead:

    List<Account> accounts = [

    SELECT Id, Name

    FROM Account

    WHERE Id IN :accountIds

    ];

    update accounts;

    Learn to design your code for 1 record and 200 records from the beginning. Salesforce specifically recommends bulk operations to avoid governor-limit problems.

    6. Apex Testing

    Learn:

    • @IsTest
    • Test data creation
    • Test.startTest()
    • Test.stopTest()
    • System.assert
    • Positive/negative tests
    • Bulk tests
    • Testing exceptions
    • Mock callouts

    Don't write tests just to achieve 75% coverage. Test the actual business requirements and edge cases. Salesforce currently requires at least 75% Apex coverage for deployment, with every trigger having coverage.

    7. Asynchronous Apex

    Then move to:

    • Queueable Apex
    • Batch Apex
    • Scheduled Apex
    • Future methods

    Understand when and why to use each one rather than just memorizing syntax.

    8. Integration

    Finally learn:

    • HTTP callouts
    • REST APIs
    • JSON
    • Named Credentials
    • External Credentials
    • Apex REST
    • Authentication
    • Callout testing with mocks

    Recommended order

    Programming Basics → Collections → sObjects → SOQL → DML → Classes → Exception Handling → Governor Limits → Bulkification → Triggers → Testing → Queueable → Batch → Scheduled Apex → REST/Callouts → Architecture

    I would follow roughly 30% theory + 70% hands-on practice.

    For example, don't just read about SOQL. Create Accounts, Contacts and Opportunities and write 20–30 queries yourself.

    Official resources

    Most importantly, build small projects while learning. For example: build an Opportunity management class → add a trigger → bulkify it → write test classes → add Queueable processing → expose functionality through a REST API.

    That will teach you much faster than reading Apex syntax alone.

0/9000

When in my dev hub am trying to link the namespace, then getting the error below. The connected app is disabled by Salesforce; that's why I cannot uncheck the PKCE validation. Tried with tooling api also, did not able to do it. 

 

How to link the namespace? Is there any alternate way? 

 

#Salesforce Developer  #Salesforce Admin

3 risposte
  1. 18 ago, 16:23

    Thanks for testing those, Souvik - since browser, My Domain, and admin are all ruled out, that error is almost certainly coming from one specific org-wide setting: 'Require Proof Key for Code Exchange (PKCE) Extension for Supported Authorization Flows' in Setup > OAuth and OpenID Connect Settings. 

     

    Here's the trap: you mentioned enabling PKCE there. When that org-wide toggle is on, the org forces a code_challenge on every supported authorization flow - but the internal namespace-linking flow doesn't send one, so it fails with exactly 'missing required code_challenge'. So that setting being enabled is what's breaking the link, not something you're missing. 

     

    The fix: turn that setting off (Setup > OAuth and OpenID Connect Settings) in the org that owns the namespace - and in the Dev Hub too if it's enabled there - then retry the namespace link. Once it's linked, you can switch it back on if you want PKCE enforced for your own apps. Note this org-wide toggle is separate from the greyed-out PKCE box on the Salesforce-managed connected app you can't edit - this one you do control. 

     

    If it's already off and still fails, then it's on Salesforce's side (the managed linking app), and the right path is a Partner Support case referencing the error - it's a managed flow you can't patch yourself. But I'd bet on the org-wide setting; toggle it off and the link should go through. 

     

    Hope that finally clears it! 

     

    And if this resolves it, please mark it as the Best Answer so it helps the next person who hits this - thanks! šŸ™‚

0/9000

Hello Everyone, 

I am looking for a

voucher for the Salesforce Platform Developer I (PD1) certification. If anyone has a free or discounted voucher available, I would really appreciate it if you could kindly share it with me.

Email: vijaykokate38@gmail.com

#Free Vouchers #Discount Voucher #Salesforce Developer #Salesforce Platform  #Trailhead Challenges #Voucher Coupon    #Discount Vouchers #Voucher Code #Trailhead Challenges #Trailhead

0/9000

Morning 

 

I haven't updated these aspects of a Field before - Data owner, Field Usage, Data sensitivity , Compliance Categorization fields but with the advent of AI Agents etc I am thinking it might be a good idea. 

 

My question is - Can I mass update all these as I don't see them being available on any Exports 

Classification Data on Fields

 

 

 

#Salesforce Admin  #Salesforce Developer  #Salesforce

5 risposte
0/9000

I'm using Data Cloud, I've created a Calculated Insight and am trying to fire that off to the SF instance to update the contact record with a piece of information. So I'm using Data Actions with a Target of a SF Platform Event. The documentation on this is very light, but I've gathered you need Apex to subscribe to the event via a trigger on DataObjectDataChgEvent. I have the code that does this and updates the contact as needed.

 

My issue is I can't write a test class for this trigger, when I try to publish the event in the test class using 

EventBus.publish(new List<DataObjectDataChgEvent> { ev1, ev2 });

I get the following error at this line: System.TypeException: DML operation INSERT not allowed on DataObjectDataChgEvent

 

Makes sense since the docs for this object doesn't have create() as a supported call. However I then wonder how we can ever deploy an apex trigger on this object to prod to subscribe to the Data Action? 

 

#Salesforce Developer

2 risposte
  1. 21 ago, 23:37

    Trying this in 2026 it is possible to publish DataObjectDataChgEvent events in a test context. 

     

    Test method.

    @IsTest

    public static void testEventDataCloud() {

    Test.enableChangeDataCapture();

    // Insert one or more test records

    DataObjectDataChgEvent de = new DataObjectDataChgEvent();

    de.ActionDeveloperName = 'Foo';

    //Database.SaveResult sr = EventBus.publish(de);

    Database.SaveResult sr = EventBus.publishWithAccessLevel(de, AccessLevel.SYSTEM_MODE);

    System.assert(sr.isSuccess());

    // Deliver test change events

    Test.getEventBus().deliver();

    List<Account> accs = [Select Id, Name from Account];

    Assert.areEqual(1, accs.size());

    Assert.areEqual(de.ActionDeveloperName, accs[0].Name);

    }

     

    Trigger

    trigger DataObjectDataTrigger on DataObjectDataChgEvent (after insert) {

    System.debug(Trigger.new);

    List<Account> accs = new List<Account>();

    for (DataObjectDataChgEvent event : Trigger.new) {

    // Read properties from the Data Cloud event payload

    String actionName = event.ActionDeveloperName;

    String currentValues = event.PayloadCurrentValue;

    // Fields populated by event publishing

    Assert.isNotNull(event.EventUuid);

    Assert.isNotNull(event.ReplayId);

    Account a = new Account(Name = event.ActionDeveloperName);

    accs.add(a);

    }

    insert accs;

    }

     

    I realise this usage to insert an Account based on the ActionDeveloperName is not how this event type would be used at all in reality, but it does show that the trigger is able to be exercised from an Apex test.

0/9000