• Mukesh pal 7
  • NEWBIE
  • 29 Points
  • Member since 2017

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 8
    Replies
insert new SetupEntityAccess( ParentId = '0PS...', // PermissionSet ID SetupEntityId = '01p...' // ApexClass ID );

In above apex class, i want to add some 1000 apex class ids in setupentityid, how is it possible? Thanks!
Input:
-------
{
    "Rows": [                                                       
        [22847938, "SO", "202303161732488-MG", 1, 0, 0, 0, 1, 2.5, "2023-03-16T00:00:00", "2024-03-16T00:00:00", "OPEN", null, null, "2023-03-16T00:00:00", "009", "PUCG", "N30", true, false, "9800 De Soto Ave. - 009", null, null, "Chatsworth", "CA", "91311", "US", null, 0.0, null, null, 154023, []],
        [22878665, "SO", "202303231535745", 16, 0, 0, 0, 16, 128.25, "2023-03-23T00:00:00", "2024-03-23T00:00:00", "OPEN", null, null, "2023-03-23T00:00:00", "010", "UPSG", "N30", true, false, "13100 Tonopah ST", null, null, "Chatsworth", "CA", "91311-____", "US", null, 0.0, null, null, 178878, []],
        [22878689, "SO", "202303231539239", 6, 0, 0, 0, 6, 19.4, "2023-03-31T00:00:00", "2024-03-23T00:00:00", "OPEN", null, null, "2023-03-31T00:00:00", "010", "UPSG", "N30", true, false, "13100 Tonopah ST", null, null, "Chatsworth", "CA", "91311-____", "US", null, 0.0, null, null, 178902, []]
    ]
}
Expected Output
---------------

{
    "Rows": [                                                       
        [22878689, "SO", "202303231539239", 6, 0, 0, 0, 6, 19.4, "2023-03-31T00:00:00", "2024-03-23T00:00:00", "OPEN", null, null, "2023-03-31T00:00:00", "010", "UPSG", "N30", true, false, "13100 Tonopah ST", null, null, "Chatsworth", "CA", "91311-____", "US", null, 0.0, null, null, 178902, []],
        [22878665, "SO", "202303231535745", 16, 0, 0, 0, 16, 128.25, "2023-03-23T00:00:00", "2024-03-23T00:00:00", "OPEN", null, null, "2023-03-23T00:00:00", "010", "UPSG", "N30", true, false, "13100 Tonopah ST", null, null, "Chatsworth", "CA", "91311-____", "US", null, 0.0, null, null, 178878, []],
        [22847938, "SO", "202303161732488-MG", 1, 0, 0, 0, 1, 2.5, "2023-03-16T00:00:00", "2024-03-16T00:00:00", "OPEN", null, null, "2023-03-16T00:00:00", "009", "PUCG", "N30", true, false, "9800 De Soto Ave. - 009", null, null, "Chatsworth", "CA", "91311", "US", null, 0.0, null, null, 154023, []]
    ]
}

Hi All , Can someboy help me to resolve this issue?Method does not exist or incorrect signature: void getDuplicateResult() from the type Database.SaveResult ....I am using it in my test class 

 

Database.DMLOptions dmlOpts = new Database.DMLOptions();
dmlOpts.DuplicateRuleHeader.allowSave = true;
Database.SaveResult saveResult = Database.insert(duplicateAcc, dmlOpts);
System.assert(saveResult.isSuccess());
DuplicateRecordSet drs = [SELECT Id FROM DuplicateRecordSet WHERE Id =:saveResult.getDuplicateResult().getDuplicateRecordSetId()];
 

I need to put a filter in report based on Loan and Loan Team Member , Role object.The report should only show Loans where none of the Loan Tember role  is 'Loan Specialist' so even if there is a Loan with two Loan Team Members one with Loan Specialist role an another with a different role , the parent Loan should not be visible in the report.How to achieve this.I have put the filter of Role <> 'Loan Specialist' but its showing those loans as well where there are multiple Loan TM and one has a role of Loan Specialist
  • April 04, 2023
  • Like
  • 0
Performing the first Challenge of this Superbadge for APEX, I am receiving the below error. But it is not true because the Maintenance Request does indeed have all of the attributes cited when I try via the GUI and via a Test Class. Can someone please tell me what is wrong?

Challenge Not yet complete... here's what's wrong:
Inserting a new Maintenance Request of type 'Routine Maintenance' and then closing it did not create of a new Maintenance Request based upon the original record correctly. The challenge is expecting to find the closed Maintenance Request plus an 'New' Maintenance Request of type 'Routine Maintenance' with the same Vehicle as the closed one.

(Also, the challenge didn't specifically mention that the Case and Product2 objects should be relabeled)
public class ContactAndLeadSearch {
public static List<List<SObject>> searchContactsAndLeads(string FN)
{
    List<List<sObject>> searchList = [FIND 'FN' IN all fields 
RETURNING Contact(FirstName,LastName) ,Lead(FirstName,Lastname)];
//Contact[] searchContacts = (Contact[])searchList[0];
//Lead[] searchLeads = (Lead[])searchList[1];
return searchList;
   

}
}

Please someone correct this code ,, this one was nt fulfilling the challenge req.