Monday, June 30, 2014

How to Change Salesforce user Password via Developer Console without resetting password?

How  to Change Salesforce user Password via Developer Console  without resetting password? We need to reset a password or change the password on an user utilizing a 3rd party app in salesforce. This user is there for the app only and not really a physical user in the instance. The email for this user is a person who has left the company or is on vacation but you need the app to work. Solution:     You can do this 2 ways: Change the Email of the user in question Click on Generate Password and click save. But lets say you can not change the Email of the user because you should not be the owner of the app or you are not part of the app as an admin. Here is where you change using Developer Console. Go to Setup and Drop it down to Developer Console or sometimes called...

Sunday, June 29, 2014

What is With Sharing in Saleforce and with sharing Uses in APEX Class

What is With Sharing in Saleforce and with sharing Uses in APEX Class Keyword "with sharing" using:  Apex scripts generally run in the system context, that is, current user’s profile-based permissions, field-level security, and sharing rules are not taken into account during script execution. Because these rules are not the enforced, developers who use Apex must take care that they do not inadvertently expose sensitive data that would normally be hidden from users by profile-based permissions, field-level security, or organization-wide defaults. They should be particularly careful with Web services, which can be restricted by profile, but execute in system context once they are initiated. Use the with sharing keywords when declaring the class to enforce the sharing rules that...

Saturday, June 28, 2014

What is Transient Variable in Salesforce?

What is  Transient Variable in Salesforce? Transient Variable in Sales force:         Transient keyword to declare instance variable that can not be saved and should not transmitted as part of view state for visual force page. View state maintains state of the Database between request and visual force page.      Given below example is use of transient variable where we have created two Date Time and populating. Refresh button is using for refresh the VF page however only time T2 will change at because of this is declare as transient. VF Page: <apex:page controller="ExampleController">   T1: {!t1} <br/>   T2: {!t2} <br/>   <apex:form >     <apex:commandLink...

Thursday, June 26, 2014

What is Order of execution of apex code?

What is Order of execution of apex code? Order of execution of apex code: 1. Before triggers:      If we update child records in before triggers then parent record automatically update. 2. Validation rules:  If validation matches the criteria then error will populate in same page. Runs most system validation steps again, such as verifying that all required fields have a non-null value, and runs any user-defined validation rules. The only system validation that Salesforce does not run a second time (when the request comes from a standard UI edit page) is the enforcement of layout-specific rules. *Note: Saves the record to the database, but does not commit yet. 3. After Triggers: 4. Assignment Rules: 5. Auto Response Rules: 6. Workflow...

Wednesday, June 25, 2014

What are Email Services in Salesforce and How to create Email Services?

What are Email Services in Salesforce and How to create  Email Services? Email services:  Email services are automated processes that use the Apex classes to process the contents, headers, and attachments of inbound email. For example, you can create an email service that automatically creates contact records based on contact information in messages. Each email service has one or more email service addresses that can receive messages for processing. To use the email services, click Your Name ➤ Setup ➤ Develop ➤ Email Services. Given below email service class inserts Contact which is declare in setting of Email Services. Class for Email Services: global class ProcessJobApplicantEmail implements Messaging.InboundEmailHandler {   global...

Tuesday, June 24, 2014

What are the issues while generating the apex class from WSDL Document in salesforce?

What are the issues  while generating the apex class from WSDL Document in salesforce? It’s difficult to connect to external webservices without the following basic features. 1) Salesforce doesn’t support the WSDL SOAP1.2 Version. 2) Without a wsdl binding (wsdl:binding), it is not possible to call a Web Service. 3) It does not support multiple WSDL bindings (wsdl:binding). 4) Inheritance is not supported in wsdl to APEX conversion 5) Enumeration Object types are not supported. 6) WSDL Import functionality is not supported. How to generate the Apex class using WSDL file in salesforce? An Apex class can be automatically generated from a WSDL file that is stored on a local system or network Below is the path To access this functionality: 1) from Setup, click Develop -> Apex Classes. 2)...

Monday, June 23, 2014

How to get field data types for each fields in Salesforce objects?

How to get field data types for each fields in Salesforce objects? We can get the all the standard and custom objects fields data types using the getGlobalDescribe, getDescribe, getType. String objType=’Account’; Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe(); Schema.SObjectType leadSchema = schemaMap.get(objType); Map<String, Schema.SObjectField> fieldMap = leadSchema.getDescribe().fields.getMap(); for (String fieldName: fieldMap.keySet()) { //get all the fields label for Account Object String fieldLabel = fieldMap.get(fieldName).getDescribe().getLabel(); //get data types for each fields Schema.DisplayType fielddataType = fieldMap.get(fieldName).getDescribe().getType(); if(fielddataType != Schema.DisplayType.TextArea) { build your logic if the Field...

Visualforce Form Tags with Examples.

Visualforce Form Tags with Examples. Hi, In this post i am providing basic examples of some of the visualforce tags that are used commonly in our visualforce development. Click on the each tag for Examples. <apex:page> <apex:form>  <apex:pageblock>  <apex:pageBlockSection> <apex:commandButton> <apex:pageBlockButtons>  <apex:commandLink>  <apex:outputLink>  <apex:inputField> <apex:inputFile>  <apex:inputHidden> <apex:inputsecret>  <apex:inputText>  <apex:inputTextarea> <apex:inputCheckbox>  <apex:outputField>  <apex:outputLabel> <apex:outputText>  <apex:pageBlockSectionItem>  <apex:pageBlockTable>  <apex:column>  <apex:dataTable>  <apex:tabPanel> <apex:tab>  <apex:toolbar>  <apex:toolbarGroup>  <apex:pageMessage>  <apex:panelBar>  <apex:panelBarItem> <apex:panelGrid> <apex:panelGroup>  <apex:param> <apex:repeat> <apex:facet> <apex:actionFunction> <apex:detail>  <apex:actionPoller>  <apex:actionRegion>  Message...

How to write message class in apex controllers and Visualforce pages?

How to write message class in apex controllers and Visualforce pages? Message Class: Whenever we perform validations in our custom or extension controllers, we would need to display error messages if the user enters invalid data and these error messages can be constructed and displayed with the help of this Message class. If your application uses a custom controller or extension, you must use the message class for collecting errors. Syntax: In a custom controller or controller extension, you can instantiate a Message in one of the following ways: ApexPages.Message myMsg = new ApexPages.Message(ApexPages.severity, summary); where ApexPages.severity is the enum that is determines how severe a message is, and summary is the String used to summarize the message....
Page 1 of 10312345Next

 
| ,