• Syed Insha Jawaid 2
  • 802 Points
  • Member since 2018

  • Chatter
  • 25
    Best Answers
  • 0
    Likes Received
  • 6
    Likes Given
  • 1
  • 209
In a before update trigger with Trigger.new and Trigger.oldMap, do the following three groups contain identical values?
  1. The element Ids of Trigger.new
  2. The Ids in Trigger.oldMap.keySet()
  3. The element Ids of Trigger.oldMap.values()
public class testingarryfuction {

   public StateInfodetails StateInfodetailswraper{get;set;}
   public string Stateidselected{get;set;}
   public boolean isSelected{get;set;}
    public  testingarryfuction (){
    string teststring ='{ "sucess":1,"data":{"Stateidselected":"2","StateInfodetails":{"stateName": "Andrapradesh","value": "apx" ,"rating":5},"isSelected":true}}';
    Map<String, Object> maptest =   (Map<String, Object>) JSON.deserializeUntyped(teststring);
    system.debug('mapped and deserialized data is::'+maptest);
      Object ob = (Object)maptest.get('data');    
       system.debug('get data is::'+ob);
     String srlze  = System.JSON.serialize(ob); 
      system.debug('again deserailized is ::'+srlze );
       StateInfodetailswraper = (StateInfodetails)System.JSON.deserialize(srlze,StateInfodetails.class);
     system.debug('deserilize using the wrapperclass::::::'+StateInfodetailswraper );
     //this is a wrapper class 
     public class StateInfodetails{
     public string stateName{get;set;}
     public string  value{get;set;}
     public integer rating{get;set;}


After debugging , iam getting the value as: NULL...!

Can anyone have a solution to serialize it .. thank you ...!
I am trying to call the flow through an apex class I created to attach the files to the Account object using Conga Template. This is the apex class I had created for the same.
public class FileAttachment{

    public static void file(List<Id> presId) {
        Set<Id> presc = new Set<Id>();
    public static void sendReq(Set<Id> medId) {
        HealthCloudGA__EhrMedicationPrescription__c m = [SELECT Id,HealthCloudGA__Prescriber__c,HealthCloudGA__Account__c 
                                                         FROM HealthCloudGA__EhrMedicationPrescription__c
                                                         WHERE Id IN :medId];  
        Account a = [SELECT Id,FirstName,LastName FROM Account WHERE Id = :m.HealthCloudGA__Account__c];
        String sessId = UserInfo.getSessionId();
        String servUrl = Url.getSalesforceBaseUrl().toExternalForm()+'/services/Soap/u/29.0/'+UserInfo.getOrganizationId();
        String url2 = 'https://www.appextremes.com/apps/conga/pm.aspx'+
            '&serverUrl='+EncodingUtil.urlEncode(servUrl, 'UTF-8')+
        Http http = new Http();
        HttpRequest req = new HttpRequest();
        // Send the request, and return a response
        HttpResponse res = http.send(req);
        //return res.getStatus() + ' => ' + res.getBody();
        Messaging.SingleEmailMessage semail = new Messaging.SingleEmailMessage();
        String[] toAddresses = new String[] {'wade08@gmail.com'};

        semail.setSubject('Single Email message Example'); 
        semail.setPlainTextBody('Hello!!!!!!!!!!This is a test email to test single email message program '+url2); 
        Messaging.sendEmail(new Messaging.SingleEmailMessage[] {semail}); 

And I executed this in the anonymous window:

I am getting this error:
Line: 1, Column: 32
Method does not exist or incorrect signature: void sendReq(String) from the type FileAttachment
  • December 02, 2019
  • Like
  • 0

I'd really appreciate some help. Our instance migration is happening this weekend. I've tried using Eclipse with Force.com IDE to find our hard-coded references, and have followed the instructions here https://help.salesforce.com/articleView?id=000230820&language=en_US&type=1
however, every time I search, I get zero results. Where am I going wrong??

I really need some help. I don't understand why this is happening when I've followed the instructions?


I am sending an email from the apex code, the email is getting attached to th accounts but the attachments are not geting attached to the email.
Attachments section is null
I have made an @invocableMethod , And I grab some values like Queue ID and Record ID form my Custom Object (QueueDistroHelper__c) . 
All I want to do is Get all users who are in  the Queue (I grab the queue ID from custom field on the Custom object) . And then show all that users on  a field called Queue_Members__c on same Custom object . 
I am not able to add the results to custom field 
Here is my code 
global class lookUpAccountAnnotation {
public class inputValues{
        @InvocableVariable(label='Queue ID' required=true)
        public string QueueId;
        @InvocableVariable(label='Record Id' required=true)
        public Id recordid;
    public static void deletePackageLicense(List<inputValues> inputs){
      for (inputValues i : inputs)
      List<QueueDistroHelper__c> getcurrentobject =  [SELECT Queue_Members__c FROM QueueDistroHelper__c WHERE Id=:i.recordid  LIMIT 1];
      List<User> users =  [SELECT
                    id IN ( SELECT userOrGroupId FROM groupmember WHERE groupId = :i.QueueID )
                    isActive = true
                ORDER BY
      for (User test : users ){
     //Add User.name in Queue_Members__c

So all I want to do is add the test.name to  Queue_Members__c
Hello,  we are going to start to restrict some objects sharing, and we found that we cannot create the __share custom metadata for the objects, as per the documentation, salesforce creates them when the sharing of the objet is changed from public.

Our concer is that we have a metadata repository to store all our project metadata, and to use it to deploy at our different orgs (Dev, Int, Pre) prior to deploy to prod, but so far, we are not able to find the metadata type to be used with ANT to download this custom metadata named "...__shared"
Not sure if is because this is not available, or if it has a different metadata type. We just want to generate the __share, extract it with ANT from one Sandbox, and upload to a different one with ANT (if this is not possible, almost to get it from the sandbox and store it at our repository)
Here I have written code for lightning component. I have needed that when error occures then button should not call action 

<aura:component controller="ContactsController" implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes" access="global">
    <aura:attribute name="conInfo" type="contact" default="{'sobjectType':'contact','LastName':'','firstName':''}"/>
    <!-- CREATE NEW Contact -->
    <div aria-labelledby="newconform" style="display:flex;justify-content:center;">
        <!-- BOXED AREA -->
        <fieldset class="slds-box slds-theme--default" style="width:40%;">
            <form class="slds-form--stacked">          
                <lightning:input  aura:id="conform" label="First Name"
                                 messageWhenValueMissing="First Name is Required."
                <lightning:input aura:id="conform" label="Last Name"
                                 messageWhenValueMissing="Last Name is Required."
                <lightning:input aura:id="conform" label="Email"
                                 messageWhenValueMissing="Email is Required."
                  <lightning:input aura:id="conform" label="Phone"
                                 messageWhenValueMissing="Phone is Required."  
                   <lightning:input aura:id="conform" label="Street"
                                 messageWhenValueMissing="Street is Required."    
                   <lightning:input aura:id="conform" label="City"
                                 messageWhenValueMissing="City is Required."    
                 <lightning:input aura:id="conform" label="State"
                                 messageWhenValueMissing="State is Required."  
                        <lightning:input aura:id="conform" label="Country"
                                 messageWhenValueMissing="Country is Required."         
                <lightning:button label="Next" 
            <!-- / CREATE Contact -->
        <!-- / BOXED AREA -->
I'm braindead today and can't figure out the simplest of things.  

I have a custom object called VRNA__Policy__c.  
This object has a lookup relationship to ACCOUNT that's called VRNA__Issuing_Carrier__c.
I need to get the email address from the ACCOUNT lookup (VRNA__Issuing_Carrier__c) that's on the Policy record. 

This basic query works fine, but doesn't get the email address:
[SELECT VRNA__Issuing_Carrier__c FROM VRNA__Policy__c WHERE VRNA__Account__c =: Id AND RecordTypeID = '012f4000000giyZ']

I've tried:
[SELECT VRNA__Issuing_Carrier__c.email__c FROM VRNA__Policy__c WHERE VRNA__Account__c =: Id AND RecordTypeID = '012f4000000giyZ']

Shouldn't that work?  I'm getting an error that it doesn't understand the relationship.   

I created a flow and a button to launch it.
The flow was debuged and works perfectly. But when I try to launch it using a custom button I receive an error:

"We can't launch this flow because of a variable error. Send this error message to your admin. The value 19/12/2019 is being provided for variable TermEndDate but isn't compatible with the variable's data type (Date)...
As you can see the value is Date type. I doubled checked that the field referenced is indeed Date type.

Can anyone please direct me to how to solve this?


I have a question about campaign influence. 

So I know that if a contact is added to an opportunity that any campaign that was associated to the contact before the contact is associated with the opportunity will be added to the opportunity. My question is if that contact is added to another campaign before the opportunity closes will the newly added campaign be added to the opportunity. 

If the answer is no, is there a way to create a trigger that will do it for me?

Hi all,
Need help in trigger,

Whenever a Contact is updated and only if any of the values for the below fields changed(Oldmap and NewMap values.)

Member Id
Preferred language

For all the contacts verified against Opportunity Contact roles with IsPrimary = true. Then fetch all the Opportunities and update the values for corresponding 3 fields in Opportunity record.

Costco Member Id
Preferred language
One day we could access our partner community with no problem, the next we are getting a blank screen when logging in, and the error above when in the builder.  I am at a loss.  I have not done any special coding, and I am not getting the help I need to resolve my issue.  Help!

I have below error when i run the ANt retrive command
Buildfile: C:\Users\Gyra\Music\apache-ant-1.9.4\bin\build.xml

[sf:retrieve] Note: use ant -verbose to get more information on the failure

C:\Users\Gyra\Music\apache-ant-1.9.4\bin\build.xml:14: Failed to login: Failed
 to send request to https://test.salesforce.com/services/Soap/u/38.0

Total time: 23 seconds
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">

any suggestions ?
Need to understand what this lines of Trigger actually means as I'm new to Triggers.
								opportunity.CurrencyISOCode = accountSalesArea.CurrencyISOCode; 
                                opportunity.Account_Sales_Area_TI__c = accountSalesArea.Id;
                                opportunity.INCO_Term__c = accountSalesArea.Incoterms__c;
                                opportunity.Price_List__c = accountSalesArea.Price_List__c;
                                if(Trigger.isInsert && Trigger.isBefore && opportunity.Payment_Term__c == null)
                                    opportunity.Payment_Term__c = accountSalesArea.Payment_Terms__c;
                                else if(Trigger.isUpdate && Trigger.isBefore)
                                    Opportunity tempOpty = (Opportunity)Trigger.oldMap.get(opportunity.Id);
                                    if(tempOpty.Sales_Area__c != null && tempOpty.Sales_Area__c != opportunity.Sales_Area__c && tempOpty.Payment_Term__c == opportunity.Payment_Term__c)
                                        opportunity.Payment_Term__c = accountSalesArea.Payment_Terms__c;
                                //opportunity.Payment_Term__c = accountSalesArea.Payment_Terms__c;
                                opportunity.INCO_Term_Location__c = accountSalesArea.Incoterms_2__c;

Hello All,
how to retrieve record id from map using custom filed.
List<String> lststringid =  new List<String>();
                for(Servicing_Error__c se : lstservicingerror)
                    if(se.Fastrack_Work_Order__c != null)
                         lststringid.add(se.Fastrack_Work_Order__c) ;  
                Map<id,workOrder> mapWorkOrder = new Map<id,workOrder>([Select id,FAStrackIdentifier__c from WorkOrder where FAStrackIdentifier__c IN:lststringid]); 
                for(Servicing_Error__c se2:lstservicingerror)
                    if(Se2.Fastrack_Work_Order__c != null)
                         se2.Fastrack_Work_Order__c = mapWorkOrder.get(se2.Fastrack_Work_Order__c).id; 

I am getting below error:
System.StringException: Invalid id: 23982178: External entry point
Hi All,

I am trying to output a date type of yyyy-MM-dd, not as a string. I can create the correctly formatted string and insert that into a set.
currentDate = Date.today().toStartofMonth(); // Outputs 2018-12-01 00:00:00

firstDayOfCurrentMonth = currentDate.addMonths(i).toStartofMonth();

String currentDateString = String.valueOf(firstDayOfCurrentMonth).removeEnd(' 00:00:00'); // Outputs 2018-12-01 as a string

However, the issue is converting that string back into the Date type using either .valueOf or .parse
// Outputs 2018-12-01 00:00:00

Date.valueOf(currentDateString.removeEnd(' 00:00:00'))
// Outputs 2018-12-01 00:00:00

// Throws error with Invalid Date : 2018-12-01

My question is, how can I convert the correctly formatted string back into the Date type?

Many thanks!!
Hi all,
How to add multiple charts for reports? Please help me.
Created a datatable to update the multiple records but this is not supported on the Mobile. 

So I  am iterating a record edit form and want to change the status of selected records to active.
How can i get this done.
Is it possible to get back the metadat of a deleted scratch org?

i would like to open a page by clicking on the Primary Button. I already put the URL from the Meeting-page into the "Button Link URL"-Field. (see the screenshots below)

My problem is, everytime, i click on my Button, an Error-page opened, not the meeting-page that i would like to use.

Thank you for your help!
Primary Button SettingsURL from the page i like to use

  • December 25, 2019
  • Like
  • 0

Hello everyone!

I am trying to upload custom reports and dashboards into an unmanaged package. I am able to select them in the package manager but then i get an error message that says

"Unable to include components from personal or unfiled folders."

I have changed the folder name, made it a public folder, etc and this did not work.

Any ideas?Error message

Hello Everyone,
There is one standard object 'Case' which has one related object called 'Replacement__c'. When a case record is created we are creating four potential records for that case. So, now requirement is whenever someone change the status of one replacement record say 'Selected', other three reoords should automaticaly updated as'Not Selected'. 

I need help how I can do it.
I would like to verify community user using email address to confirm their identity using initRegisterVerificationMethod / verifyRegisterVerificationMethod. The below code when executed from Developer Console gives "Failed to get network info." error:

String userId = UserInfo.getUserId();
User u = [Select email, MobilePhone, Id from User Where Id=:userId];
//String mPh = getFormattedSms(u.MobilePhone); //Not sure why type cast issue (String) from the type anon is generated.
String exceptionText = System.UserManagement.initRegisterVerificationMethod(Auth.VerificationMethod.SMS);
System.Debug(exceptionText); //Same network error
exceptionText = System.UserManagement.initRegisterVerificationMethod(Auth.VerificationMethod.EMAIL);
System.Debug(exceptionText); //Same network error

Please let me know how to resolve this issue. Also how does iniRVM knows which mobile/email id to consider? Thanks, Mahesh

Reference-1: https://releasenotes.docs.salesforce.com/en-us/spring19/release-notes/rn_identity_login_custom_verify_pages.htm
Ref-2: https://developer.salesforce.com/docs/atlas.en-us.externalidentityImplGuide.meta/externalidentityImplGuide/external_identity_passwordless_custom_verification.htm
Can anyone help me understand this error? I am an admin and don't have any developer experience. Our contract ended with the consulting company we were working with and we don't have  a new one yet or a developer on site.

Error element myRule_1_A1 (FlowActionCall).
An error occurred when executing a flow interview.
Flow Details
Flow API Name: Invoice_is_Created
Type: Record Change Process
Version: 2
Status: Active
Org: Dairy Farmers of America (00D46000000qvmC)
Flow Interview Details
Interview Label: Invoice_is_Created-2_InterviewLabel
Current User: Scribe Integration (00546000001mNPT)
Start time: 12/11/2019 5:36 AM
Duration: 124 seconds
How the Interview Started
Scribe Integration (00546000001mNPT) started the flow interview.
Some of this flow's variables were set when the interview started.
myVariable_old = null
myVariable_current = Invoice__c (a0w1M000007aKBWQA2)
DECISION: myDecision
Outcome executed: myRule_1
Outcome conditions:
{!myVariable_current.RecordType.DeveloperName} (Supplies) Equals Supplies
varInvoiceID = {!myVariable_current.Id} (a0w1M000007aKBWQA2)
Error Occurred: An error occurred when executing a flow interview.
Salesforce Error ID: 247294347-100143 (568871004)
In a before update trigger with Trigger.new and Trigger.oldMap, do the following three groups contain identical values?
  1. The element Ids of Trigger.new
  2. The Ids in Trigger.oldMap.keySet()
  3. The element Ids of Trigger.oldMap.values()
Looking to allow a profile to transfer accounts to their name only if the current account owner is a certian user. Our org wide setting on accounts is public read/write 

{faultcode:'soapenv:Client', faultstring:'System.SObjectException: SObject row was retrieved via SOQL without querying the requested field: Account.Health_Rating_Score__c

Class.AccountScoreBatch.scoreAccount: Line 280, column 1

Class.AccountActions.calculateScore: line 8, column 1'}


How to allow approver to Enter some field values when approver clicks approve button.
There is no option to add edit fields in Approval Page layout. All fields are read only.
There is no way to call any lightning component after approver clicks approve button.
Can you please suggest some way

I'm trying to get a specific field from the Contact object into its master Account object. I've done this through a process/flow combination (trigger on every update, flow stores the new value in the account), but I also need the lastModified date of that field.

What is the best way to do this? Do I need to build a new process/flow combination that stores the lastmodified date on every update of a contact? I tried this, but could not find how to access contactHistory in the process builder or flow. Help would be much appreciated!

Kind regards,


Kind regar
Hello everyone,
i created a custom object with field history tracking. The history object logs the changes, but i am not able to add the related list of this history to the account page layout.
The custom object itself is visible in the related lists, but not the history object.
Can anyone help?
Thanks in advance.
I try to show a child list on the contact page.
A contact has several vehicles. I want to select one and make some further processing. So I created a related list on the contact page. There you can now click on the vehicle that you want to choose and it opens vehicle-object-detail-page. There I want to have an flow that grabs somehow the ContactID from the contact. With the contact ID I can work further.
But when I start the flow at the vehicle-object-detail-page it only grabs the RecordID of the vehicle. I cant filter in the flow SELECT Name, E-Mail FROM Contact WHERE RecordID = Contact.Vehicle.ID
Can someone help me?
public class testingarryfuction {

   public StateInfodetails StateInfodetailswraper{get;set;}
   public string Stateidselected{get;set;}
   public boolean isSelected{get;set;}
    public  testingarryfuction (){
    string teststring ='{ "sucess":1,"data":{"Stateidselected":"2","StateInfodetails":{"stateName": "Andrapradesh","value": "apx" ,"rating":5},"isSelected":true}}';
    Map<String, Object> maptest =   (Map<String, Object>) JSON.deserializeUntyped(teststring);
    system.debug('mapped and deserialized data is::'+maptest);
      Object ob = (Object)maptest.get('data');    
       system.debug('get data is::'+ob);
     String srlze  = System.JSON.serialize(ob); 
      system.debug('again deserailized is ::'+srlze );
       StateInfodetailswraper = (StateInfodetails)System.JSON.deserialize(srlze,StateInfodetails.class);
     system.debug('deserilize using the wrapperclass::::::'+StateInfodetailswraper );
     //this is a wrapper class 
     public class StateInfodetails{
     public string stateName{get;set;}
     public string  value{get;set;}
     public integer rating{get;set;}


After debugging , iam getting the value as: NULL...!

Can anyone have a solution to serialize it .. thank you ...!
I have successfully integrated my two salesforce org using named credentials.
But I want to navigate to a VF Page of a target org from a VF page of source org without asking for credentails.
Hi Guys, Is it possible to embed iframes in lightning component.please let me know any blogs with sample code.
Can anyone help me with the below code to select products from the existing products list. I am getting error ''
Error: Compile Error: Missing '<EOF>' at 'public' at line 83 column 5    
Apex Code

global class ProductSearchPopupController {
    public String query {get; set;}
    public List<PricebookEntry__c> products {get; set;}
    public List<wrapProduct> wrapProductList {get; set;}
    public List<PricebookEntry__c> selectedProduct{get;set;}
    public List<QuoteLineitem__c> quoteLineList{get;set;}
    public List<wrapProduct> selectedWrapperList{get;set;}
    public Boolean normalList{get;set;}
    public Boolean selectedList{get;set;}
    public Boolean block{get;set;}
    public Boolean block1{get;set;}
    public Boolean block2{get;set;}
    public String SalesPrice {get; set;}
    public integer Discount {get; set;}
    public String Quantity {get; set;}
    public String ServiceDate {get; set;}
    Id recordId;
    public ProductSearchPopupController(ApexPages.StandardController controller){
        recordId = controller.getId();
        system.debug('recordId '+recordId);
        wrapProductList = new List<wrapProduct>();
        selectedWrapperList = new List<wrapProduct>();
        normalList = true;
        selectedList = false;
        block = true;
        block1 = false;
        block2 = false;
    public PageReference runQuery(){
        system.debug('this query '+query);
        if(query == null || query == ''){
            system.debug('query '+query);
            ApexPages.addmessage(new ApexPages.message(ApexPages.severity.Info,'Please enter the product to be searched'));
            return null;
        List<List<PricebookEntry__c>> searchResults=[FIND :query IN ALL FIELDS RETURNING PricebookEntry__c (id, Name, ProductCode__c, Product2Id__r.Product_Description__c,UnitPrice__c, UseStandardPrice__c)];
        system.debug('searchResults '+searchResults[0].size());
        System.debug('searchResults  result ' + searchResults[0]);       
        System.debug('oth  result ' + SearchResults[0]);
            for(PricebookEntry__c a: searchResults[0]) {
                // As each Account is processed we create a new wrapAccount object and add it to the wrapAccountList
                wrapProductList.add(new wrapProduct(a));
                block = true;   block1 = true;   block2 = false;
        return null;
    public void processSelected() {
    selectedProducts = new List<Product2__c>();
        for(wrapProducts wrapProductObj : wrapAccountList) {
            if(wrapProductObj.selected == true) {
    // This is our wrapper/container class. A container class is a class, a data structure, or an abstract data type whose instances are collections of other objects. In this example a wrapper class contains both the standard salesforce object Account and a Boolean value
    public class wrapProducts {
        public Product2__c acc {get; set;}
        public Boolean selected {get; set;}
        //This is the contructor method. When we create a new wrapAccount object we pass a Account that is set to the acc property. We also set the selected value to false
        public wrapProduct(Products a) {
            acc = a;
            selected = false;
    public PageReference ProceedWithSelectedToNextPage(){
        selectedWrapperList = new List<wrapProduct>();
        normalList = false;
        selectedList = true;
        for(wrapProduct selectedWrapObj: wrapProductList){
            system.debug('selectedWrapObj.selected  ---------'+selectedWrapObj.selected);
            if(selectedWrapObj.selected == true)
        system.debug('selectedWrapperList size ---------'+selectedWrapperList.size());
        PageReference pageRef = new PageReference('/apex/AccountOpportunityTwoPage');
        return pageRef;
    public void processSelected() {
        selectedProduct = new List<PricebookEntry__c>();
        for(wrapProduct wrapProductObj : wrapProductList) {
            if(wrapProductObj.selected == true) {
                block = false;  block1 = false;  block2 = true;
    public void GoBack() {
        block = true;
        block1 = true;
        block2 = false;
    global   class wrapProduct {
        public PricebookEntry__c acc {get;set;}
        public Boolean selected {get;set;}
        public wrapProduct(PricebookEntry__c p) {
            this.acc = p;
            this.selected = false;
    public pagereference saveproduct(){
        List<QuoteLineitem__c> quoteLineList = new  List<QuoteLineitem__c>();
            for(PricebookEntry__c sp:selectedProduct){
                system.debug('sp '+sp);
                QuoteLineitem__c qli = new QuoteLineitem__c();
                qli.QuotesId__c = recordId;
                qli.ListPrice__c = sp.UnitPrice__c;
                qli.UnitPrice__c = sp.UnitPrice__c;
                qli.Product2Id__c = sp.Product2Id__c;    
                if(Discount!=0 || Discount!=null){
                    qli.Discount__c = Discount;
                insert quoteLineList;
                PageReference pageRef = new PageReference('https://proseraa.lightning.force.com/lightning/r/Quotes__c/'+recordId+'/view');
                return pageRef;
        return null;
    public void insertTestData(){
        Product2__c testProduct = new Product2__c();
            testProduct.Name='Test product';
            insert testProduct;
            PricebookEntry__c testpbe = new PricebookEntry__c();
                testpbe.Name='Test PriceBookEntry';
                testpbe.UnitPrice__c =123;
                insert testpbe;

VF Page

<apex:page standardController="Quotes__c" extensions="ProductSearchPopupController" showHeader="false" sidebar="false" lightningStylesheets="true">
    <apex:form id="form" >
        <apex:pageMessages ></apex:pageMessages>
        <apex:messages />
        <div style="width 100%">
            <apex:pageBlock title="Add Products" id="block" rendered="{!block}"> 
                    <div align="center"  >
                   <apex:pageBlockSection columns="1" id="section" > 
                        Enter the product to be added and select Go<br/>
                        <apex:inputText value="{!query}" id="query" style="width: 1200px; height: 40px;"/> 
                <apex:commandButton value="Go" action="{!runQuery}" style="align: right:100px;border-style:solid;
                     color:white; position:relative;background-color:rgba(13, 112, 165, 1);"/>
                <apex:commandButton value="Cancel" action="{!cancel}" style="float: centre:200px ;border-style:solid;
                     color:rgb(21, 137, 238); background-color:white;" />
            <apex:pageBlock id="block1" rendered="{!block1}" >
                <apex:pageBlockSection columns="1">
                    <apex:pageBlockTable value="{!wrapProductList}" var="accWrap">
                        <apex:column >
                            <apex:facet name="header">
                                <apex:inputCheckbox onclick="selectAllCheckboxes(this,'inputId')"/>
                            <apex:inputCheckbox value="{!accWrap.selected}" id="inputId"/>
                        <apex:column headerValue="Name">
                            <apex:outputLink value="#">{!accWrap.acc.Name}</apex:outputLink>       
                        <apex:column headerValue="Product Code">
                            <apex:outputText value="{!accWrap.acc.ProductCode__c}"  />       
                        <apex:column headerValue="Product Description">
                            <apex:outputText value="{!accWrap.acc.Product2Id__r.Product_Description__c}"  />       
                        <apex:column headerValue="Unit Price">
                            <apex:outputText value="{!accWrap.acc.UnitPrice__c}"  />  
                        <apex:column headerValue="Standard Price">
                            <apex:outputText value="{!accWrap.acc.UseStandardPrice__c}"  />  
                    <apex:commandButton value="Next"   action="{!processSelected}" style="float: right;border-style:solid;
                     color:white; background-color:rgba(13, 112, 165, 1);align-items: right;justify-content:right;"/>  
            <apex:pageBlock id="block2" rendered="{!block2}" >
                <apex:pageblockSection title="All Products" collapsible="false" columns="3">
                    <apex:pageBlockTable value="{!selectedProduct}" var="c" id="table2" title="Selected Products">
                        <apex:column value="{!c.Name}" headerValue="Product Name"/>
                        <apex:column headerValue="Sales Price">
                            <apex:inputText value="{!c.UnitPrice__c}" id="UnitPrice" /> 
                        <apex:column headerValue="Discount">
                            <apex:inputText value="{!discount}" id="discount" /> 
                        <apex:column headerValue="Quantity">
                            <apex:inputText value="{!quantity}" id="quantity" /> 
                <apex:commandButton action="{!GoBack}" value="Back" style="border-style:solid;
                     color:white; background-color:rgba(13, 112, 165, 1);"/>
                <apex:commandButton action="{!saveproduct}" value="Save" style="float: right;border-style:solid;
                     color:white; background-color:rgba(13, 112, 165, 1);"/>
                <apex:commandButton value="Cancel" oncomplete="doRedirect()" style="float: right;border-style:solid;
                     color:rgb(21, 137, 238); background-color:white;"/>           
I am trying to send email from custom button through apex class, I am getting below error.
"Unknown Exception: an email can't have more than one sender:[from Address] "

any one can help me on this error.
Hi All,
       i have a trigger on Account which is giving me error:-Trigger_Account: execution of BeforeUpdate caused by: System.DmlException: Update failed. First exception on row 1 with id 0010o00002cFEGpAAO; first error: SELF_REFERENCE_FROM_TRIGGER, Object (id = 0010o00002cFEGp) is currently in trigger Trigger_Account, therefore it cannot recursively update itself: [] Class.AccountTriggerHelper.getCredebilityOfParentAcc: line 73, column 1 Trigger.Trigger_Account: line 24, column 1
       trigger Trigger_Account on Account (before insert, before update, 
                                    before delete, after insert, 
                                    after update, after delete) {
    AccountTriggerHelper.newAccount = trigger.new;
    AccountTriggerHelper.oldAccount = trigger.old;
    AccountTriggerHelper.newMapAccount = trigger.newMap;
    AccountTriggerHelper.oldMapAccount = trigger.oldMap;         
                                        if(!AccountTriggerHelper.runTrigger) {

Account trigger helper:-
public class AccountTriggerHelper {
    public static List<Account> newAccount = new List<Account>();
    public static List<Account> oldAccount = new List<Account>();
    public static Map<Id, Account> newMapAccount = new Map<Id, Account>();
    public static Map<Id, Account> oldMapAccount = new Map<Id, Account>();
    public static boolean runTrigger = True;
    public static Map<ID,List<Opportunity>> MapAccIdToOpp = New Map<ID,List<Opportunity>>();
    public static void  updateOppAmountOnAccount(){
        Set<id> accids = new Set<id>();
        for(Account acc : newAccount){
        for(Id accid : accids){
            List<Opportunity> Listopp = MapAccIdToOpp.get(accid);
            System.debug('List'+ MapAccIdToOpp.get(accid));
            MapAccIdToOpp.put(accid, Listopp);
        List<Account> AccountListToUpdate = new List<Account>();
        for(Account acc : newAccount){
            Decimal Amount = 0;
            for(Opportunity opp :  [SELECT id ,Name,StageName,Amount FROM Opportunity WHERE AccountId =: acc.id] ){
                if(opp.StageName == 'Closed Won' || opp.StageName == 'Closed Lost'){
                    Amount = Amount + opp.Amount;
                if(opp.StageName != 'Closed Won' && opp.StageName != 'Closed Lost'){
                    Amount  = Amount + (opp.Amount)*0.25;
                acc.Opportunity_Amount__c = Amount;
    public static void getCredebilityOfParentAcc(){
        List<Account> accListToUpdate = new List<Account>();
        Integer Point = 0;
        Map<Account,Decimal> MapAccToAmount = new Map<Account,Decimal>();
        for(Account acc : [SELECT id ,Name,Opportunity_Amount__c  
                          FROM Account 
                          WHERE Parentid = null 
                          AND Opportunity_Amount__c <> null 
                          ORDER BY Opportunity_Amount__c desc]){
        for(Account acc : MapAccToAmount.keyset()){
            Point = Point+1;
            acc.RankOfAccount__c = Point;
        System.debug('point'+  accListToUpdate);
            runTrigger = false;
            Update accListToUpdate;
            runTrigger = true;
How to solve this issue? Any suggestions?
Certified Salesforce Admin & Developer with hands-on experience in Apex classes, triggers, visual force pages & lighting concepts. Looking for contract/ full-time job. Ready to join immediately and relocate anywhere in the United States. Authorized to work for any employer in the USA. 
Please reach out to me at mahidhar.akarapu@gmail.com.
We're looking for a Salesforce developer to oversee the development and administration of our Salesforce instance.
Ideally, you're an independent Salesforce contractor who can contribute about 20h/week on a long term basis, enjoy working remotely and collaborate well with distributed team.
  • Salesforce Admin and Dev certified
  • Minimum 3 years of Salesforce application development
  • Experience with integration of systems and 3rd party apps within Salesforce
  • Experience with Marketo a plus
  • Knowledge of SFDC governor limits and guidelines
  • Experience working in an Agile or SCRUM environment
  • Ability to communicate technical recommendations to non-technical stakeholders 
  • Able to work remotely within PST business hours.
The role will involve:
  • Developing customized solutions with the Salesforce platform to support critical business functions
  • Managing daily support and maintenance of internal Salesforce instance, and conduct longer-term improvement operations to ensure compatibility with evolving mission requirements
  • Communicating with project managers, clients and other developers to design cohesive project strategies and ensure effective collaboration throughout all phases of development, testing and deployment
  • Maintaining a flexible and proactive work environment, to facilitate a quick response to changing project requirements and customer objectives
  • Interacting with clients, managers and end users as necessary to analyse project objectives and capability requirements, including specifications for user interfaces, customized applications and interactions with internal Salesforce instances

The successful candidate will have experience in the following key areas:
  • APEX Experience
  • Visualforce and Salesforce.com platform experience]
  • SQL experience
  • Experience developing customer -facing user interfaces
  • C# or Node.js development experience on cloud platforms
  • Understanding of JSON and XML Schema Documents
  • Unit and integration testing

If you have experience with Salesforce development standard capabilities SFDC then this will be highly desirable.
Looking for qualified Salesforce Developer: https://bit.ly/2OWJ2jt 

Great culture, fast-paced environment with a chance to make a real impact!  Higher education experience is a plus.  
Hi Everyone :)

I am working with multiple companies that are looking for Salesforce Developers in Berlin and Munich.
One company is an award-winning E-Commerce company who are looking for mid-level and senior developers to help build a unique solution for their global management software. They provide opportunities to enhance knowledge on how to create UI components, programs and APIs using the latest platform features including lightning.
The company provides complete relocation support including accommodation, documentation, and visa sponsorship (if required).
The right candidate can earn up to €80,000 here, based on languages, seniority and experience.
If you are open to hearing more, let me know and we can connect

Salesfroce Developer position in Atlanta with an excellent organization.

Short term Contract:  https://jobs.crelate.com/portal/perspectivetalent/job/jylxidbscej-335516

Permenent Role with little to no travel : https://jobs.crelate.com/portal/perspectivetalent/job/aoqeogoxqc1-441892
Excellent work / life balance - 35 hour work week
Free medical and dental
8% contribution to 401K
Family oriented work environment