Questions tagged [system]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
60 views

system.runas and user's time zone

I am writing a test class for testing an API, which populates the value of an iVAR with the logged in user's time zone. In real time, this API works fine. If the logged in User's time zone is EST, I ...
0
votes
1answer
45 views

System.debug prints twice [closed]

I encountered this weird thing: when I use: System.debug(); I get everything printed twice... and it only happens for the Account object. I'm guessing this is a reason why my API callout doesn't ...
0
votes
1answer
38 views

Will System.assert in Apex get deleted automatically when moved to production?

Will System.assert in Apex get deleted automatically when moved to production? Am I free to use System.assert for documentation purposes in my code? I mean will the lines with System.assert be ...
0
votes
0answers
49 views

What is callback interface?

In Salesforce there is an interface StubProvider which is a callback interface. Could anyone explain what is callback interface and how it is different from the normal interface?
0
votes
1answer
35 views

Can you use the developer console while logged in as another user and access information from the original user you logged in from?

So I'm logged in as "Amber," and I have privileges to log in as any user in the system. If I were to log in as "Jessica" and open the developer console, would I still be able to access information ...
0
votes
1answer
50 views

How to get system validations on the field fired before the JavaScript validations on the VisualForce page

I am using a VF page having a custom controller. For simplicity, I am using 2 date fields - fromDate and toDate which belongs to a custom object. There is a command button named Search on VF page ...
0
votes
1answer
59 views

Sandbox Record Access Insufficient Priviledges

Are you able to advise why the System Administrator profile cannot access a record owned by the member of a queue it is not a member of even when it is has view/modify ALL on the Object AND other ...
1
vote
0answers
444 views

How do I check if something is running as system in a formula?

Working with Process Builder, have a nice flow that checks the case for certain data elements, and then creates a new object if it couldn't find one automatically when the case was first created. (...
0
votes
2answers
580 views

How to exclude the “System” from a validation rule?

I know I can add $User.Id == '00550000000lxVg', false, to a formula to exclude a specific user but I can't seem to figure out a UserID for "System". How do I exclude System from a validation rule?
1
vote
3answers
1k views

Setting Password via APEX

I'm try to set a user password and executing the system.setPassword(UserId, Password) method and I always get an error saying that the UserId is invalid. I've checked it and it's the correct UserId. ...
12
votes
2answers
6k views

System vs Date/DateTime class

Is there any difference between System.today() and Date.today()? Similarly, is there any difference between System.now() and DateTime.now()?
3
votes
2answers
832 views

System Administrator profile does not have rights to some new custom fields

We recently added many new custom fields to custom objects within our package. When I deployed the new objects from Eclipse to a target org (for the purpose of packaging) I noticed that the System ...
2
votes
1answer
106 views

What value put in System.Assert Methods To check the its work?

How To Check Different Assert Methods in this code? public with sharing class AssertEx { public integer sum() { integer a =10; integer b =20; integer c; c=a+...
4
votes
1answer
3k views

system.security.NoAccessException: Update access denied for RecordType

I have a Visualforce Page that uses a standard controller (Opportunity) and an extension. In the extension I have a method that saves updates to the opportunity and a related contact. The extension is ...
0
votes
3answers
105 views

Check if a process such as deletion or update is done through data Loader or any other application using apex [duplicate]

I have a trigger that will call a batch process if my data is updated or deleted.It is working well but the problem is that, when I try to delete my data using data loader, i've encounter and error ...
0
votes
1answer
27 views

System Error Created prevention in salesforce

I'm getting a custom validation system errors. How to prevent them: Error Email: Origin: LeadEmailHandler (this is an apex class) Error: Insert failed. First exception on row 0; first error: ...
0
votes
1answer
331 views

NullPointer Exception at Boolean value assign

Please find below class where I get Null Pointer Exception while assigning value to boolean. Please let me know where is my fault here? Thanks! Apex Class: public class CallReplica_controller { ...
7
votes
2answers
5k views

System.now() gives a different hour value and System.now().hour() gives a different value. can any one tell me why so?

String day = string.valueOf(system.now().day()); String month = string.valueOf(system.now().month()); String hour = string.valueOf(system.now().hour()); String minute = string.valueOf(system.now()....
2
votes
2answers
2k views

Excluding System admin from this validation rule

I have the following validation rule ; OR( AND( Upper(MailingCountry) <> 'UK', NOT(ISBLANK(TEXT(UK_Email_Consent__c))) ), AND( Upper(MailingCountry) = '...
1
vote
2answers
196 views

Update Closed Opportunity Owner when validation rules/triggers otherwise prevent changes to closed Oppos

Scenario : If I update Account Owner then I want all its Opportunity Owner should be updated with the same, irrespective of its stage(Closed/Open). I want the new Owner Updations to be made on ...