Questions tagged [switch]
The switch tag has no usage guidance.
5
questions
1
vote
2
answers
46
views
Programmatic way to switch current selected app?
This is exactly the same question from here: Programmatic way to switch apps?
However this solution is outdated and not working anymore. Is there any way to switch from the current selected app to ...
0
votes
1
answer
321
views
Variable does not exist when passing SObject as parameter to method
Refactoring code to merge similar operations and getting an error the SObjects I'm passing to this method are variables that do not exist.
private static List<SObject> getSObjectList(SObject ...
0
votes
1
answer
997
views
Can I perform a switch statement in AMPscript?
new SFMC user here. I'm just wondering if there's an equivalent of a javascript (or GTL) switch statement within AMPscript or if I'm restricted to using IF ELSE statements.
For example, If I take the ...
1
vote
1
answer
35
views
How to eliminate if/elseif/else chain for SObjectType variables? [duplicate]
In a few places I have code of this nature:
private static void myMethod(SObjectType t) {
if (t == Claim__c.SObjectType) xyzForClaims();
else if (t == Account.SObjectType) xyzForAccounts();
...
9
votes
1
answer
3k
views
Switch "when" cannot see constants?
I am trying to use a switch statement with constants but it doesn't appear that the switch statement can see the constants.
At the top of the class I have:
private final String A_B_C = 'a b c';
...