Vignex
  • Member for 8 years, 7 months
  • Last seen more than 1 year ago
  • Chennai
How to Get Id of Inserted Record via Apex
10 votes

If you are using statement like "insert account;", the Id of the account can be accessed by "account.Id;". Below code will give you an overview. Account acct = new Account(Name='SFDC Account'); ...

View answer
How to display <apex:repeat> row background with alternative colour?
7 votes

You just need to use the CSS Styling like below. Nothing else is required to use along with <apex:repeat> <style> tr:nth-child(even) { background-color: red; } tr:nth-child(odd) { ...

View answer
Why is my Lightning aura:iterate component not iterating?
Accepted answer
7 votes

Please change <aura:attribute name="expenses" type="Sledgehammer.Expense__c" /> to <aura:attribute name="expenses" type="Sledgehammer.Expense__c[]" /> in your "form.cmp"

View answer
Exception on after insert,update trigger
Accepted answer
6 votes

Please do not update the same sObjectType in the After Triggers. You need to use Before Triggers in this case. This would resolve the System.FinalException: Record is read-only error message. For ...

View answer
Error while implementing a REST Service
4 votes

In your code, your urlMapping is '/v1/accounts/*' but you tried to hit /services/apexrest/AccountRaw. You should be using /services/apexrest/v1/accounts to hit or change your code's annotation to @...

View answer
0% Code Coverage in Production with Quick Deploy
Accepted answer
4 votes

STEPS: 1) You have to re-compile all the classes/triggers - "Compile all Classes" link on Apex Classes page. (i.e.) You need to make sure "Is Valid" check box on Classes and Triggers pages to be ...

View answer
Is there any way to write the trigger based on the approvals
Accepted answer
4 votes

Approvals are handled in ProcessInstance object. For each and every update of your record in the approval process will have an entry (record) in this object. But you cannot write a trigger on this ...

View answer
Unable to deploy code due to code coverage < 75%
4 votes

Before Deploying Code to production, please clear the existing code coverage from the production's Apex class setup page and then run all tests to see the new coverage. The changes that have been done ...

View answer
Lightning components are client side component or service component and how?
3 votes

Lightning Components provides you a Client-Server model where UI& Javascript on the client side and Apex (Aura handlers) on Server Side. Please refer: https://developer.salesforce.com/docs/atlas....

View answer
Customize the send email page in cases
Accepted answer
3 votes

You cannot customize the standard Emails related list under Case. Alternatively, You can achieve this through following steps-from Activity related list: 1) Please copy the javascript code of "Send ...

View answer
How to convert string into datetime format?
3 votes

Please use parse() method instead of valueOf() method. Datetime dt = Datetime.parse(myDate); Please refer for more details on DateTime Methods: https://www.salesforce.com/us/developer/docs/apexcode/...

View answer
How to enable "From <email address>" on Send an Email page
Accepted answer
2 votes

You Need to configure your Org wide Addresses under Email Administration in Setup. From field in Send Email page displays the current Users Email address and along with that all other Org wide Email ...

View answer
Restrict a particular alphabet combination in a field by validation
2 votes

You can create a validation rule using REGEX() method to identify this pattern and block this! Please use the following regex for your scenario: ([P|p])\S?[\.| \r|]?([O|o])\S? ([B|b O|o X|x])\w+ ...

View answer
Email notification after account is created
2 votes

Please use INCLUDES() function in the formula for Multi Select picklist fields. INCLUDES(Hobbies__c, "Golf") Please refer the following link for more details : https://help.salesforce.com/apex/...

View answer
Is it Possible to calculate different business hours, based on different queues and different time zones?
Accepted answer
2 votes

Based on timezone mapping with business hours, you can implement this in Apex using the BusinessHours class. Please refer the links below. https://www.salesforce.com/us/developer/docs/apexcode/...

View answer
Insert list of children from parent object
2 votes

The notation "myparent.child__r" is used while retrieving from query/displaying in a page. An object will be a child when it has a link to parent record through id. So your parent record has to ...

View answer
How to upload from sandbox to production quickly?
2 votes

Instead of waiting for change set in salesforce, you can deploy with Force Eclipse IDE or with Force Migration Tool. Deployments can be done quickly with this.

View answer
Test Class for feilds to check in bulk
1 votes

You can retrieve the fields for an object from Schema DescribeSobjectFieldresult. You have to iterate this list on the object/your record like record1.get(i) to get the value of i field,where the ...

View answer
Salesforce devolopment using eclipse
1 votes

Eclipse is just another IDE for Coding/Deployment for Salesforce. For installation, please go through the following link Eclipse Salesforce IDE Installation guide

View answer
help me in apex class to get account to list
1 votes

You can use controller's constructor than having another call to controller through action="{!accountlist}" attribute on page. Please find the other way to implement this below: <apex:page ...

View answer
Dynamic Hide and Show
1 votes

You need to have the close Style tag </style> followed by an open Script tag <Script> and at the end replace </style> tag with </script> tag. Please refer the updated code ...

View answer
Open a Visual force page as pop up from another visual force page with parameters
1 votes

Please try with JS - Window.open(URL,Name,specs); Sample code: <button onclick="window.open('https://www.google.co.in','Google','height=200,width=200');"> Click </button> For more ...

View answer
error "AccountTriggerBefore: System.LimitException: Too many query rows: 50001"
1 votes

The SOQL query used in the trigger AccountTriggerBefore is returning more than 50K records. Please use LIMIT and provide more filtering criteria in the SOQL query to reduce the number of records ...

View answer
updating the data with new field impacting lastmodifiedby and salesforce internal error
1 votes

1 ->If this logic is written on a controller for a page and you're trying to display this list in a page, then there is a governor limit of only 1000 records, to avoid this use pagination. Also if you'...

View answer
API Login call is failing when logging in on different PC's
1 votes

Clients are not able to gain access because their IP addresses are not listed in "Network Access". You can handle this in following ways: 1) List Client IPs to "Network Access" in Salesforce Setup. ...

View answer
Manager is Required when inserting user through test class
0 votes

I think your User object has a validation rule that will block saving the User record without filling up the Manager lookup field (API name: ManagerID). You can re-write the validation rule with ...

View answer
VisualForce Controller in salesforce
0 votes

This will return the count (size) of the messages list and reduced by 1. (i.e) ApexPages.getMessages() has 2 messages, then ApexPages.getMessages().size() will return 2 and this one - ApexPages....

View answer
Unable to save the record using default save method
0 votes

The default save method will work only if you're using standardcontroller. In your case, you're using custom controller. So you need to define your own save method in your controller to make this work....

View answer
Help me to Get Bulkifying trigger
0 votes

Here you go! Please make sure NULL check on the invoice fields used in your code! trigger InvAmountUpdate on Invoice__c (After Update) { Set<Id> setOfAccountId = new Set<Id>(); List<...

View answer
requester is not available to add as a recipient in email alert
0 votes

You need a lookup field for "Requester" field in your object to use it in the Email Alert through the related user option!

View answer