html
Insert a link in apex:pageMessage from visualforce page and add style definitions to the link
11:10 AM<apex:page showHeader="false">
<style>
a.msglink{
font-size: 100% !important;
margin: 0 3px !important;
color: #015ba7 !important;
}
</style>
<apex:outputpanel rendered="{!$User.IsDowngrade__c}" style="margin:0 3px !important;font-sixe:100% important;">
<apex:pageMessage severity="info" strength="3" summary="This is a test message. Please<a href=https://www.google.com class=msglink target=_blank>click here</a>to test." title="Link Notification" escape="false">
</apex:pageMessage>
</apex:outputpanel>
</apex:page>
Note the following:
- escape="false"
href=https://www.google.com and NOT href="https://www.google.com"- class=msglink to add style definitions
Salesforce has an out-of-the box setting to allow skipping validation rules when you CONVERT a Lead.
However, this setting is not available by default if your organization was created sometime before 2010 i believe. You could however, raise a case with Salesforce and they will enable the feature for your i both your production and sandbox instances.
Below is a screenshot of how it looks, if you do not see this option please contact Salesforce customer support and get it enabled.
However, this setting is not available by default if your organization was created sometime before 2010 i believe. You could however, raise a case with Salesforce and they will enable the feature for your i both your production and sandbox instances.
Below is a screenshot of how it looks, if you do not see this option please contact Salesforce customer support and get it enabled.
Trigger
Apex Class:
The system throws a compile error : Method does not exist or incorrect signature even though everything seems correct. This is because the methods should be defined as static. Below is the corrected code. SOLUTION:
Apex Class:
The system throws a compile error : Method does not exist or incorrect signature even though everything seems correct. This is because the methods should be defined as static. Below is the corrected code. SOLUTION:
With Reporting Snapshots, you might come across this error message.

When you click into the row, it shows you the list of fields that have not been mapped properly.
Solution:
Check your mappings and the data type between the source and target fields. If that still does not solve the issue, check that the RUNNING USER has access to the source and target fields.
In this case, the 'Admin User' did not have access to the source fields and hence this error message.
When you click into the row, it shows you the list of fields that have not been mapped properly.
Solution:
Check your mappings and the data type between the source and target fields. If that still does not solve the issue, check that the RUNNING USER has access to the source and target fields.
In this case, the 'Admin User' did not have access to the source fields and hence this error message.
LAST_N_DAYS:20
This clause means LAST 20 Days.
Using this in a SOQL Query to fetch the List of Cases created 30 days ago, the query will be
THIS_WEEK
This clause fetches records created this week. The Week is calculated as per the notes from Salesforce as :Starts 12:00:00 on the most recent first day of the week before the current day and continues for seven full days. First day of the week is determined by your locale.
More Links and methods:
Apex Date Filters: http://www.salesforce.com/us/developer/docs/officetoolkit/Content/sforce_api_calls_soql_select_dateformats.htm
List View Filters: https://help.salesforce.com/apex/HTViewHelpDoc?id=custom_dates.htm&language=en
This clause means LAST 20 Days.
Using this in a SOQL Query to fetch the List of Cases created 30 days ago, the query will be
List<Cases> allCases = [Select Id from Cases where CreatedDate >= LAST_N_DAYS:30];
THIS_WEEK
This clause fetches records created this week. The Week is calculated as per the notes from Salesforce as :Starts 12:00:00 on the most recent first day of the week before the current day and continues for seven full days. First day of the week is determined by your locale.
List<Cases> allCases = [Select Id from Cases where CreatedDate < THIS_WEEK];
More Links and methods:
Apex Date Filters: http://www.salesforce.com/us/developer/docs/officetoolkit/Content/sforce_api_calls_soql_select_dateformats.htm
List View Filters: https://help.salesforce.com/apex/HTViewHelpDoc?id=custom_dates.htm&language=en
Salesforce Documentation: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_recordtype.htm
You might have to set or update the RecordType of records dynamically using Apex Triggers. In such cases, the RecordTypeId should be queried and fetched at runtime using the below two approaches.
SOQL:
RecordType RecType = [Select Id From RecordType Where SobjectType = 'Contact' and DeveloperName = 'Strategic_Contact'];
The Developer name corresponds to the RecordType Name as shown below.The other method is to use the Describe call.
MaprtMapByName = d.getRecordTypeInfosByName(); Schema.RecordTypeInfo rtByName = rtMapByName.get('Strategic_Contact');

