Skip to content

Commit ff1a752

Browse files
authored
feat: update summer25/api63 (#81)
1 parent aceba1a commit ff1a752

File tree

12 files changed

+215
-208
lines changed

12 files changed

+215
-208
lines changed

.vscode/settings.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"apexPMD.enableCache": false,
33
"[css]": {
4-
"editor.formatOnSave": false
5-
}
6-
}
4+
"editor.formatOnSave": true
5+
},
6+
"[js]": {
7+
"editor.formatOnSave": true
8+
}
9+
}

demo/cheatsheet.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ node ./tools/build.js -t browser
1717
node tools/build.js -t node apex
1818
node tools/build.js -t cdn :common apex
1919
node tools/build.js -t browser :common apex
20+
21+
# run tests
22+
npm run build_and_test

demo/markupcheck.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<script charset="UTF-8" src="../dist/apex.min.js"></script>
88
<link rel="stylesheet" href="./testcode.css" />
99
<!-- <link rel="stylesheet" href="../src/styles/monokai-sublime-apex.css" /> -->
10-
<link rel="stylesheet" href="vs.css" />
10+
<link rel="stylesheet" href="vs.css" />
1111
<script>
1212
hljs.debugMode();
1313
hljs.highlightAll();
@@ -36,7 +36,6 @@
3636
Integer z
3737
) {
3838

39-
4039
Account a = new Account();
4140
a.Custom__c = 'stringvalue';
4241
insert a;
@@ -71,7 +70,7 @@
7170

7271
trigger CTrig on Custom__c (before insert){
7372
System.debug('inserting a record');
74-
upsert myRecord__c;
73+
upsert as system myRecord__c;
7574
}
7675
</code></pre>
7776
</body>

demo/soqlsamples.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ WHERE Id IN
3939
[SELECT Id FROM Account WHERE CreatedDate = NEXT_N_FISCAL_QUARTERS:6]
4040
[SELECT Id FROM Opportunity WHERE CloseDate = N_WEEKS_AGO:3]
4141
[SELECT Id FROM Account WHERE CreatedDate = YESTERDAY]
42-
[SELECT Id, MSP1__c from CustObj__c WHERE MSP1__c includes ('AAA;BBB','CCC')]
42+
[SELECT Id, MSP1__c FROM CustObj__c WHERE MSP1__c includes ('AAA;BBB','CCC') WITH SYSTEM_MODE]
4343
[SELECT Id
4444
FROM Case
4545
WHERE Contact.LastName = null]
@@ -57,4 +57,4 @@ GROUP BY Name]
5757
GROUPING(LeadSource) grpLS, GROUPING(Rating) grpRating,
5858
COUNT(Name) cnt
5959
FROM Lead
60-
GROUP BY ROLLUP(LeadSource, Rating)]
60+
GROUP BY ROLLUP(LeadSource, Rating) WITH USER_MODE]

demo/testcode.html

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<meta charset="UTF-8" />
66
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/highlight.js"></script>
77
<script charset="UTF-8" src="../dist/apex.min.js"></script>
8-
<link rel="stylesheet" href="./testcode.css" />
9-
<!-- <link rel="stylesheet" href="../src/styles/monokai-sublime-apex.css" /> -->
10-
<link rel="stylesheet" href="vs.css" />
8+
<!-- <link rel="stylesheet" href="./testcode.css" /> -->
9+
<link rel="stylesheet" href="../src/styles/monokai-sublime-apex.css" />
10+
<!-- <link rel="stylesheet" href="vs.css" /> -->
1111
<script>
1212
hljs.debugMode();
1313
hljs.highlightAll();
@@ -76,6 +76,13 @@
7676
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
7777
* @group Visualforce
7878
* @since 2022
79+
* @example
80+
* for (Dashboard d : dashboards) {
81+
* List<BotField> fields = new List<BotField>();
82+
* fields.add(new BotField('Name', d.Title, '/lightning/r/Dashboard/' + d.Id + '/view'));
83+
* fields.add(new BotField('Folder', d.FolderName));
84+
* records.add(new BotRecord(fields));
85+
* }
7986
*/
8087
public with sharing class ActionPlanDetailController {
8188

@@ -325,7 +332,7 @@
325332

326333
Database.insert(new planTaskIndexToTask.values());
327334

328-
Database.update(dependentTasksToUpdate);
335+
Database.update(dependentTasksToUpdate, AccessLevel.USER_MODE);
329336

330337
List&lt;Task&gt; myTasksWithOutEmail = new List&lt;Task&gt;();
331338

@@ -408,6 +415,36 @@
408415
ActionPlansTriggerHandlers.actionPlansSObjectTriggerHandler('Account');
409416
}
410417

418+
public with sharing class GetFirstFromCollection {
419+
@InvocableMethod
420+
public static List <Results> execute (List<Requests> requestList) {
421+
List<SObject> inputCollection = requestList[0].inputCollection;
422+
SObject outputMember = inputCollection[0];
423+
424+
//Create a Results object to hold the return values
425+
Results response = new Results();
426+
427+
//Add the return values to the Results object
428+
response.outputMember = outputMember;
429+
430+
//Wrap the Results object in a List container
431+
//(an extra step added to allow this interface to also support bulkification)
432+
List<Results> responseWrapper= new List<Results>();
433+
responseWrapper.add(response);
434+
return responseWrapper;
435+
}
436+
437+
public class Requests {
438+
@InvocableVariable(label='Records for Input' description='yourDescription' required=true)
439+
public List<SObject> inputCollection;
440+
}
441+
442+
public class Results {
443+
@InvocableVariable(label='Records for Output' description='yourDescription' required=true)
444+
public SObject outputMember;
445+
}
446+
}
447+
411448
/**
412449
* SHOULD BE RECOGNIZED AS JAVA
413450
* @author John Smith

demo/testcode.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ private void method2() {
464464
@future
465465
(label = true)
466466
private void method3() {
467-
Contact[] acctContacts = [SELECT Id FROM Contact WHERE AccountId IN :newRecordsMap.keyset() WITH SECURITY_ENFORCED];
467+
Contact[] acctContacts = [SELECT Id FROM Contact WHERE AccountId IN :newRecordsMap.keyset() WITH USER_MODE];
468468
List<Contact> acctContacts2 = [SELECT Id FROM Contact WHERE ID = '012000000' AND CreatedDate = :LAST_N_DAYS:90 WITH SECURITY_ENFORCED];
469469
if (Contact.getSObjectType().getDescribe().isUpdateable()) {
470470
update as user acctContacts; //NOPMD

0 commit comments

Comments
 (0)