Skip to main content

#AppExchange6 personnes en discutent

Suraj Demgunde a posé une question dans #Sales Cloud

How can we cover attached method. can some help me in this.

 

test method cover

 

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

1 réponse
  1. 21 sept., 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 réponse
  1. 20 sept., 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 réponse
  1. 20 sept., 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

We have a request for a small implementation project with a managed package data model that we are looking for a referral for a potential customer.  Contact Rob@apsona.com as soon as possible.  Client needs work done in the next week.  #𝚂𝚊𝚕𝚎𝚜𝚏𝚘𝚛𝚌𝚎𝙰𝚍𝚖𝚒𝚗 #Data Management #AppExchange 

Are you an Apsona Multi-step reporting SME?

1 réponse
  1. 17 sept., 14:25

     Hi Rob, I’d be interested in learning more about the project and the Apsona multi-step reporting requirements. Please share the details, and I’d be happy to see if I can help. 

0/9000
Branden Biggs (formspring) a posé une question dans #Automation

Would changing the passwords

 

#Automation #New Releases #AppExchange length on password policies affect the existing users password assigned?

1 réponse
  1. 17 sept., 14:04

    Hi Branden, 

     

    Changing the minimum password length in Salesforce Password Policies does not immediately change or invalidate passwords that existing users have already set. 

     

    The new policy applies when users set or change their passwords going forward. Existing passwords can remain as they are until the user changes/resets the password. 

     

    If you want to force existing users to comply with the new password policy, you would need to have them reset their passwords (or use an appropriate administrative process). 

0/9000
Aadarsh Tiwari a posé une question dans #Trailhead Challenges

I'm working on the Trailhead project "Build a Data Model for a Recruiting App." 

 

I completed the package installation successfully, but I can't continue because the Recruiting app is not available. 

 

I've checked: 

- App Launcher 

- App Manager 

- Installed Packages 

 

The package appears to be installed, but there is no Recruiting app, Candidate object, or other Recruiting components required by the project. 

 

Has anyone experienced this? Is there an additional step required after installing the package, or is the package missing components? 

 

Any help would be appreciated. 

 

Any help would be appreciated. 

 

#Trailhead Challenges  #Trailhead Playground  #Recruiting  #AppExchange

1 réponse
0/9000

 New in 360 InstantDocs: Excel File Generation for Salesforce

 

 

We're excited to share a new enhancement in

360 InstantDocs

on Salesforce AppExchange! 

 

With our latest release, you can now generate Excel (.xlsx) files directly from Salesforce—making it easier to automate spreadsheet creation without leaving your Salesforce environment. 

 

You can now generate formatted Excel (.xlsx) files directly from Salesforce and automate the process using Flow or Apex, making it easier to create reports, invoices, and other business documents.

 

We'd love to hear how you would use Excel generation in your Salesforce workflows. Feedback and suggestions are always welcome. 

 

#AppExchange  #Document Generation  #Automation

1 commentaire
  1. 7 août, 09:48

    Great update! Excel is still a common format for many business teams, so having this capability directly in Salesforce will be valuable for a lot of use cases. 

0/9000

Hi, 

 

I have installed the

https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMiVQUA1&tab=s

  

Consent Capture - Flow Template

By Salesforce Labs 

 

it is working fine for the salesforce admin but for non admin it is not working the content on the screen is not renderding, i assigned the permission set too and package was installed for all the users.  

 

Anyone faced the same issue? 

 

Thanks 

 

#Appexchage Apps  #Salesforce Labs  #TrailblazerCommunity  #AppExchange

3 réponses
0/9000
5 réponses
  1. 16 juil., 11:49

    If you're already using Amazon Connect with Salesforce, the IVR is typically configured on the Amazon Connect side, while Salesforce is used for screen pops, call routing, and record association. The setup usually involves configuring contact flows, routing profiles, queues, and then mapping the relevant data into Salesforce. 

    If you're exploring different ways to handle IVR and telephony within Salesforce, you could also take a look at 360 CTI. It supports Salesforce telephony features like IVR, automatic call logging, click-to-dial, and screen pops. Sharing the AppExchange listing in case it's useful while you're evaluating different options: https://appexchange.salesforce.com/appxListingDetail?listingId=a0N4V00000HEVm1UAH 

    Are you planning to keep Amazon Connect as your telephony provider, or are you evaluating other CTI solutions as well? 

0/9000

Hi everyone,

We are reaching out for guidance on a namespace conflict issue we are facing in our SharinPix managed package. 

 

In our managed package, we have a custom object named Job__c. One of our customer orgs also has an unmanaged custom object with the same API name: Job__c. 

 

In Apex, we derive the object name from the customer’s record Id:

recordId.getSObjectType().getDescribe().getName()

This returns Job__c, and the record Id belongs to the customer’s unmanaged object. 

 

However, when we execute dynamic SOQL from within our managed package, FROM Job__c resolves to the SharinPix managed package object. We understand this is the default Salesforce namespace resolution behavior in a managed package context. 

 

Has anyone found a reliable workaround for this? Is there any supported way to explicitly query the subscriber/default-namespace object from managed package Apex when both objects have the same API name? 

 

Thanks a lot  

 

cc:

@Kevan Moothien

 

 

#AppExchange

2 réponses
  1. 13 juil., 07:01

    This is a known limitation of namespace resolution in managed packages. Within managed package Apex, unqualified object names resolve to the package namespace first, so dynamic SOQL against Job__c will target the packaged object when both exist.

    Unfortunately, there's no supported way to force dynamic SOQL to resolve to the subscriber's unmanaged object in this scenario. A common workaround is to avoid API name collisions altogether or use another identifier (such as the object's namespace or describe metadata) to differentiate the objects where possible. If this is a blocker, Salesforce Support may be able to confirm whether there are any newer platform capabilities or known workarounds.

0/9000