Manpreet Singh
IndividualForum Replies Created
-
Manpreet
MemberMay 22, 2017 at 6:07 am in reply to: Is it possible to write a validation rule which will fire only on insert of record not on update of record in salesforce ?Hi saurabh,
You can check the record is new or existing one using ISNEW() function in formula.
Ex:
IF( !ISNEW() , Your validation logic, false);
or
AND(! ISNEW() ,Your validation logic)Please let me know, if it helps you.
Best Regards,
Manpreet. -
Manpreet
MemberMay 22, 2017 at 6:04 am in reply to: How many ways we can make field mandatory, if the field is mandatory at page layout level and if we try to inert records through Salesforce data loader?Hi saurabh,
You have 4 ways to make field required..
At the time of object Creation.
Validation Rule
Writing a trigger.
Making it required on Page layout.Thanks.
-
Manpreet
MemberMay 22, 2017 at 5:59 am in reply to: How can we hard delete a record using a Apex class/by code in salesforce?Hi saurabh,
We can hard delete record or list of records using emptyRecycleBin() function in apex. Pass the record or record list to emptyRecycleBin() to delete it from Recycle Bin.
Contact con = new Contact(Id = '09k110000O5abc');
Database.emptyRecycleBin(con);Note: The DML operation datatbase.emptyRecycleBin() is limited to 200 items.
Thanks.
-
Manpreet
MemberMay 22, 2017 at 5:58 am in reply to: How to get the picklist value in Salesforce Apex class?Hi Saurabh,
To get picklist values in Apex is very simple. I am sharing some code, please go through this:
Here is My Controller
public class testclass { public Job__c job {get;set;} public List<SelectOption> options{get;set;} public testclass() { options = new List<SelectOption>(); Schema.DescribeFieldResult fieldResult = Job__c.Status__c.getDescribe(); List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues(); for( Schema.PicklistEntry f : ple) { options.add(new SelectOption(f.getLabel(), f.getValue())); } } }
My Page
<apex:page controller="testclass"> <apex:form> <apex:pageBlock> Order Status:<apex:selectList id="countries" value="{!job.Status__c}" size="1" required="true"> <apex:selectOptions value="{!options}"/> </apex:selectList> </apex:pageBlock> </apex:form> </apex:page>
Thanks.
-
Manpreet
MemberMay 22, 2017 at 5:55 am in reply to: How do we unit test a trigger when we don’t know the required fields in salesforce?Hi saurabh,
Customers can have validation on custom fields via validation rules and triggers, so handling that in your unit tests without customer intervention is next to impossible. The first step to reducing issues is to have your test data populate all standard fields and ensure the data uses the most common formatting for your customer base (US style phone numbers and addresses for the US for example).
Thanks.
-
Hi Abhay,
Salesforce Chatter is a real-time collaboration tool that facilitates information-sharing across a social network. When Chatter integrates, the Chatter news feeds display using a Search Results List Widget on a Dashboard.
To integrate Chatter with CSM, export Chatter news feeds to a CSV file using the Salesforce Apex Data Loader interface. The create a Stored Import to point to the CSV file and use the CSM Import Data Wizard to import the CSV file into a CSM Business Object that is designated to store the Chatter data (typically, a new Business Object). After the data imports into CSM, the User builds a Search Results List Widget to display the news feed on a CSM Dashboard. This data export and import can be configured to run on a scheduled basis using the CSM Scheduler.
Steps to Integrate :
1.) Export data from Chatter to a CSV file (ex: NewsFeed.csv) using the Salesforce Apex Data Loader. Refer to the Apex Data Loader Documentation to determine which fields should be exported to the CSV file.
2.) Create a Salesforce Chatter Business Object to house the Chatter CSV data (ex: NewsFeed data). The Business Object should include:Type: Major Object.
Name: NewsFeed.
Fields: Add a field to match each column in the Chatter CSV file.
3.) Import the CSV data into the new Salesforce Chatter Business Object:Create a CSV Stored Import, then use the Import Data Wizard to run a one-time import of the CSV data.
When prompted, import the Chatter CSV file into the new Salesforce Chatter Business Object.
When prompted, define how columns from the CSV file are mapped to fields in the Salesforce Chatter Business Object.4.) Create a Search Results List Widget, and then add it to a Dashboard to display Salesforce Chatter data in CSM.
Thanks.
-
Hi Abhay,
There is an appexchange package provided by Salesforce that allows you to to track tweets, create cases, contacts and leads in Salesforce. it also tracks facebook posts and comments.
You can deploy tweets from Salesforce as well.
The package can be installed from here (you'll need to be an Admin): https://appexchange.salesforce.com/listingDetail?listingId=a0N30000003HpEQEA0
There are third party services that integrate into Salesforce such as Radian6 (recently acquired by Salesforce) and other vendors that provide more robust capabilities, but the above should get you started on the key items of engaing, tracking and identifying your audience through twitter.
Apart from that if you want to integrate it by writing your own code , then you need to use their REST API's.Reach out here.You can also refer to this example code.
Thanks.
-
Manpreet
MemberMay 10, 2017 at 5:00 am in reply to: What is the Parallel Approval Routing in Salesforce?Hi saurabh,
Parallel approval process allows specifying (upto 25) multiple approvers simultaneously. The approver setting could be set to unanimous or first action. In unanimous parallel approval process, all approvers must approve a request, before it is considered as approved
Its basically how many approvers you set during the approval process configuration
to learn how : http://help.salesforce.com/HTViewHelpDoc?id=approvals_creating_approval_processes.htm&language=en_USThank you!
-
Manpreet
MemberMay 10, 2017 at 4:59 am in reply to: Tell me about Jump Start Wizard versus Standard Wizard in Salesforce?Hi saurabh,
The Jump Start wizard creates a one-step approval process for you in just a few minutes
The Standard Wizard is useful for complex approval processes.Jump Start Wizard
• The jump start wizard is useful for simple approval processes with a single step.
• Use the jump start wizard if you want to create an approval process quickly by allowing Salesforce to automatically choose some default options for you.Standard Wizard
• The standard wizard is useful for complex approval processes.
• Use it when you want to fine tune the steps in your approval process.
• The standard wizard consists of a setup wizard that allows you to define your process and another setup wizard that allows you to define each step in the process.Thanks.
-
Manpreet
MemberMay 10, 2017 at 4:56 am in reply to: What is the lead conversion process in salesforce?Hi saurabh,
When you convert leads, Salesforce creates accounts, contacts, and, opportunities using information from the leads you’re converting. Salesforce moves any campaign members to the new contacts, and the leads become read-only records. If existing accounts and contacts share the names specified on the leads, you can choose to update the existing accounts and contacts. Salesforce adds information from the lead into empty fields; Salesforce does not overwrite existing account and contact data.
All open and closed activities from the leads are attached to the accounts, contacts, and opportunities. You can assign the owners of these new records, and schedule follow-up tasks. When you assign new owners, only the open activities are assigned to the new owner. If you have custom lead fields, that information can be inserted into custom account, contact, or opportunity fields. Your admin can also set up your custom lead fields to populate custom account, contact, and opportunity fields automatically. You can’t view converted leads, unless your admin has assigned you the "View and Edit Converted Leads" permission. However, converted leads do appear in lead reports. Salesforce updates the Last Modified Date and Last Modified By system fields on converted leads when picklist values included on converted leads are changed.
Once converted, a lead record is no longer searchable, unless your admin has assigned you the "View and Edit Converted Leads" permission. The new account, contact, or opportunity record created from the converted lead is searchable.
Thanks.
-
Manpreet
MemberMay 10, 2017 at 4:53 am in reply to: What are different user licenses available in salesforce and explain them?Hi saurabh,
Following are the various types of Licenses:
Salesforce
Full access to standard CRM and Force.com AppExchange apps.Salesforce Platform
Access to custom apps but not to standard CRM functionality.Force.com – One App
Not available for new customers, this is designed for users who need access to one custom app but not to standard CRM functionality.Force.com App Subscription
Access to a Force.com Light App or Force.com Enterprise App, neither of which include CRM functionality.Knowledge Only User
Access to the Salesforce Knowledge app only.Identity
Access to Identity features such as the App Launcher, included with all paid user licenses in Enterprise, Performance, and Unlimited Editions.Chatter Free
Access standard Chatter people, profiles, groups, and files without a Salesforce license at no additional cost.ChatterExternal
Allows your clients access to chatter groups at no additional cost.Chatter Only (Chatter Plus)
Designed for Performance, Unlimited, Enterprise, and Professional Edition users that don’t have Salesforce licenses but need access to some Salesforce objects in addition to Chatter.Work.com Only User
Available in: Developer; Enterprise; Professional; Unlimited Editions. Designed for users who don’t have a Salesforce license and need access to Work.com.Company Community
Available in: Developer; Enterprise; Unlimited Editions gives access Force.com Light application custom objects, custom tabs, Chatter (people, groups, feeds, files), and aCommunity that includes a Site.com site.To view a list of the active user licenses in your Salesforce, simply click Your Name > Setup > Company Profile > Company Information > User Licenses.
Thanks.
-
Manpreet
MemberMay 10, 2017 at 4:51 am in reply to: How to get the debug log of Connection user in salesforce to salesforce Integration?Hi Saurabh,
When configuring Debug Logs, you cannot choose a Salesforce to Salesforce Connection User from the User Lookup, but there is a workaround to achieve this.
To begin capturing Debug Logs for a Connection User open the following URL in your browser:
XXX.salesforce.com/p/setup/layout/AddApexDebugLogUser?retURL=%2Fsetup%2Fui%2FlistApexTraces.apexp&UserLookupInput_lkid=YYYYYYYYYYYYYY
&UserLookupInput=Connection%20UserReplace XXX with your salesforce instance, UserLookupInput_lkid is the ID of the Connection User and UserLookupInput is the User name. You can find
the user ID of the connection user, by inspecting the CreatedById for a record created by this user. (eg. via eclipse or Force.com explorer)Thanks.
-
Manpreet
MemberMay 9, 2017 at 1:10 pm in reply to: Which fields cannot be added as a custom Index in Salesforce?Hi saurabh,
A Custom Index can't be created on these types of fields:
- Multi-select Picklists.
- Currency fields in a Multicurrency Organization.
- Long text fields.
- Binary fields (fields of type blob, file, or encrypted text.). Thanks.
-
Manpreet
MemberMay 9, 2017 at 1:06 pm in reply to: Why we can't convert Master detail Relationship field to Lookup Relationship Field having Roleup Summary Field?Hi Suraj,
if A is master of B then if you need to change this master detail relationship to lookup then you only need to click on setup -> objects > master detail field > Edit > now you will not be able to see button "change field type" if there is Roll up summary field on Master object so delete it first and also remove it from "deleted fied" trash box then you will be able to see"change field type" button.Once you remove it from trash box change field type will be available to you.Just click on it and change it to LookUp Relationship.
Thanks.
-
Manpreet
MemberMay 9, 2017 at 1:04 pm in reply to: How do you read parameter in visualforce page in salesforce?Hi saurabh,
You can do this by using {!$CurrentPage.parameters.Paramtervalue}, something like this :
<apex:inputField value="{!$CurrentPage.parameters.Paramtervalue}"/>
Hope this helps.
Thanks.
-
Manpreet
MemberMay 9, 2017 at 1:02 pm in reply to: How to get the list of all available sobject in salesforce database using Apex (Dynamic Apex) ?Hi saurabh,
You can do this by using Schema.getGlobalDescribe , something like this :
Map<String, Schema.SObjectType> m = Schema.getGlobalDescribe() ;
system.debug('///' + m );Thanks.
-
Manpreet
MemberMay 8, 2017 at 1:00 pm in reply to: How to lock record using SOQL so it cannot be modified by other user in salesforce?Hi saurabh,
We will need “FOR UPDATE” clause of SOQL.
Account[] accts = [SELECT Id FROM Account LIMIT 2 FOR UPDATE];
Thanks.
-
Manpreet
MemberMay 8, 2017 at 12:58 pm in reply to: Explain some functionality of Force.com Query Optimizer in salesforce?Hi saurabh,
The Force.com query optimizer:
# Determines the best index from which to drive the query, if possible, based on filters in the query
# Determines the best table to drive the query from if no good index is available
# Determines how to order the remaining tables to minimize cost
# Injects custom foreign key value tables as needed to create efficient join paths
# Influences the execution plan for the remaining joins, including sharing joins, to minimize database input/output (I/O)
# Updates statistics.Thanks.
-
Hi saurabh,
Custom metadata is customizable, deployable, packageable, and upgradeable application metadata. First, you create a custom metadata type, which defines the form of the application metadata. Then you build reusable functionality that determines the behavior based on metadata of that type. Similar to a custom object or custom setting, a custom metadata type has a list of custom fields that represent aspects of the metadata.
Thanks.
-
Manpreet
MemberMay 8, 2017 at 12:54 pm in reply to: How can i send Web Request after insert operation?Hi Suraj,
You can do this by using PageReference.But remember your DML and callouts can't be done at the same time, it will throw
System.CalloutException, "You have uncommitted work pending. Please commit or rollback before calling out".You can read more about it here.
Thanks.
-
Manpreet
MemberMay 4, 2017 at 1:27 pm in reply to: If i want to display the Encrypted field on Visualforce and i am using component apex:outputText. Will it work for Encrypted fields in Salesforce?Hi saurabh,
Encrypted custom fields that are embedded in the <apex:outputText> component display in clear text. The <apex:outputText> component doesn’t respect the View Encrypted Data permission for users. To prevent showing sensitive information to unauthorized users, use the <apex:outputField> tag instead.
Thanks.
-
Manpreet
MemberMay 4, 2017 at 1:25 pm in reply to: How to report on User License field in Salesforce?Hi saurabh,
Create a TEXT formula field on the USER object (e.g., SF License)
In the formula section paste the following:
Profile.UserLicense.Name
Save the formula and use SF License in your reports views.
Thanks.
-
Hi saurabh,
Queues are groups of users who can own records. All records in Salesforce must have an owner. An owner is a single entity, queues allow for certain objects to have groups of users own the record.
https://help.salesforce.com/apex/HTViewHelpDoc?id=queues_overview.htm&language=enThanks.
-
Manpreet
MemberMay 4, 2017 at 1:23 pm in reply to: Salesforce error: Insert failed first error: DUPLICATE_VALUE, This price definition already exists in this price bookHi suraj,
This error usually occurs when you try to add a duplicate pricebookentry. First make a check that the product that you're adding in the pricebook already exists in it or not.
Hope that helps.
-
Manpreet
MemberMay 2, 2017 at 1:48 pm in reply to: What is the best way to deserialize Json by JsonParser,json.Deserialize or by Json.deserializeUntyped in Salesforce?Hi suraj,
It depends upon the scenario.Please elaborate more?
Thanks.