Skip to main content

#Sales Cloud141 人正在讨论

Hi community, 

 

I'm trying to find the enable oath in data loader and I'm not seeing it. I think my screen is not letting me see all of the options. Does anyone know how I can fix this? 

 

#Sales Cloud  #Service Cloud  #Data Management

5 个回答
0/9000

Hi everyone,

I need some architectural advice on the best way to handle report and data access for a global team without turning role management into a maintenance nightmare.

 

  • We have report folders separated by countries: Country A Reports, Country B Reports, and Country C Reports.
  • In our Role Hierarchy, we have local roles at the bottom (e.g., Sales Rep Country A, Sales Rep Country B) and a high-level corporate role at the top called Global Management.

The Business Requirement:

 

Product manager users in their Country or Regional Level role complained not being able to access reports with data related to other countries, so we moved them to the

Global Management team for them to be able to see everything

. They require full visibility to access records (Accounts, Opportunities) globally, but they also need to open and view the reports inside the local folders of Country A, Country B, and Country C. 

 

The challenge:

 

We noticed that when we move a user from a local country role up to the

Global Management

role to give them global record visibility, they immediately lose access to some of the regional reports they could see before, or the reports show up completely empty for them. 

 

My Questions:

  1. How can we avoid constantly shifting users from one role to another just so they can see cross-country reports while maintaining access to their respective records? What is the cleanest architecture to decouple record visibility from report folder visibility?
  2. What is the Best Practice in Salesforce to solve this? Should we keep these global users in a specific role and grant them report folder access via a Public Group or a specific Permission Set?
  3. Why do some reports return empty or give errors to a user right after they are moved to a higher role in the hierarchy? Is it because of dynamic filters in the reports (like "My Team's Records" or "My Role" filters) that break when their branch changes?

Thank you so much for your help! 

 

@Salesforce Administrators & Developers, @Salesforce Administrators and Developers, @APAC Architects, @Data Quality & Management

 

 

#Trailhead Challenges  #Salesforce Developer  #Reports & Dashboards  #Solution Architects  #Sales Cloud

2 个回答
0/9000

 I need to automatically create a Chatter post on a Case whenever its pending approval request is reassigned to another user using the standard Reassign action. Since triggers and record-triggered flows aren't supported on ProcessInstanceWorkitem, and the Case itself doesn't change, I'm not sure how to capture this event. Has anyone solved this, whether with scheduled polling, a custom reassign component, or another approach? Any suggestions or sample code would be appreciated.  

 

#Trailhead  #Salesforce Developer  #Salesforce Admin  #Salesforce  #TrailblazerCommunity  #Sales Cloud  #Apex  #Salesforcecommunity  #Salesforce_developer

2 个回答
  1. 昨天,08:00

    You’re correct that there isn’t a direct trigger point here. ProcessInstanceWorkitem doesn’t support Apex triggers or record-triggered flows, and reassigning the approval doesn’t update the Case itself. 

     

    If you need to keep the standard Reassign action, I’d handle it with scheduled Apex:

    1.  Run a scheduled job every few minutes. 
    2.  Query new ProcessInstanceStep records where StepStatus = 'Reassigned'. 
    3.  Use ProcessInstance.TargetObjectId to identify the related Case. 
    4.  Query the pending ProcessInstanceWorkitem for that process instance to get the newly assigned ActorId. 
    5.  Insert a FeedItem with the Case ID as ParentId. 
    6.  Store the processed ProcessInstanceStep.Id in a small custom log object with a unique/external-ID field. 
    7.  Skip any step already in that log so rerunning the job can’t create duplicate Chatter posts. 

    I’d also test it by reassigning the same approval twice and then running the job twice. The expected result should be two Chatter posts total, with no additional posts from the second job run. 

     

    If real-time posting is absolutely required, the other option is to replace the standard Reassign experience with a custom Flow/LWC backed by Apex. That custom action would update ProcessInstanceWorkitem.ActorId and create the Case FeedItem in the same transaction. But the existing standard Reassign action can’t be intercepted directly.

0/9000

Hi everyone,

I have a question regarding the “Create Quotes without Opportunities” feature and a potential future requirement involving Orders.

 

After enabling the “Create Quotes without Opportunities” feature, Salesforce automatically provides the QuoteAccountId field on the Quote object. For Quotes created without an Opportunity, the Account relationship is stored in QuoteAccountId, while the standard AccountId is not populated.

 

Would it be technically possible to populate the standard AccountId field with the value from QuoteAccountId

for Quotes created without an Opportunity?. 

 

The reason for considering this is that Orders will be used in the future, and the standard Account relationship may be required for the Order process.

Would populating AccountId = QuoteAccountId be a supported and recommended approach, or are there any Salesforce limitations or implications we should consider when working with Quotes without Opportunities? or any workaround?.

Thanks for your guidance! 

 

@Salesforce Administrators & Developers, @Salesforce Administrators and Developers, @APAC Architects, @Data Quality & Management

 

 

#Trailhead Challenges  #Trailhead  #Salesforce Developer  #Salesforce Admin  #Salesforce  #Flow  #Data Management  #Apex  #Sales Cloud

2 个回答
  1. 9月24日 15:17

     

    Short answer: you generally cannot (and do not need to) write QuoteAccountId into the standard Quote.AccountId field. On the Quote object, AccountId is a system-derived, read-only reference that Salesforce fills from the related Opportunity's Account. It is not createable/updateable through the UI, Flow, Apex or the API, so an update like AccountId = QuoteAccountId will be rejected or ignored. For quotes created without an Opportunity, QuoteAccountId (label "Account for Quote") is the field Salesforce intends you to use as the account relationship. 

     

    For your future Order process this is already covered: Salesforce's documentation for quotes without opportunities says associating the quote to an account is optional but recommended, because an account is required to convert the quote to an order. When you create an Order from such a quote, the account comes from the quote's account (QuoteAccountId), so you don't need Quote.AccountId populated. 

     

    Practical recommendations: 

    1. Make QuoteAccountId required (validation rule, e.g. ISBLANK(OpportunityId) && ISBLANK(QuoteAccountId)) so every quote can be turned into an Order. 

    2. After enabling the feature, open Object Manager > Quote > Fields > Account for Quote and grant field-level security to your profiles/permission sets. It is hidden by default, which is why it often looks unavailable in Flow, reports and Apex. 

    3. In reports, flows, sharing logic and Apex, use one source of truth, for example a formula field BLANKVALUE(QuoteAccountId, Opportunity.AccountId), so logic works for quotes with and without an Opportunity. 

    4. If you create Orders yourself via Flow/Apex (rather than the standard Create Order action), set Order.AccountId = Quote.QuoteAccountId and Order.QuoteId = Quote.Id. 

     

    References: 

    Enable Quote Creation Without a Related Opportunity:

    https://help.salesforce.com/s/articleView?id=sales.cpq_quotes_without_opportunities.htm&type=5

     

    Release note, Create Quotes Without a Related Opportunity:

    https://help.salesforce.com/s/articleView?id=release-notes.rn_sales_quotes_without_opportunities.htm&release=244&type=5

     

    Quote object reference:

    https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_quote.htm

     

     

    Assumption: the statement that Quote.AccountId is read-only is based on the Quote object reference field properties and commonly reported org behaviour; please confirm in a sandbox (e.g. attempt the update in a Flow or Developer Console) before designing around it.

0/9000
1 个回答
  1. 9月21日 20:47

    Hi Suraj,

    To write a unit test for a @future (callout=true) method, you need to mock the HTTP callout (using HttpCalloutMock) and enclose the execution between Test.startTest() and Test.stopTest(). Salesforce runs all asynchronous methods (like future methods) called within startTest() and stopTest() synchronously right when Test.stopTest() executes. 

     

    Here is an example test class structure to cover your method:

    1.Create a Mock Callout Class:

    Mock Implementation. 

    Create a mock class that implements HttpCalloutMock to return a fake JSON response simulating your patchCall output (ensuring it contains 'state' => 'Success' and a valid JSON structure with an id field).

    2.Prepare Test Data and Context:

    Test Setup. 

    In your test method, insert a test Bid_Review_Request__c record so that the update brUpdate; statement can successfully find and update a record in the database.

    3.Wrap in Start/Stop Test:

    Execution and Assertion. 

    Assign your mock, wrap the future method call inside Test.startTest() and Test.stopTest(), and assert that the record was updated successfully.

    Apex 

     

    @isTest

    private class NewProjectHandlerTopUpTest {

    // 1. Mock class for HTTP callouts

    public class MockHttpResponseGenerator implements HttpCalloutMock {

    public HTTPResponse respond(HTTPRequest req) {

    HttpResponse res = new HttpResponse();

    res.setHeader('Content-Type', 'application/json');

    res.setStatusCode(200);

    // Construct JSON response matching the parser requirements

    res.setBody('{"state": "Success", "resBody": "{\\"id\\": \\"12345\\"}"}');

    return res;

    }

    }

    @isTest

    static void testNewProjectHandlerTopUp() {

    // Create test record to satisfy update operation

    Bid_Review_Request__c testReq = new Bid_Review_Request__c(

    Name = 'Test Project'

    // Add required fields for Bid_Review_Request__c here

    );

    insert testReq;

    Map<String, String> recordMap = new Map<String, String>{

    'ID' => testReq.Id,

    'Name' => 'Test Project'

    };

    // Set mock callout

    Test.setMock(HttpCalloutMock.class, new MockHttpResponseGenerator());

    Test.startTest();

    // Calling the future method

    YourClassName.newProjectHandlerTopUp(recordMap, '{"test":"json"}', 'destination', 'WBS123');

    Test.stopTest(); // Future method executes here

    // Assertions to verify the record was updated

    Bid_Review_Request__c updatedReq = [SELECT WBS_Project__c FROM Bid_Review_Request__c WHERE Id = :testReq.Id];

    System.assertEquals('12345', updatedReq.WBS_Project__c, 'The WBS Project code should be updated successfully.');

    }

    }

    (Note: Replace YourClassName with the actual name of the Apex class containing your future method).

0/9000

I am trying to disable by using autocomplete="Off" but its now working can anyone help with this i am using this under lightning record edit form

 

#Sales Cloud  #Service Cloud  #Marketing Cloud  #Analytics  #Nonprofit  #Trailhead  #New Releases  #Integration  #AppExchange

1 个回答
  1. 9月20日 06:57

    Hi Vikrant, autocomplete="off" isn't supported directly by lightning-input-field because it doesn't expose the underlying <input> element's autocomplete attribute. 

    If you need to control autocomplete, you can use lightning-input instead of lightning-input-field and set: 

    <lightning-input

    type="text"

    autocomplete="off"

    name="myField">

    </lightning-input>

      

    If you need to keep lightning-record-edit-form and lightning-input-field, you generally can't reliably disable the browser's autocomplete through the component attribute. 

      

    If you can share which field you're trying to disable autocomplete for and what browser you're testing in, I can suggest a more specific workaround. 

     

0/9000

error it is showing is:-

You are missing information needed by the page you have attempted to access. If you believe this is an error, please refresh your screen. If the error persists, please <a href="javascript:openPopupFocusEscapePounds('/HelpAndTrainingDoor?body=%2Fhelp%2Fswitchuserwait.jsp%3FcssJump%3D%2Fsserv%2Fcaseedit.jsp&loc=support', 'Help', 1024, 768, 'width=1024,height=768,resizable=yes,toolbar=yes,status=yes,scrollbars=yes,menubar=yes,directories=no,location=yes,dependant=no', false, false);" title="report (New Window)">report</a> it to our Customer Support team and provide the URL of the page you were requesting as well as any other related information.

Unit:-Prepare your organization

 

#Sales Cloud  #Service Cloud  #Trailhead  #New Releases  #AppExchange

1 个回答
  1. 9月20日 06:52

    Hi Nisha, this can happen if there is an issue with the Classic Email Template folder page or if the required permissions aren't available.  

     

    Please check that you have the “Manage Public Classic Email Templates” permission (or the appropriate email template management permissions) and that you have access to the Classic Email Templates folder functionality.  

     

    Also try refreshing the page or accessing Setup → Classic Email Templates → Create New Folder again from a fresh Salesforce session.  

     

    If the same error persists after verifying the permissions, I recommend creating a Salesforce Support case and providing the URL and exact error message, since the error itself suggests Salesforce Support investigate the page request 

0/9000

Hi All,

 

As we can give Account, Opportunity and Case Access through Account Team, does this Override the Profile, Field or Record Level Access? Suppose someone already having access through Profile, Field or Record Level to Edit a Account or Opportunity Record but in Account Team access is given as Private for Read Only So it should not take Account Team access right?

 

Also If Someone is given access to Opportunity from an Account's Account Team as Private and From that Opportunity's Oppty Team the access is Given as Read/Write, Which it will be imply to?

 

Thank you

5 个回答
  1. 2023年12月28日 16:50

    The easiest way to look into access rights is that Account teams and Opportunity teams can only open up access.

    If your organization-wide default access for accounts and opportunities is set to Private and if you give team members access to an individual opportunity, those users gain read-only access to accounts on the opportunity. Conversely, if you remove a user’s access to an individual account, the user is removed from opportunity teams related to the account.

     

    However, it will not work the other way around. If the org-wide default access for accounts and opportunities is set to Public, the user will have edit rights to both account and opportunity. I.e. you are not able to restrict access with account and opportunity teams, only open it up.

     

    It is worth testing but I do believe that for example if your org-wide defaults are set to public, you will not even have the private option on the account or opportunity teams.

0/9000

I need to create a formula field that updates a checkbox after verifying Company's value. I couldn't complete creating a formula field as it throws an error that the limit is 5000 characters. I want to query many company values and update the checkbox. Can someone please suggest an alternative to achieve this functionality?

 

Can I create a trigger or apex class? 

 

#Sales Cloud #Analytics #Automation #Integration Would creating that be affected by character limits as well?

1 个回答
  1. 9月17日 14:07

    Hi SidParnam,

    If you're maintaining a long list of company names in a formula, I wouldn't recommend moving the same large IF/OR logic into Apex. Apex doesn't have the formula field's 5,000-character limit, but hard-coding a large company list makes the solution difficult to maintain.

    A better approach would be to store the company values as configuration:

    • Create a Custom Metadata Type with the company name and the checkbox value.
    • Use a before-save Record-Triggered Flow to look up the company and set the checkbox.
    • If you need more complex processing or a very large dataset, Apex can also query the configuration and update the record.

    This way, adding or removing a company doesn't require changing and redeploying your formula/Apex code. 

     

    If you share approximately how many company values you have and whether the checkbox needs to update immediately when the Company field changes, we can suggest the simplest implementation. 

0/9000

I see from this idea exchange item that you can send an email alert when I

 

#Sales Cloud #Service Cloud #Trailhead #Automation #New Releases new note is created a record, but the link is broken. Does anyone know how to accomplish sending email alerts when someone adds a new note? 

 

https://ideas.salesforce.com/s/idea/a0B8W00000GddhfUAB/emailchatter-notifications-on-notes-and-attachments-updates

1 个回答
  1. 9月17日 14:02

    Hi Bob,

    If you're referring to Enhanced Notes, you can automate this using the ContentNote and ContentDocumentLink objects. 

     

    One approach is to use a record-triggered Flow on ContentDocumentLink to detect when a note is linked to the record, then send an email notification to the appropriate users. 

     

    Keep in mind that ContentDocumentLink is used for linking the Note to records, so you'll need to determine the linked record and recipients before sending the notification. 

     

    If you share which record you want to notify users about (Account, Contact, Opportunity, etc.) and whether you're using Enhanced Notes, I can suggest the exact Flow configuration. 

0/9000