Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"apexPMD.enableCache": false,
"[css]": {
"editor.formatOnSave": false
}
}
"editor.formatOnSave": true
},
"[js]": {
"editor.formatOnSave": true
}
}
3 changes: 3 additions & 0 deletions demo/cheatsheet.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ node ./tools/build.js -t browser
node tools/build.js -t node apex
node tools/build.js -t cdn :common apex
node tools/build.js -t browser :common apex

# run tests
npm run build_and_test
5 changes: 2 additions & 3 deletions demo/markupcheck.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script charset="UTF-8" src="../dist/apex.min.js"></script>
<link rel="stylesheet" href="./testcode.css" />
<!-- <link rel="stylesheet" href="../src/styles/monokai-sublime-apex.css" /> -->
<link rel="stylesheet" href="vs.css" />
<link rel="stylesheet" href="vs.css" />
<script>
hljs.debugMode();
hljs.highlightAll();
Expand Down Expand Up @@ -36,7 +36,6 @@
Integer z
) {


Account a = new Account();
a.Custom__c = 'stringvalue';
insert a;
Expand Down Expand Up @@ -71,7 +70,7 @@

trigger CTrig on Custom__c (before insert){
System.debug('inserting a record');
upsert myRecord__c;
upsert as system myRecord__c;
}
</code></pre>
</body>
Expand Down
4 changes: 2 additions & 2 deletions demo/soqlsamples.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ WHERE Id IN
[SELECT Id FROM Account WHERE CreatedDate = NEXT_N_FISCAL_QUARTERS:6]
[SELECT Id FROM Opportunity WHERE CloseDate = N_WEEKS_AGO:3]
[SELECT Id FROM Account WHERE CreatedDate = YESTERDAY]
[SELECT Id, MSP1__c from CustObj__c WHERE MSP1__c includes ('AAA;BBB','CCC')]
[SELECT Id, MSP1__c FROM CustObj__c WHERE MSP1__c includes ('AAA;BBB','CCC') WITH SYSTEM_MODE]
[SELECT Id
FROM Case
WHERE Contact.LastName = null]
Expand All @@ -57,4 +57,4 @@ GROUP BY Name]
GROUPING(LeadSource) grpLS, GROUPING(Rating) grpRating,
COUNT(Name) cnt
FROM Lead
GROUP BY ROLLUP(LeadSource, Rating)]
GROUP BY ROLLUP(LeadSource, Rating) WITH USER_MODE]
45 changes: 41 additions & 4 deletions demo/testcode.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<meta charset="UTF-8" />
<script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/highlight.js"></script>
<script charset="UTF-8" src="../dist/apex.min.js"></script>
<link rel="stylesheet" href="./testcode.css" />
<!-- <link rel="stylesheet" href="../src/styles/monokai-sublime-apex.css" /> -->
<link rel="stylesheet" href="vs.css" />
<!-- <link rel="stylesheet" href="./testcode.css" /> -->
<link rel="stylesheet" href="../src/styles/monokai-sublime-apex.css" />
<!-- <link rel="stylesheet" href="vs.css" /> -->
<script>
hljs.debugMode();
hljs.highlightAll();
Expand Down Expand Up @@ -76,6 +76,13 @@
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
* @group Visualforce
* @since 2022
* @example
* for (Dashboard d : dashboards) {
* List<BotField> fields = new List<BotField>();
* fields.add(new BotField('Name', d.Title, '/lightning/r/Dashboard/' + d.Id + '/view'));
* fields.add(new BotField('Folder', d.FolderName));
* records.add(new BotRecord(fields));
* }
*/
public with sharing class ActionPlanDetailController {

Expand Down Expand Up @@ -325,7 +332,7 @@

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

Database.update(dependentTasksToUpdate);
Database.update(dependentTasksToUpdate, AccessLevel.USER_MODE);

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

Expand Down Expand Up @@ -408,6 +415,36 @@
ActionPlansTriggerHandlers.actionPlansSObjectTriggerHandler('Account');
}

public with sharing class GetFirstFromCollection {
@InvocableMethod
public static List <Results> execute (List<Requests> requestList) {
List<SObject> inputCollection = requestList[0].inputCollection;
SObject outputMember = inputCollection[0];

//Create a Results object to hold the return values
Results response = new Results();

//Add the return values to the Results object
response.outputMember = outputMember;

//Wrap the Results object in a List container
//(an extra step added to allow this interface to also support bulkification)
List<Results> responseWrapper= new List<Results>();
responseWrapper.add(response);
return responseWrapper;
}

public class Requests {
@InvocableVariable(label='Records for Input' description='yourDescription' required=true)
public List<SObject> inputCollection;
}

public class Results {
@InvocableVariable(label='Records for Output' description='yourDescription' required=true)
public SObject outputMember;
}
}

/**
* SHOULD BE RECOGNIZED AS JAVA
* @author John Smith
Expand Down
2 changes: 1 addition & 1 deletion demo/testcode.txt
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ private void method2() {
@future
(label = true)
private void method3() {
Contact[] acctContacts = [SELECT Id FROM Contact WHERE AccountId IN :newRecordsMap.keyset() WITH SECURITY_ENFORCED];
Contact[] acctContacts = [SELECT Id FROM Contact WHERE AccountId IN :newRecordsMap.keyset() WITH USER_MODE];
List<Contact> acctContacts2 = [SELECT Id FROM Contact WHERE ID = '012000000' AND CreatedDate = :LAST_N_DAYS:90 WITH SECURITY_ENFORCED];
if (Contact.getSObjectType().getDescribe().isUpdateable()) {
update as user acctContacts; //NOPMD
Expand Down
Loading