Z33dawg
  • Member for 3 years
  • Last seen this week
  • Montreal, QC, Canada
Convert String to Time format Apex
Accepted answer
5 votes

If the time is always going to be in the format of 'HH:mm' you can convert the String '16:00' to a Time like this: public static void updateTime(String recordId, String strTimeChange){ String[] ...

View answer
How to combine/manage all aliases for the same org
Accepted answer
4 votes

To see all the orgs you have with the aliases associated use the command: sfdx force:org:list To see all aliases you set: sfdx alias:list To remove the alias alone, you can use the command: sfdx ...

View answer
[APEX]: Way to iterate over method parameters
Accepted answer
3 votes

As @Derek F said, you can either change method so that it accepts a list (or a map). You can always do the following: public static void myMethod(String param1, String param2, String param3, String ...

View answer
SOQL not returning all results after adding new accounts
Accepted answer
2 votes

In the developer console, If you write a query for example Select Id, Name FROM Account and click on the 'Execute' button, it will execute the query. Once a tab is open in the dev. console with ...

View answer
Trigger Compare Old and New AccountOwner of a Contact
Accepted answer
2 votes

I think your problem is that in your Contact Trigger, the Trigger.New list only contains Contact field info. You cannot access parent object fields directly, you need to query them first. i.e, in ...

View answer
How to query parent record,given the child record I'd in Salesforce?
2 votes

@CommonCoreTawan is correct. I don't understand why you need to do this without using the "borrower__c" or "borrower__r field". Considering you want to only use the opportunity Id and NOT Borrower__r....

View answer
Apex Logic Question
2 votes

You should notice that you have a small mistake in your decision logic. When you write: (UserInfo.getProfileId() != '00ei0000000KWzj' || UserInfo.getProfileId() != '00ei0000001Mglo') this statement ...

View answer
Given a list of user ids, how can I get these users profiles?
Accepted answer
2 votes

You can loop through the list and add the profile Ids to a set like this: public static Set<Id> getProfilesFromUser(List<User> userList>){ Set<Id> setProfileIds= new Set<Id&...

View answer
Validation Rule on Task AssignedTo Standard Field
Accepted answer
1 votes

Here is a possible answer to your question: If you are logged in as that user than I believe $User.Id should resolve to the logged in UserId. To reinforce this, if the logged in user can access dev ...

View answer
Data Migration - How to set Opportunity Closed Date in Past?
Accepted answer
1 votes

As @Sebastian Kessel pointed out, this sounds like is probably due to an Opportunity validation rule of some other customization an Administrator configured in your org to ensure Opportunity Close ...

View answer
cannot view the entire text in Case comment
1 votes

You can manually Wrap the text by clicking on the arrow near the Comment Header and selecting Wrap Text, but I dont believe there is a way to set the default behaviour to wrap the text. It looks like ...

View answer
I am Unable to acces the map values(Highlighted line)
1 votes

You map is defined as Map<String, <List<Membership_Sales__Line__c>> lineRelatedRecords when you access the map, given a key, the value that will be returned is a reference to the List ...

View answer
SQL to not insert line if RecordTypeID = "123" or "123"
Accepted answer
1 votes

As @zuzannamj said, is SQL, a list of rows are returned. You can filter the list of rows returned in the WHERE conditions. Currently you added: WHERE Contacts.HasOptedOutofEmail = 0 so the engine ...

View answer
Different Formula for Different Record Types
Accepted answer
1 votes

What do you mean by cleaner way. The IF() can be pretty clean / easy to implement if you print it clearly. IF(RecordType.Name = 'RT1', 'ABC', IF(RecordType.Name = 'RT2', 'DEF', IF(RecordType.Name = '...

View answer
before adding new role, must end previous trigger
Accepted answer
1 votes

@Rodrigo is correct. After you clarified your Question in the comments below. I will make some assumptions that you should have made in your question. 1.There is a field on the Role_History__c object ...

View answer
CSV header row error when using DataLoader
Accepted answer
1 votes

I found this thread with similar problems. Try the following: Make sure CSV encoding of data loader settings matches your file (make sure both are UTF-8). There are a variety of settings for CSV ...

View answer
Query Still Pulling Records Even with Clear WHERE statement
1 votes

This is most likely due to differences in em-dashes or spaces. I have had similar issues with picklist value API names in the past. Try modifying your SOQL query to: SELECT Id, StageName, ...

View answer
how can i query all attachments related to a case?
1 votes

I created this method which returns a List<ContentVersion> of all [latest versions] of child attachments from a parent Id. It uses two SOQL queries. public List<ContentVersion> ...

View answer
Attempt to de-reference a null object while calling objects of object value
Accepted answer
1 votes

When you are declaring : Obj3.Object2__c = Obj2.Id; Obj3.Object1__c = Obj1.Id; you are associating populating Obj3.Object1__c field with the ID of Obj1. the object has not been inserted and while ...

View answer
Data not visible on formula field on Object Detail page
1 votes

Your question is indeed quite generic. I believe that if you reference a cross object field in a formula field, users will be able to see the value of the formula field even if they do not have ...

View answer
I haven't access to the [ScratchOrgInfo] object
1 votes

you have to enable Dev Hub in your ORG. (Setup --> DevHub) This successfully fixed the problem for me and was able access to the [ScratchOrgInfo] object and create my Scratch Org. See the following ...

View answer
Hyperlink field leading to Opportunity Record (Flow and Process Builder)
0 votes

Adding a relevant answer since you refined your question. Since you can't access parent fields of a polymorphic relationship using a formula field or a process builder, you would need to build ...

View answer
Hyperlink field leading to Opportunity Record (Flow and Process Builder)
0 votes

First of all, I would start, by challenging this requirement because there if a Task is related to an Opportunity, then the 'Related To' field on the Task will already be a hyperlink to the ...

View answer
SOQL query for the "Where is this used?" button for a particular field
0 votes

I believe the object you are looking to query is: MetadataComponentDependency This is most likely what Salesforce uses behind the scenes with the 'Where is this used?' button. I have not tested this, ...

View answer
How can I get a User's field in Account Team Member?
Accepted answer
0 votes

As @David Reed said please edit your question to show us the problem, your formula field and what you have tried to do. It is important to add these items to this forum so that other people can see ...

View answer
Display a popup on save of Account
0 votes

I don't believe you can use Javascript to override / add events to the standard record form. Unfortunately, Aside from overriding a record edit form with a custom VF page or lightning component (...

View answer
Lead sharing criteria Rule doesnt work
0 votes

If I understand correctly, your Sharing Rule granted the user Read access, but not Read/Write Access. This should be configurable in the Sharing Rule definition. Please ensure that the Sharing rule is ...

View answer
Why PIcklistValues is empty?
0 votes

This worked fine for me: I opened up the Rest Explorer in workbench (logged in to dev org as admin) and executed a GET request using the following URI /services/data/v41.0/tooling/sobjects/RecordType/...

View answer
How to achieve Asynchronous Apex with Aura Components? (NOT Callouts)
0 votes

Can you post some of your code to give a context: Have you tried giving this a shot: Return Result for Asynchronous Code If you haven't tried that, I would try implementing it. Your callback should be ...

View answer
Ownership and criteria based sharing rule
0 votes

Remember that answers you find online are not necessarily correct. Here is my logical argument: I think this question may be meant as a trick because you have to choose a rule type for a sharing rule, ...

View answer