• sfdcjoey
  • 75 Points
  • Member since 2016

  • Chatter
  • 1
    Best Answers
  • 0
    Likes Received
  • 24
    Likes Given
  • 36
  • 6

1.what opportunity line item in salesforce & what the use..
2.who to rectifiy view state error in salesforce.
3.what is transcent key  and varaible key use....
What would happen if I perform a DML update operation on the before update trigger of the same sObject record ?
What should be done to override the governor limit that restricts you from fetching more than 50,000 records in a SOQL query ?
Suppose there are 2 Account records with 3 contacts associated against each Account record. What would be the end result, if I merge these two Account  records ?
There is a simple SOQL query ‘Select Id, Name from Opportunity’ which fetches millions of records without any selection criterion. How do we optimize the performance of this simple query without using any selection criterion ?
Difference between process builder and flow. Please some help me with this question
How to fecth data of different record types for account object using SOQL query?
how to fecth data in map collection ?
What is the use Database.Stateful in batch Apex ? Can some one explain with an example please.
What trigger we have to use if we want to insert, update any record into “Account”?
How to map leads fields during conversion to custom object .
why Cant you do a dml in constructor?
How to try batch apex example in developer edition ?
I am new to webservices. Can anyone give an real time example to  Rest Apex Class, to illustrate post and get method from an outside application ?
How do i know who all accessed VF page ? I mean how to get the user id of the people who viewed that page
What happens to the records owned by an user if he is deactivated , suppose he has opportunity in progress , what will happen to that particular opportunity ?
Which companies use Salesforce in USA ?
What’s the difference between a VF inputText component and an inputField component?
What creative solutions have you come up with to navigate around a governor limit?
What VF standard component would you use to display data in a table?
What are the steps in creating a portal user and cloning the new account?
Dear All, Need your help urgently.  i tried several methods but failed.
I have to create two fields under the object " Lead". ( for insurance industry)
1.Renewal month (January, February… December etc)
2. To call at renewal (yes, no, blank)

In term of workflow, if 2 above is Yes to create a task “renewal follow-up” with a due date which falls on the 1st day of the month before expiry i.e. if the renewal month is December, the task due date should be 1st November . The year should be dependent on current month, if current month is > than expiry month, to set the year as current year + 1. So, if Renewal month is say, January, and now its September, then the due date year should be 2017- January.

Now I created two fields , both as picklist " Renewal month " i created as picklist with the month values ( but seems it shouldnt be picklist , as further in my rules its not taking as months ).
Then I created a process builder, criteria as if " to call at renewal = Yes", then
the below formula field on ths process builder,
User-added image

But then as , its a picklist field its showing the error,
User-added image

If i tryto create this field as Date then i am getting all date/month/year, whereas i need only the month to get choose by the users. Can you plz suggest how to goahead with this, as i need to urgently implement this. Thanks
HI Experts ,
I need a Real Time example to integrate Salesforce with external systems using SOAP/REST Service?

Thanks in advance
1.Create a Generic Deep clone functionality in Salesforce to clone a certain master record and all the child records associated to it. The child records can be of Lookup or Master Detail relationship. plz give any example...
2.what is meant by generic deep

1.what opportunity line item in salesforce & what the use..
2.who to rectifiy view state error in salesforce.
3.what is transcent key  and varaible key use....
Hi all,

I have requirement where I have to open a contact record after invoking the rest api but before returning the response.

My rest api class is:-
global with sharing class RESTAgentController {

    global static String doPost(String customerId,String cus_context,String ContactNo) 
        String customer_Id= customerId;
        String context= cus_context;
        String cus_ContactNo= ContactNo;       
        String agent_num='434343434';
        return agent_num;

The vf and the controller for opening the contact record are:-

Visualforce Page:-
<apex:page Controller="autoContactController" action="{!redirect}" > </apex:page>

Apex controller:-

public with sharing class autoContactController{
    public PageReference redirect() { 
        String phone = ApexPages.currentPage().getParameters().get('phone');
        String contactId = '0032800000ZW42T';
        PageReference pr = new PageReference('https://ap2.salesforce.com/console#%2F'+contactId);
        return pr; 

Can anyone please help??????
Can anyone suggest where can I get scenario based questions for interviews of different SFDC concepts ?
Dear all, I need help with getting started with Webservices. We have a customer who would like to integrate their webservices in Salesforce. Webservices return XML format and customer would like to push data to Salesforce on daily basis (Approx 10,00 to 15,000 records daily). How can we acheive this?
  1. Will I need a WSDL document generated for customer`s webservices to get started and consume the webserivces? If yes, can someone please suggest me standard practices (maybe step by step) and give me a sample code to make daily callouts.
  2. Does all Webservices support JSON or does that depend upon type of Webservices we are interacting with?
Since I`m new to Webservices, any help is much appricated. 
Hi ! I need to write a wrapper class to display records of an account with a checkbox. Along with the list of records I need to have 'next' & 'previous' buttons. In the same page I need to display the list of Accounts selected immediately whenever they are selected. 
Hi All,

Q). One object (s1) & 3 tasks (t1, t2, t3) are there. Each task performing discount related stuff.
   Write a trigger that should calculate the sum of 3 tasks.  And if any task is modified than trigger should fire automatically & perform the same.

Can any one reply for this post..
Thanks in advance

Thanks in advance for your help here.
I have a requirement where when i have list of accounts clicking on it it should display account,contacts and related opportunities in a single visual page of a particular account clicked.
Pls note it should not go to any detaul page.
HI ,

Find accounts which are enabled as partner user  and doesn't have partner user ?
Hi All,

Q). 3 users with same profile (R/W permissions), need to remove Read permission for one user, how can we achieve that?

Can anyone reply for this post...
Thanks in advance.

I would like to know the best options available to fulfill below requirements -
  • Attachments needs to be shared from Salesforce ( Service Cloud - Cases) to various other systems throughs REST API ( Max size - 25 MB)
  • Attachments will be send on Case Creation + Update (Anytime a customer attaches a new attachment)
  • Based on certain parameters inside Salesforce, the attachment could be secured ( need user authentication) or public in nature.
Please suggest the options.


How to display the custom object records to customer community plus user created by customer community user.And i have build the hiearachy relation between customer comunity user and customer community plus user in contacts using 'Reports To' lookup.Please find the below screen shot for reference.

User-added image

How to integrate sharepoint with salesforce??

I have completed code for sharepoint/salesforce integration code below,but I don't know how to implement this step by step i.e within one class or in different class.

I am new in salesforce development,please help me.

How Salesforce Performs Step 1
The main point for cloud based integration is to host a running service on Microsoft’s cloud app platform Azure, and leveraging it to interact with SharePoint. Since the service is hosted on a cloud platform, we usually access it via web-based URL. So our methods from Salesforce side to request authentication token look something like this:
public static String getToken() {
String token;
if(!Test.isRunningTest()) {
token = SharePointAPIUtility.SharePointAPIGet('http://testingalgoworks.azurewebsites.net/Api/Values/GetAuthToken','Test@test.com','TestingPassword');
system.debug('token>>> '+token);
if(token != null) {
return EncodingUtil.urlEncode(token.replaceAll('"',''), 'UTF-8');
return null;
public static String SharePointAPIGet(String endpointUrl,String username, String password) {
try {
HttpRequest httpRequestObject = new HttpRequest();

Blob headerValue = Blob.valueOf(username + ':' + password);
String authorizationHeader = 'BASIC ' + EncodingUtil.base64Encode(headerValue);
httpRequestObject.setHeader('Authorization', authorizationHeader);

system.debug('httpRequestObject>> '+httpRequestObject);

Http http = new Http();
HttpResponse httpResponse ;

httpResponse = http.send(httpRequestObject);

if(httpResponse != null && httpResponse.getStatus() == 'OK' && httpResponse.getStatusCode() == 200) {
return httpResponse.getBody();
else if(httpResponse != null) {
return 'SharePoint Server Error: Status '+ httpResponse.getStatus()+' Status Code '+ httpResponse.getStatusCode() +' Body '+httpResponse.getBody();
} catch(CalloutException ce) {
throw ce;
} catch(Exception ex) {
throw ex;
return null;
This code hits the Azure service using the URL and receives the authentication token which the Azure service sends.
We will come to the steps 2,3 and 5 right after the 5th:
How Salesforce Performs Step 5
Once Salesforce has authentication token, it uses that to request files and folders from the adapter. Once again it uses the Azure service URL to hit the service.
Here’s a method to request files and a method to request folders
public static List<String> getAllFolders(SharePoint365APIParser objSharePoint365APIParser){
try {
list<String> objFolders = new list<String>();
if(objSharePoint365APIParser.folders != null && objSharePoint365APIParser.folders.size()>0) //null check
for(SharePoint365APIParser.folders sp:objSharePoint365APIParser.folders) {
return objFolders;
} catch(Exception ex) {
throw ex;
return null;
public static List<String> getFilesByFolder(String folderName, SharePoint365APIParser objSharePoint365APIParser) {
//if(!test.isRunningTest()) {
if(objSharePoint365APIParser.folders != null && objSharePoint365APIParser.folders.size()>0)
for(SharePoint365APIParser.folders sp:objSharePoint365APIParser.folders) {
if(sp.name.equalsIgnoreCase(folderName)) {
if(sp.files.size() > 0) { 
return sp.files;
} else {
return new list<String>();
} catch(Exception ex) {
throw ex;
//}//end running test loop

return null;
How Azure Performs Step 2, 3, and 4
Once Salesforce has sent the request for authentication token, here’s how Azure platform service authenticates login.
public bool Login(string email, string password) {
//throw new Exception("This is error!!");
bool validateLogin = false;
List<string> MessageList = new List<string>();
//string decryptedPassword = Encryption.Decrypt(encryptedPassword);
if (email == ConfigurationManager.AppSettings["Email"] && password == ConfigurationManager.AppSettings["Password"]) {
string authInfo = email + ":" + password;
authInfo = Convert.ToBase64String(System.Text.Encoding.Default.GetBytes(authInfo));
//authInfo = Encryption.Encrypt(authInfo);
System.Web.HttpContext.Current.Response.AppendHeader( "Authorization", "Basic " + authInfo);
// Insert User Token
MessageList.Add("Login Successful");
validateLogin = true;
else {
MessageList.Add("Invalid Username Or Password");
return validateLogin;
How Azure service handles Step 6
Now that Salesforce has authentication token and is logged in on SharePoint, here’s how our Azure service parses the request for file and folder lists.
public Folders GetResourceData() {
Folders fld = new Folders();
try {
using (ClientContext clientContext = new ClientContext("https://yourprojectname.SharePoint.com/Resources"))
SecureString passWord = new SecureString();
foreach (char c in "TestPassword".ToCharArray()) 

clientContext.Credentials = new SharePointOnlineCredentials("Test@test.com", passWord);
Web rootweb = clientContext.Web;
var folders = rootweb.GetFolderByServerRelativeUrl("/Resources").Folders;
string pString = @"\Resources\";
fld.folders = new List<Folders>();
fld.name = "Resources";
foreach (Microsoft.SharePoint.Client.Folder myFolder in folders)
fld.folders.Add(GetFoldersAndFiles(myFolder, clientContext, pString));
catch (Exception)

fld.name = "Some error happened."; }
return fld;
private Folders GetFoldersAndFiles(Microsoft.SharePoint.Client.Folder mainFolder, ClientContext clientContext, string pathString) {
Folders fldr = new Folders();
List<string> fls = new List<string>();
fldr.folders = new List<Folders>();
clientContext.Load(mainFolder, k => k.Files, k => k.Folders);
foreach (var folder in mainFolder.Folders)
string folderPath = string.Format(@"{0}{1}\", pathString, folder.Name);
if (folder.Name != "Forms")
fldr.folders.Add(GetFoldersAndFiles(folder, clientContext, folderPath));
foreach (var file in mainFolder.Files)
fldr.files = fls;
if (mainFolder.Name != "Forms")
fldr.name = mainFolder.Name;
return fldr;

Can  any body tell me the difference betwen the getvalues() and getinstance () methods  customsettings.

Iam new to customization, I want to know In  which situation we can go with List,set and map.
i need help from tou 
How to write a code to given scenario
User-added image
this is my vf page in this vf page insert values and click on save button.
After click of save button record will save and it will redirecting to object.
here i dont want to go object record page. after click of save button record save and page will redirect same vf page like below
User-added image
I am having an issue with a permission to an object for a certain user.  They should only be able to view the objects that they created.  The OWD is set to private and his profile does not have any access to this particular object.  I went through all of the permission sets, but there are a lot, so I am not certain where it is allowing them to view all of the objects in that object's own tab under view all.

Is there a better or easier way to troubleshoot and determine where they are getting the access to view all of the data of the particular object? They can view ones that the admin created.

  • August 19, 2016
  • Like
  • 1
How to get rid of this error?
Can anyone please suggest way to remove this error?!

Thanks inadvance.