Questions tagged [context]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
27 views

User/Profile access to Organization fields (IsSandbox) in Flow

I have a Flow that checks the Organization field "isSandbox" to determine whether or not to email a test address or a real address. However, when logged in as a non-admin user, this field is ...
0
votes
1answer
56 views

Error: MIXED_DML_OPERATION Very Confused

I'm very confused about MIXED_DML_OPERATIONerror. Following test case fails in production but passes in uat. @IsTest private class MyControllerTest { private static final String USERNAME ='test@...
0
votes
2answers
136 views

LWC @wire change 'this' context

I have a problem with my code export default class PdmNewModalPlist extends LightningElement { @api objectName; @api fieldName; @api apiName; @api recordTypeId; @track obj; @...
0
votes
0answers
188 views

Flow can't access a CustomNotificationType when called from a Process

I have created a Custom Notification Type called SMS Received. I am calling it from a Flow, where I have insert the correct Id for it and provided all the params. When invoked from the Debugger, it ...
-1
votes
1answer
232 views

How can I determine the calling source of a trigger?

I have a managed package with different triggers. Is there a way to get the calling source that invoked the trigger action? For example: if other package initiated the action, get its namespace, and ...
1
vote
1answer
107 views

Are Business Manager user and Job contexts mean the same in SFCC?

Are Business Manager and Job contexts mean the same in SFCC? I would like to perform OCAPI requests during a job execution. So, I am exploring the OCAPI setup. Here is the documentation excerpt: ...
2
votes
1answer
4k views

Is it possible to pass the id of the current record when calling apex from process builder?

I have a process that acts on Contact creation and waits for an hour, then needs to check to see if a related object was created. Since I haven't found any way to check for that related object (...
0
votes
2answers
33 views

How to open a particular record in salesforce from another web app

I am looking to open a particular object's record in salesforce after clicking a link in some another web app. With the link click I need to pass some set of attributes to Salesforce webservice (...
0
votes
1answer
292 views

What is the execution context for an asynchronous method?

Is it always system context, or it depends on where the method is called?
3
votes
1answer
2k views

Schema.SObjectType.myObj.getRecordTypeInfosByName() runs in User Context?

The documentation for Schema.SObjectType.myObj.getRecordTypeInfosByName() says The current user is not required to have access to a record type to see it in this map So I was in the intention ...
2
votes
1answer
491 views

Find user agent string in lightning controller

In Visualforce controllers, we have ApexPages.currentPage().getHeaders() to get info like user-agent, etc... Is there any equivalent for Lightning controllers? I know this info can be found from $...
6
votes
2answers
410 views

System.runAs not reflected in trigger context

I have a test class, with this code System.debug(UserInfo.getProfileId()); Profile p = [SELECT Id FROM Profile WHERE Name = 'Standard User']; User u = new User(ProfileId = p.Id, ...); System.runAs(u)...
1
vote
0answers
216 views

Executing a block of code in apex class with context/visibility of a specific user

I need to execute a block of code in apex class with context/visibility of a specific user. This user is mentioned in a custom field of a custom object. The need is similar to System.Runas() method ...
4
votes
1answer
1k views

Testing the ACTUAL batchable context in Database.Batchable methods?

I'm trying to mock Database.BatchableContext to make my unit tests more robust and to eliminate excess usage of Test.isRunningTest() running in production code. Few hacks are available like Json....
6
votes
2answers
810 views

How can my code tell if it's inside a Queueable context?

To go with the new System.Queueable interface, I'm looking for the analogy of: System.isBatch() System.isFuture() System.isScheduled() Is there a System.isQueued() or something?
0
votes
1answer
1k views

Unable to retrieve context in canvas app when authenticating with oauth

I’m having trouble authenticating my canvas app using oauth2. This is despite being able to authenticate and connect via other means. The following is my problem in detail… I’ve configured a ...
9
votes
1answer
4k views

Get a FIRST-CLASS SessionID for API Calls (looking for a clean way or alternative)

I am basically facing the same challenge as @Evan here Different Session Ids in Different contexts I'm also running into SessionID related issues, but in a completely different use case. Background ...