• Sachin Bhalerao 17
  • NEWBIE
  • 275 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 79
    Questions
  • 28
    Replies
Dear Team ,

Thank you for your continous support !!!

Please let me know how to integrate Salesforce to facebook . In social account m not getting facebook option plz have a look on attached file . User-added imageThanks & Regards
Sachin Bhalerao
Dear Team ,

Greetings !!!

Please make available any REST API which integrates Salesforce to Netsuite . 

Thanks & Regards
Sachin Bhalerao
Dear Team ,

Greetings !!!

I am looking for salesforce to Netsuite integration using REST API. Please provide me some API for the same .

Thanks & Regards
Sachin Bhalerao
Dear Team ,

Greetings !!!

I am performing REST API UsingWeather Example . M refering this website https://focusonforce.com/integration-and-data-loading/rest-api-using-weather-example/ . On my visual force m experiencing error . Plz have a look on my Code and snapshot .  I enable my API moreover configuration settings also i made . Plz help me to solve this issue .

User-added image
APEX Class :

public with sharing class testopenweather {

	public String city {get;set;}
	public String temp {get;set;}
	public String pressure {get;set;}
	public String humidity {get;set;}
	public String temp_min {get;set;}
	public String temp_max {get;set;}

	public testopenweather(ApexPages.StandardController stdController) {
		Account account = (Account)stdController.getRecord();
		account = [SELECT Id, ShippingCity FROM Account WHERE Id =:account.Id];
		//account = [SELECT Id, ShippingCity FROM Account WHERE Id ='0012v00002pNKoyAAG'];
        
		String accountCity = account.ShippingCity;
		String apiKey = '0284633ceb975c6164fa90f016d87e02';

		String requestEndpoint = 'http://api.openweather.org/data/2.5/weather';
		requestEndpoint += '?q=' + accountCity;
		requestEndpoint += '&units=metric';
		requestEndpoint += '&APPID=' + apiKey;
		
		Http http = new Http();
		HttpRequest request = new HttpRequest();
		request.setEndpoint(requestEndpoint);
		request.setMethod('GET');
		HttpResponse response = http.send(request);

		// If the request is successful, parse the JSON response.
		if (response.getStatusCode() == 200) {

		   // Deserialize the JSON string into collections of primitive data types.
		  Map<string,object> results=( Map<string,object>)JSON.deserializeUntyped(response.getBody());
           // city=string.valueof(result.get('name'));
           city = String.valueOf(results.get('name')); 
             Map<string,object> mainresults=( Map<string,object>)(results.get('main'));
            temp = string.valueOf(mainresults.get('temp'));
             pressure = string.valueOf(mainresults.get(' pressure'));
             humidity = string.valueOf(mainresults.get('humidity'));
             temp_min = string.valueOf(mainresults.get('temp_min'));
             temp_max = string.valueOf(mainresults.get('temp_max'));
            
        }
        else {
            ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Tere was an error');
            ApexPages.addMessage(myMsg);
            
        }
    }
}

Visual Force :

<apex:page standardController="Account" extensions="testopenweather" showHeader="false" sidebar="false">
    <apex:pageBlock title="{!city} Weather">
		<apex:pageBlockSection>

			<apex:pageMessages/>

			<apex:outputText label="Temperature" value="{!temp}"/>
			<apex:outputText label="Pressure" value="{!pressure}"/>
			<apex:outputText label="Humidity" value="{!humidity}"/>
			<apex:outputText label="Minimum Temperature" value="{!temp_min}"/>
			<apex:outputText label="Maximum Temperature" value="{!temp_max}"/>

		</apex:pageBlockSection>
	</apex:pageBlock>
</apex:page>
Thanks & Regards
Sachin Bhalerao
 
Dear Team ,

Greetings !!!

I created one case assignment rule which posts email as soon as case is generated . Now my requirement is that how can i receive and store the feedback of client once case is 'CLOSED'.

Thanks & Regards
Sachin Bhalerao
Dear Team ,

Greetings !!!

I created button and m applying that button on page layout . But that button not appearing on Standard objects .

Thanks & Regards
Sachin BhaleraoUser-added imageI created Click on whatsapp chat button . What should i do in order this button will appear .
Dear Team ,

Greetings for the day !!!

I am going to integrate Salesforce with Google Drive . I configured files connect , Permission sets , Auth Providers moreover callback URL also generated . Parallely i am using https://console.developers.google.com/projectselector but when m feeding callback url it is showing error please have a look on snapshot and suggest me some steps in order m able to solve the error .

Thanks & Regards
Sachin BhaleraoUser-added image
Dear Team ,

Thank you for your continous support !!!

Please share me some steps on how to integrate Salesforce with whatsapp .

Thanks & Regards
Sachin Bhalerao
Dear Team ,

Greetings !!!

Please make available some steps on integration of salesforce with Netsuite .

Thanks & Regards
Sachin Bhalerao
Dear Team ,

Greetings !!!

Please let me know how can i integrate salesforce with NetSuite . Please make available some steps .

Thanks & Regards
Sachin Bhalerao
Dear Team ,

Greetings for the day !!!

I created Dataset in Wave Analytics but after selecting fields from Standard object Next button is not visible . Plz have a look on the pic :User-added image
Kindly let me know what to do next .

Thanks & Regards
Sachin Bhalerao
Dear Team ,

Thank you for your Continous support !!!

I have to build one Process builder . For eg if Account is new (First time) . And in Opportunity amounty is greater than $5,000,000 then some discount should appear in amount field of opportunity standard object . Plz let me know how would i create this Process builder.

Thanks & Regards
Sachin Bhalerao
Dear Team ,

Greetings !!!

Please let me know the Life cycle of Service cloud step-by-step . If case is not solved how it is escalated and what happened if case is not solved in mentioned time .

Thanks & Regards
Sachin Bhalerao
Dear Team ,

In my Personnal info section security token link is missing . How can i search my security token .

Thanks & Regards
Sachin Bhalerao
Dear Team ,

Greetings !!!

I have created SOAP class plz . plz look at below code :

global class accSOAPint {

    webservice static Account dopost(String Name){
        Account acc = new Account();
        acc.Name = Name;
        insert acc;
        return acc;
        
    }
}

Now i have to test this method on Workbench . Plz share the code that we have write in body section .

Thanks & Regards
Sachin Bhalerao
Dear Team ,

Greetings !!!

Thank you for your support . I have created one APEX class for SOAP service it contains one method to insert data into Account Standard object . Plz let me know how i call this class and metod through Workbench tool . This is my code

class name : accSOAPint 

global class accSOAPint {

    webservice static Account dopost(String Name){
        Account acc = new Account();
        acc.Name = Name;
        insert acc;
        return acc;
        
    }
}

Thanks & Regards
Sachin Bhalerao
Dear Team ,

M working on REST API and i write following code . But m receiving error plz have a look on code and snapshot :
 
APEX Code:

public with sharing class AccountRest {
    
 
    
    public list<account> acc{get{
    
    	//Define http Request 
    	//append your Query to the base url
    	HttpRequest req = new HttpRequest();
        req.setEndpoint('https://'+URL.getSalesforceBaseUrl().getHost()+'/services/data/v47.0/query/?q=SELECT Id,Name,AccountNumber,Type FROM Account limit 10');
        req.setMethod('GET');
        
        //Get SessionId
        string autho = 'Bearer '+userInfo.getSessionId();
        req.setHeader('Authorization', autho);
        
        //Get Response
        Http http = new Http();
        HTTPresponse res= http.send(req);
        string response = res.getBody();
        
        //Deserialize obtained json response
        string str = '['+ response.substring(response.indexOf('records":[')+10,response.indexof(']}')) +']';
        acc = (list<Account>)JSON.deserialize(str,list<Account>.class);
        
        return acc;    
    }set;}
    
}

VF :

<apex:page controller="AccountRest">

   
	<apex:sectionHeader title="Accounts" subtitle="List View"/>
	<apex:pageBlock>
	
		<apex:pageBlockTable value="{!acc}" var="key">
		
			<apex:column>
				<apex:facet name="header">Account Name</apex:facet>
				<apex:outputLink value="/{!key.Id}">{!key.Name}</apex:outputLink>
			</apex:column>
			<apex:column value="{!key.AccountNumber}"/>
			<apex:column value="{!key.Type}"/>	
		
		</apex:pageBlockTable>
	
	</apex:pageBlock>

</apex:page>

User-added image
Dear Team ,

Greetings !!!

I have to learn REST API , Webservices and SOAP API in Salesforce . Please suggest some links for that through which i am able to create small examples .

Thanks & Regards
Sachin Bhalerao
Dear Team ,

Greetings !!!

In my Salesforce org (App Launcher) Analytics Studio is not available . What can i do in order Analytics Studio will appear in app launcher.

Thanks & Regards
Sachin Bhalerao
Dear Team ,

I created LWC having search functionality but m getting error plz have a look on image and my code User-added image
<template>
    <div class="slds-m-around_medium">
     
        <div class="slds-m-bottom_small">
            <lightning-input type="text"
               value={sVal}
               label="Contact Name"
               onchange={updateSeachKey}
               ></lightning-input>
         </div>
         
         <lightning-button label="Search"
            onclick={handleSearch}
            variant="brand"></lightning-button>
            
         <!-- custom data table(with SLDS style) to display contact list  -->  
         <table class="slds-table slds-table_cell-buffer slds-table_bordered slds-m-top_small">
            <thead>
               <tr class="slds-line-height_reset">
                  <th class="" scope="col">
                     <div class="slds-truncate" title="First Name">First Name</div>
                  </th>
                  <th class="" scope="col">
                     <div class="slds-truncate" title="Last Name">Last Name</div>
                  </th>
                  <th class="" scope="col">
                     <div class="slds-truncate" title="Phone">Phone</div>
                  </th>
                  <th class="" scope="col">
                     <div class="slds-truncate" title="Email">Email</div>
                  </th>
               </tr>
            </thead>
            
            <tbody>
               <!--iterate all contact records using for-each iteration -->    
               <template for:each={contacts} for:item="contact">
                  <tr class="slds-hint-parent" key={contact.Id}>
                     <td>
                        <div class="slds-truncate">{contact.FirstName}</div>
                     </td>
                     <td>
                        <div class="slds-truncate">{contact.LastName}</div>
                     </td>
                     <td>
                        <div class="slds-truncate">
                           <lightning-formatted-phone value={contact.Phone} ></lightning-formatted-phone>
                        </div>
                     </td>
                     <td>
                        <div class="slds-truncate">
                           <lightning-formatted-email value={contact.Email} ></lightning-formatted-email>
                        </div>
                     </td>
                  </tr>
               </template>
            </tbody>
         </table>
      </div>
</template>


import { LightningElement,track} from 'lwc';
// import server side apex class method 
import getContactList from '@salesforce/apex/customSearchController.getContactList';
// import standard toast event 
import {ShowToastEvent} from 'lightning/platformShowToastEvent'
 
export default class customSearch extends LightningElement {
    //@track: Marks a property for internal monitoring. A template or function using- 
    //this property forces a component to rerender when the property’s value changes.
    @track contacts;
    sVal = '';
 
    // update sVal var when input field value change
    updateSeachKey(event) {
        this.sVal = event.target.value;
    }
 
    // call apex method on button click 
    handleSearch() {
        // if search input value is not blank then call apex method, else display error msg 
        if (this.sVal !== '') {
            getContactList({
                    searchKey: this.sVal
                })
                .then(result => {
                    // set @track contacts variable with return contact list from server  
                    this.contacts = result;
                })
                .catch(error => {
                    // display server exception in toast msg 
                    const event = new ShowToastEvent({
                        title: 'Error',
                        variant: 'error',
                        message: error.body.message,
                    });
                    this.dispatchEvent(event);
                    // reset contacts var with null   
                    this.contacts = null;
                });
        } else {
            // fire toast event if input field is blank
            const event = new ShowToastEvent({
                variant: 'error',
                message: 'Search text missing..',
            });
            this.dispatchEvent(event);
        }
    }
}
 

<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="customSearch">
    <apiVersion>47.0</apiVersion>
    <isExposed>true</isExposed>
     <targets>
        <target>lightning__AppPage</target>
        <target>lightning__RecordPage</target>
        <target>lightning__HomePage</target>
    </targets>
</LightningComponentBundle>

Plz help me to solve this error

Thanks & Regards
Sachin Bhalerao
 
Dear Team ,

Greetings !!!

I am performing REST API UsingWeather Example . M refering this website https://focusonforce.com/integration-and-data-loading/rest-api-using-weather-example/ . On my visual force m experiencing error . Plz have a look on my Code and snapshot .  I enable my API moreover configuration settings also i made . Plz help me to solve this issue .

User-added image
APEX Class :

public with sharing class testopenweather {

	public String city {get;set;}
	public String temp {get;set;}
	public String pressure {get;set;}
	public String humidity {get;set;}
	public String temp_min {get;set;}
	public String temp_max {get;set;}

	public testopenweather(ApexPages.StandardController stdController) {
		Account account = (Account)stdController.getRecord();
		account = [SELECT Id, ShippingCity FROM Account WHERE Id =:account.Id];
		//account = [SELECT Id, ShippingCity FROM Account WHERE Id ='0012v00002pNKoyAAG'];
        
		String accountCity = account.ShippingCity;
		String apiKey = '0284633ceb975c6164fa90f016d87e02';

		String requestEndpoint = 'http://api.openweather.org/data/2.5/weather';
		requestEndpoint += '?q=' + accountCity;
		requestEndpoint += '&units=metric';
		requestEndpoint += '&APPID=' + apiKey;
		
		Http http = new Http();
		HttpRequest request = new HttpRequest();
		request.setEndpoint(requestEndpoint);
		request.setMethod('GET');
		HttpResponse response = http.send(request);

		// If the request is successful, parse the JSON response.
		if (response.getStatusCode() == 200) {

		   // Deserialize the JSON string into collections of primitive data types.
		  Map<string,object> results=( Map<string,object>)JSON.deserializeUntyped(response.getBody());
           // city=string.valueof(result.get('name'));
           city = String.valueOf(results.get('name')); 
             Map<string,object> mainresults=( Map<string,object>)(results.get('main'));
            temp = string.valueOf(mainresults.get('temp'));
             pressure = string.valueOf(mainresults.get(' pressure'));
             humidity = string.valueOf(mainresults.get('humidity'));
             temp_min = string.valueOf(mainresults.get('temp_min'));
             temp_max = string.valueOf(mainresults.get('temp_max'));
            
        }
        else {
            ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Tere was an error');
            ApexPages.addMessage(myMsg);
            
        }
    }
}

Visual Force :

<apex:page standardController="Account" extensions="testopenweather" showHeader="false" sidebar="false">
    <apex:pageBlock title="{!city} Weather">
		<apex:pageBlockSection>

			<apex:pageMessages/>

			<apex:outputText label="Temperature" value="{!temp}"/>
			<apex:outputText label="Pressure" value="{!pressure}"/>
			<apex:outputText label="Humidity" value="{!humidity}"/>
			<apex:outputText label="Minimum Temperature" value="{!temp_min}"/>
			<apex:outputText label="Maximum Temperature" value="{!temp_max}"/>

		</apex:pageBlockSection>
	</apex:pageBlock>
</apex:page>
Thanks & Regards
Sachin Bhalerao
 
Dear Team ,

Greetings !!!

Thank you for your support . I have created one APEX class for SOAP service it contains one method to insert data into Account Standard object . Plz let me know how i call this class and metod through Workbench tool . This is my code

class name : accSOAPint 

global class accSOAPint {

    webservice static Account dopost(String Name){
        Account acc = new Account();
        acc.Name = Name;
        insert acc;
        return acc;
        
    }
}

Thanks & Regards
Sachin Bhalerao
Dear Team ,

M working on REST API and i write following code . But m receiving error plz have a look on code and snapshot :
 
APEX Code:

public with sharing class AccountRest {
    
 
    
    public list<account> acc{get{
    
    	//Define http Request 
    	//append your Query to the base url
    	HttpRequest req = new HttpRequest();
        req.setEndpoint('https://'+URL.getSalesforceBaseUrl().getHost()+'/services/data/v47.0/query/?q=SELECT Id,Name,AccountNumber,Type FROM Account limit 10');
        req.setMethod('GET');
        
        //Get SessionId
        string autho = 'Bearer '+userInfo.getSessionId();
        req.setHeader('Authorization', autho);
        
        //Get Response
        Http http = new Http();
        HTTPresponse res= http.send(req);
        string response = res.getBody();
        
        //Deserialize obtained json response
        string str = '['+ response.substring(response.indexOf('records":[')+10,response.indexof(']}')) +']';
        acc = (list<Account>)JSON.deserialize(str,list<Account>.class);
        
        return acc;    
    }set;}
    
}

VF :

<apex:page controller="AccountRest">

   
	<apex:sectionHeader title="Accounts" subtitle="List View"/>
	<apex:pageBlock>
	
		<apex:pageBlockTable value="{!acc}" var="key">
		
			<apex:column>
				<apex:facet name="header">Account Name</apex:facet>
				<apex:outputLink value="/{!key.Id}">{!key.Name}</apex:outputLink>
			</apex:column>
			<apex:column value="{!key.AccountNumber}"/>
			<apex:column value="{!key.Type}"/>	
		
		</apex:pageBlockTable>
	
	</apex:pageBlock>

</apex:page>

User-added image
Dear Team ,

Good Morning !!!

I created one product in Product Standard Object . M searching that product in Product picklist of Cases Standard Object , but my product is not appearing in  Product picklist of Cases Standard Object .

Please explain me where i have to create product in order to my product will appear in picklist .

Thanks & Regards
Sachin Bhalerao
User-added imageDear Team ,

I implented Lightning data table with sortable columns but on load m getting this error . Please let me know some solution in order i will remove this error .

Thanks & Regards
Sachin Bhalerao
Dear Team ,

Greetings !!!

Team i want to ask if i want to insert data using Lightning Data table in lightning component is it possible ? I am able to perform inline edit using lightning data table . If i pass data to apex class in insert menthod is it possible that data get saved . M facing error .

Thanks & Regards
Sachin Bhalerao

 
Dear Team ,

I have to edit email template in salesforce classic . Plz have a look on snapshot and let me know how to editUser-added imageThanks & Regards
Sachin Bhalerao
Dear Team ,

Greetings !!!

In controller file this attribute value is not getting captured   var tempAccount = component.get('v.accObj');

I defined in component file in this way 

<aura:attribute name="accObj" type="Questions__c" default="{ 'sobjectType' : 'Questions__c',

                                                             'Name' : '',

                                                             'Does_Lightning_Component_uses_Javascript__c' : ''
                                                             }"/>



    <ui:inputText label="Name" value="{!v.accObj.Name}"/>

Please let me know where i am making mistake.

Thanks & Regards
Sachin Bhalerao
Dear Team ,

Greetings !!!

Please let me know how to  capture selected value of group radio button in lightning component . My code are as follows when m debugging my code it picks both value not selected one .
Component

<aura:component >
	 <aura:attribute name="options" type="List" default="[

       {'label': 'Agent', 'value': 'Agent'},
       {'label': 'Agency', 'value': 'Agency'},
       ]"/>


  <aura:attribute name="optionChoosenRadio" type="String" default=""/>




 <div class = "slds-col slds-size--2-of-2 " style="display: inline;">
 <lightning:radioGroup name="radioGroup"
    label="Choose Option"
    variant="label-inline"
    options="{!v.options }"
    value="{!v.optionChoosenRadio }"
    type="radio"
    required="true" onchange="{!c.handleChange}"  />
</div>


</aura:component>


Controller.js

({
	handleChange : function(component, event, helper) {
		//alert('hello');
		var a = component.get('v.options');
        
	}
})

Thanks & Regards
Sachin Bhalerao​​​​​​​
Hello Team ,

I newly created one salesforce instance but after previewing my application m getting this error on web browser :

Lightning components require My Domain. Please contact your system administrator for more information.

Please let me know what to do next i have to wait for some time or some error is thr
Dear Team ,

Thank you for your continous support!!!

I have to create one project on lightning component in which i have to create Objective type test in which there are 4 options for single questions and user have to select one right answers . And data get stored in Custom object and i need to display result also when user click on submit button . (For Eg 6 answer correct out of 10)

Please provide me any link or overview how can i start this project .

Thanks & Regards
Sachin Bhalerao
Dear Team ,

Greetings !!!

I created one lightning web component to update records using Lightning web component i used lightning-record-edit-form inside template . 

 <lightning-record-edit-form record-id={recordId} object-api-name="Contact"
    onsuccess={handleSuccess} onsubmit ={handleSubmit} >

M unable to unserstand exact difference between onsuccess and onsubmit .

One more thing in js file i used following code :

  handleSubmit(event) {
        // eslint-disable-next-line no-console
        console.log('onsubmit: '+ event.detail.fields);//Array of record field names or field IDs.
            
    }
    handleSuccess(event) {
        const updatedRecord = event.detail.id;
      // eslint-disable-next-line no-console
      console.log('onsuccess: ', updatedRecord);

M unable to unserstand the difference between event.detail.fields and event.detail.id .

Please provide me some easy explanation on these syntaxes.

Thanks & Regards
Sachin Bhalerao