• Rajiv
  • NEWBIE
  • 115 Points
  • Member since 2010
  • Salesforce Consultant


  • Chatter
    Feed
  • 3
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 78
    Questions
  • 46
    Replies

      

Can anyone help me for implementing this requirement .    

  • Search all Chatter posts for Open Opportunities and identify the most recent that contains “#nextstep”.
  • If a Chatter post is found, strip out the text of that post and update the Opportunity Next Step field with the Chatter text.

 

It's urgent ....i have tried this but i have not understood what is the meaning for text of that Chatter post

 

 

 

Please help...

 

Thanks in advanced

  • April 21, 2012
  • Like
  • 0

Hello,

 

I have a simple trigger on the Opportunity object that fires when an Opportunity is edited and forces an edit/save on the OpportunityLineItems associated with the Opportunity.  When I try to Data Load some bulk changes, I get the following error:

 

System.LimitException: Too many SOQL queries: 101

 

I'm fairly new to Apex code.  I believe the problem is that I am running SOQL inside a FOR loop, but I'm not quite sure how to resolve it.  My trigger is below.  Any help would be appreciated.  Thanks.

 

 

trigger UpdateDeliverables on Opportunity (after insert, after update) {
   // Forces Edit/Save on Deliverables in order to fire Workflow field Update to update quantity field with Q__c value    

FOR(Opportunity opp : Trigger.new)  {

    LIST<OpportunityLineItem> oppLine = [SELECT Id
    FROM OpportunityLineItem
    WHERE OpportunityId = :opp.Id
    AND Flat_Price__c != TRUE];
    
    IF(oppLine.size() > 0)
    update oppLine;
    }

}

i Created the Trigger for Lead Conversion to Custom object. Now i Need BulkTrigger for Lead Conversion. i can try but still i am not completed how to  create the BulkTrigger. in this Trigger i am using Two custom objects.i.e Agency and Broker once Lead is converted Lead Name goes to Broker and Company goes to Agency object.This code working fine but this not Bulk Process. i need BulkProcess for this Trigger.Please help me.................

Trigger

=======

trigger ConvertLead on Lead (after insert, after update) {

 

if (Trigger.new.size()> 0){

if(Trigger.new[0].isConverted == true && Trigger.new[0].Lead_type_picklist__c =='Broker') {
   

   if (Trigger.new[0].ConvertedAccountId != null){

for(Account a :[Select a.Id,a.Name,a.Description,a.BillingStreet,a.BillingState, a.BillingPostalCode, a.BillingCountry, a.BillingCity,a.county__c,a.phone From Account a Where a.Id =:Trigger.new[0].ConvertedAccountId]){
ag = new Agency__c();
ag.Name = a.Name;
ag.Mailing_Address__c = a.BillingStreet;
ag.City__c =a.BillingCity;
ag.State__c = a.BillingState;
ag.County__c = a.County__c;
ag.Zip_Code__c = a.BillingPostalCode;
ag.Account__c = Trigger.new[0].ConvertedAccountId;
ag.Phone__c = a.Phone;
}
insert ag;
}
List<Contact> con = new List<Contact>();
List<Broker__c> brokers = new List<Broker__c>();

if(Trigger.new[0].ConvertedContactId != null){

for(Contact c :[Select id,Name,Description,AccountId from Contact where Id = :Trigger.new[0].ConvertedContactId]){
Broker__c b = new Broker__c();
b.Name = c.Name;
b.Agency__c = ag.id;
b.Contact_ID__c = c.Id;
brokers.add(b);
}
insert brokers;
}
}
}
}

how can i created BulkProcess for this Trigger pls help................

  • January 23, 2012
  • Like
  • 0
Hello Everyone,

In salesforce lighting, I am trying to push records into the search wrapper class using a component event. However, I am getting continuously below error
TThis page has an error. You might just need to refresh it. Error in $A.getCallback() [event.getParam is not a function. (In 'event.getParam("Final_wrappers")', 'event.getParam' is undefined)] Callback failed"

Could anyone help me on this, I am trying to figure out what's the problem.

Here is my code:
Component 1

<aura:component controller="AccountController">
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <aura:attribute name="wrappers" type="Account_Wrapper" />
    <aura:attribute name="accounts" type="Account" />
    
    <aura:registerEvent name="loadMyEvent" type="c:Result"/>


    <span class="big">Choose Accounts</span>
    <table>
    <tr>
        <th class="head">Name</th>
        <th class="head">View?</th>
    </tr>
    <aura:iteration items="{!v.wrappers}" var="wrap">
    <tr>
        <td class="cell">
        <ui:outputText value="{!wrap.acc.Name}" />
        </td>
        <td class="cell">
        <ui:inputCheckbox value="{!wrap.selected}" />
            </td>
    </tr>
    </aura:iteration>
    </table>
    <button onclick="{!c.getAccounts}">Get Accounts</button>
    <span class="big">Selected Accounts</span>
    <table>
        <tr>
            <th class="head">Name</th>
            <th class="head">Industry</th>
            <th class="head">Website</th>
        </tr>
        <aura:iteration items="{!v.accounts}" var="acc">
            <tr>
                <td class="cell">
                <ui:outputText value="{!acc.Name}" />
                </td>
                <td class="cell">
                <ui:outputText value="{!acc.Industry}" />
                </td>
                <td class="cell">
                <ui:outputText value="{!acc.Website}" />
                </td>
            </tr>
    </aura:iteration>
    </table>
    <c:SearchAccountController /> 
</aura:component>

--------------------------------------------------------------------
Componet 1 Helper Class

({
    init : function(cmp, ev) {
        var action = cmp.get("c.GetAccountNames");
 
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                var accs=response.getReturnValue()
                var wrappers=new Array();
                for (var idx=0; idx<accs.length; idx++) {
                    var wrapper = { 'acc' : accs[idx], 
                                    'selected' : false
                                    };
                    wrappers.push(wrapper);
                }
                alert('wrappers2'+wrappers);
                cmp.set('v.wrappers', wrappers);      
            }
            else if (state === "ERROR") {
                alert('Error : ' + JSON.stringify(errors));
            }
        });
        $A.enqueueAction(action);
    },
    getAccounts : function(cmp, ev) {
        var action = cmp.get("c.GetAccountDetails");
        var wrappers=cmp.get('v.wrappers');
        alert('wrappers1'+wrappers);
        var ids=new Array();
        for (var idx=0; idx<wrappers.length; idx++) {
            if (wrappers[idx].selected) {
                ids.push(wrappers[idx].acc.Id);
            }
        }
        var idListJSON=JSON.stringify(ids);
        action.setParams({
                   "idListJSONStr": idListJSON
        });
 
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                var accs=response.getReturnValue()
                cmp.set('v.accounts', accs);
                alert('accsssss'+accs);
                console.log('accccccc'+accs);
                var evt = $A.get("e.c:Result");
                alert('eventttt'+evt);
                console.log('evttttttt'+evt);
                evt.setParams({"Final_wrappers":accs});
                evt.fire();
            }
            else if (state === "ERROR") {
                var errors = response.getError();
                alert('Error : ' + JSON.stringify(errors));
            }
        });
       
        $A.enqueueAction(action);
    }
})

-----------------------------------------------------------------

Component 2


<aura:component controller="AccountController">
    <ltng:require styles="{! $Resource.SLDS24+ '/assets/styles/salesforce-lightning-design-system.css'}"/>
    <aura:attribute name="wrappers" type="Account_Wrapper"/>
    <aura:attribute name="accounts" type="Account" />
    <aura:attribute name="searchResult" type="List" description="use for store and display account list return from server"/>
    <aura:attribute name="searchKeyword" description="use for input" type="string" ></aura:attribute>
    <aura:attribute name="Message" type="boolean" default="false" description="use for display no record found message"/>
    <aura:handler event="c:Result" action="{!c.SearchJS}"/>


    <div class="slds-m-around--large">
       <form class="slds-form--inline"> 
         <div class="slds-form-element"> 
            <label class="slds-form-element__label" for="Search">Account Search</label>  
              <div class="slds-form-element__control" >
                <ui:inputtext aura:id="searchId" value="{!v.searchKeyword}" placeholder="Type Account Name"  class="slds-input"></ui:inputtext>
              </div>
            </div> 
             <div class="slds-form-element">
                 <button type="Button" onclick="{!c.SearchJS}" class="slds-button slds-button--brand">Search</button>
                 </div>
        </form>   
         <table class="slds-table slds-table--bordered slds-table--cell-buffer">
            <thead>
                <tr class="slds-text-title--caps">
                    <th scope="col">
                         <div class="slds-truncate" title=" Name"> ID</div>
                    </th>
                    <th scope="col">
                         <div class="slds-truncate" title=" Name"> Name</div>
                    </th>   
                     <th scope="col">
                          <div class="slds-truncate" title="Type">Type</div>
                       </th>
                       <th scope="col">
                          <div class="slds-truncate" title="Industry">Industry</div>
                       </th>
                       <th scope="col">
                          <div class="slds-truncate" title="Phone">Phone</div>
                       </th>
                       <th scope="col">
                          <div class="slds-truncate" title="Fax">Fax</div>
                       </th>
                </tr>
            </thead>
            <tbody>
                 <aura:if isTrue="{!v.Message}">
               <div class="slds-text-color--error"> No Result Found...</div>
            </aura:if>
                <aura:iteration items="{!v.wrappers}" var="Wrap"> 
                <span>
                <tr>
                <td>
                    <div class="slds-truncate">{!Wrap.acc.Id}</div>
                </td>
                <!--  <td>
                  <div class="slds-truncate">{!Wrap.acc.name}</div>
                  </td>
                  <td>
                     <div class="slds-truncate">{!Wrap.acc.Type}</div>
                  </td>
                  <td>
                     <div class="slds-truncate">{!Wrap.acc.industry}</div>
                  </td>
                    <td>
                     <div class="slds-truncate">{!Wrap.acc.Phone}</div>
                  </td>
                  <td>
                     <div class="slds-truncate">{!Wrap.acc.fax}</div>
                  </td> -->
                  </tr>
                </span>
                </aura:iteration>     
            </tbody>
        </table> 
      </div>     
     
</aura:component>

---------------------------------------------------------------------------------

Component 2 Helper Class

({
    searchHelper: function(component, event) {
        var action = component.get("c.searchmethod");
                
        alert('====key'+component.get("v.searchKeyword"));
        
        action.setParams({
            'searchKeyword': component.get("v.searchKeyword")         
        });
        action.setCallback(this, function(response) {
            var state = response.getState();
            if (state === "SUCCESS") {
                var storeResponse = response.getReturnValue();
                // if storeResponse size is 0 ,display no record found message on screen.
                if (storeResponse.length == 0) {
                    component.set("v.Message", true);
                } else {
                    component.set("v.Message", false);
                
                }
                var wrappers=new Array();
               
                for (var idx=0; idx<storeResponse.length; idx++) {
                   var wrapper = { 'acc' : storeResponse[idx],
                   'selected' : false
                            };
                    
               wrappers.push(wrapper);
                    alert('alert1');
                    alert('wrappers3'+wrappers);
               var showResultValue = event.getParam("Final_wrappers");
                  alert('showResultValue'+showResultValue);
               component.set(wrappers,showResultValue);
               alert('Wrapper2'+wrappers);
                    alert('--wrapper--'+wrappers);
            } 
                 // component.set("v.searchResult", storeResponse);
                   component.set('v.wrappers', wrappers);
                   
                alert('==='+component.set("v.searchResult", storeResponse));
                     
            } 
 
        });
        $A.enqueueAction(action);
 
    }
})

------------------------------------------------------------------------------------------------------------------

Event 

<aura:event type="APPLICATION" description="Event template">
    <aura:attribute name="Pass_Result" type="string"/>
    <aura:attribute name="Final_wrappers" type="Account_Wrapper"/>
</aura:event>

If anyone can help me on this like what I am doing wrong, It would be really helpful. I am trying from 6-7 hours and not able to figure it out what's the problem. 

Warm regards,
Rajiv
  • May 06, 2018
  • Like
  • 0
Hi Everyone,

I want to migrate all Salesforce data to Amazon RDS, does anyone know how I can achieve this? I know in recent release Salesforce talked about the connectors: https://releasenotes.docs.salesforce.com/en-us/spring18/release-notes/rn_bi_integrate_connectors2.htm
However, anyone knows what the steps to do this are? I have no idea about Amazon RDS, where can I get these connectors? If anyone can help me like how to start at least, it will be very helpful. Thanks in advance. 

Best,
Rajiv 
  • April 08, 2018
  • Like
  • 0
Hello Everyone,

I am looking for best practice for sharing the deployment timeline of SF to the team. In the timeline, we would like to show what has been done and what has not been done.  Is there any standard SF format where we can use it to represent SF Project timeline. Any help would be greatly appreciated. 

Warm regards,
Rajiv 
  • October 31, 2017
  • Like
  • 0
Hello Everyone, In Lightning I am trying to connect Skype with Salesforce, whenever I try to Authorize Skype for Salesforce with office account, I get below error

"We received a bad request.
Additional technical information:
Correlation ID: c791e048-c28d-415e-9a2a-9399ebf679cf
Timestamp: 2017-09-15 07:13:41Z
AADSTS50020: User account 'rajiv@gmail.com' from identity provider 'live.com' does not exist in tenant 'Salesforce.com' and cannot access the application 'e0176e8c-8d66-4136-9b5b-f3223ed6723e' in that tenant. The account needs to be added as an external user in the tenant first. Sign out and sign in again with a different Azure Active Directory user account. "

I don't understand why it is saying that my user account doesn't exist in Salesforce, although it's there. Am I missing something? Please if anyone can help me on this, it will be very helpful. Thanks 
 
  • September 15, 2017
  • Like
  • 0
Hey Everyone,

I am working on Visualization: GeoChart. I used the code from google doc : https://developers.google.com/chart/interactive/docs/gallery/geochart
It's working perfectly in sandbox however in production it stopped working, it is just showing blank screen,I am not sure why, does anyone have idea about this? Thanks everyone.

Regards,
Rajiv

 
  • December 01, 2016
  • Like
  • 0
Hi Everyone,

I have a question. It's kind of urgent. Actually I have built dynamic approval process now I want once the user approve the record, I want to update certain fields of the record. Like who approved and on which date. The problem now I am facing  is I don't know how to update the record once it's approved. Is there any way we can update the certain fields of the record once the record is approved?

Regards,
Rajiv
  • July 14, 2016
  • Like
  • 0
Hello Everyone,

It's very urgent. Okay so we tried to copy all feedpost and feedcomment into our new custom object, first we exported feedcomment data through Data loader and then we imported this to our new custom object but by mistakenly, we updated our existing feed comments too. Which is okay but later we noticed most of the existing feedcomments became half. We checked our feedcomment excel file but over there also comments were not full. Most of the comments were half. We thought may be, we didn't take the back up properly, so we checked our  weekly Salesforce back up (Which is provided by Salesforce) and over there also feedcomments were half. Anyone knows why this happened. It seems like Salesforce doesn't provide full data. I have already raised a case with Salesforce and now they are investigating the issue but I want to know Does anyone  of you guys faced the same problem? and if yes then how you resolved it. Any help is going to be appreciated. Thank you so much. 

Regards,
Rajiv 
  • May 26, 2016
  • Like
  • 0
Hi Everyone,

I need some suggestion. We are using Email to Case feature, where we send an email to the users and records it's responses too. Now we want to shift all case data and it's responses to the custom object. All these responses are sent from different time zone. We don't want to messed up with the date field. So If I am in PST zone and migrate all data, will it change all the date field and timestamp? Want is the best practice should I consider to migrate data, so that date and timestamp won't get changed. Any help will be greatlyappreciated.

Regards,
Rajiv
  • May 19, 2016
  • Like
  • 0
Hi Everyone,

We are using Force.com - App Subscription User License of Salesforce. Everything is working but somehow I can't see Case Tab. In the document nothing is mentioned related to Case Tab.
http://www2.sfdcstatic.com/assets/pdf/misc/DS_Force_Pricing_Comparison.pdf?d=70130000000lzSrAAI
The strange thing is when I logged in as Force.com - App Subscription user case object is visible but tab is not. Any idea why this is happening?Infact I can see email to case too. If case object is not allowed in this license then email to case feature should not be there. Any help will be really appreciated. 

Regards,
Rajiv
 
  • April 27, 2016
  • Like
  • 0
Hi Everyone,

Can a non admin user create a view that all users can see? Is it possible to implement ?

Regards,
Rajiv
  • April 13, 2016
  • Like
  • 0
Hey Everyone,

I have one custom object called as "Organisation". Account object has a look up relationship with this Custom object. So it appears in the related list of Organisation.I want to make formula on Organisation object and want to pull some values from it's related list (i.e Account). I know we can do this through code but is there any other way which we can use instead of coding? Also I can't change the relationship between these two object. Thanks.

 
  • April 05, 2016
  • Like
  • 0
Hi Everyone,

I need help. I am making website in visualforce page. I want to fetch songs from the custom objet attachment and want to show the songs as a playlist. Where users can select songs and play the songs accordingly. Is it possible in Visualforce? Please let know if it's possible, and if yes some sample code will be great. Thanks.
  • March 18, 2016
  • Like
  • 0
Hi Everyone,

I know in salesforce Ampersand (&) issue exist, I have created a visual force page so whenever User put '&' it just refresh my VF page. In my requirement User want to put '&' on name field instead of 'and' can anyone help me on this. How can we put '&' instead of 'and'.
https://developer.salesforce.com/docs/atlas.en-us.salesforce_pubs_style_guide.meta/salesforce_pubs_style_guide/style_ampersand.htm
  • February 16, 2016
  • Like
  • 0
Hey Guys,

Please helpe me. I am stuck, non of the users can see report. They can see the report folder but when they try to access report they get insufficient privilage error. Infact they can't even access unifed folder reports. Which is visible to all users. I am not sure why this is happening. I gave all these permissions but still they cant see: 

1) Manage Reports in Public Folders
2) Manage Dashboards in Public Folders
3) View Reports in Public Folders
4) View Dashboards in Public Folders
5)Create Report Folders
6) Create Dashboard Folders
7) Edit My Reports
8) Edit My Dashboards

Please let me know if I am missing something. Thanks.
 
  • February 01, 2016
  • Like
  • 0
Hey Guys,

I am stuck could you guys please help me on this. On the custom object related list there is one edit link. Somehow it is not working properly, So I want to see what's the issue but I am not able to figure it out from where exactly this edit link is coming. I checked the object page layout, visual force pages, button etc but didn't find this link. It will be very helpful if someone help me on this. Thanks.
Attached screenshot for your reference.

User-added image
  • January 29, 2016
  • Like
  • 0
Hello Guys,

I need to capture email reply in Salesforce. For example let's take a scenario I have sent an email to one contact from send an email button from the custom object activity history related list. As soon as I send the mail, Contact will receive mail in his outlook or mailbox . If the contact try to reply over the mail from outlook or gmail then will Salesforce capture this reply automatically? If not how can I achieve this and capture automatically reply ? Please suggest. Thanks.

Regards,
Rajiv
  • January 27, 2016
  • Like
  • 0
Hi Everyone,

I really need your help. I am stuck. I am trying to upload data on Salesforce whose size is 50MB. But when I uploaded It took 2.6 GB Data Storage. It is really weird. Does anyone know why this happened? 

Thanks
  • December 14, 2015
  • Like
  • 0
Hey Guys,
I am trying to implement google map using lighting. I really don't have much idea about lighting.
My requirement is to show all nearby accounts on google map. 

Apex Class

public class accController { 
    @AuraEnabled
    public static List<Account> getAccounts() {
        return [select id, Account.BillingStreet, Account.BillingPostalCode, Account.BillingCity,sandbox__Geolocation__Longitude__s,sandbox__Geolocation__Latitude__s, Account.BillingState, Account.BillingCountry from Account where sandbox__Geolocation__Latitude__s != null];
 
    }
 
}
 
Component 

<aura:component implements="force:appHostable" controller="accController">
 
    <ltng:require styles="/resource/leaflet/leaflet.css" />   
    <ltng:require scripts="/resource/leaflet/leaflet.js"
             afterScriptsLoaded="{!c.jsLoaded}" />
 
    <div class="map" id="map"></div>
 
</aura:component>
 
Controller 

({
jsLoaded: function(component, event, helper) {
    debugger;
    var accs = component.get("c.getAccounts");
                debugger;
    accs.setParams({
        "sandbox__Geolocation__Longitude__s": component.get("v.sandbox__Geolocation__Longitude__s")
    });
    debugger;
    setTimeout(function() {

/*Not Working-- this line */
        // var map = L.map('map', {zoomControl: false}).setView([sandbox__Geolocation__Longitude__s,sandbox__Geolocation__Latitude__s], 14);
       
var map = L.map('map', {zoomControl: false}).setView([25.509637,71.091645], 14);
        L.tileLayer('https://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}',
            {
                attribution: 'Tiles © Esri'
            }).addTo(map);
 
        // Add marker
        L.marker([sandbox__Geolocation__Longitude__s,sandbox__Geolocation__Latitude__s]).addTo(map)
            .bindPopup('Simplion Technologies Pvt Ltd');
        });
}
})
 
The problem I am facing is to get dynamic longitude and latitude values from account object. As you can see I have commented out the line. 
If I hardcode the longitude (i.e. 25.509637) and latitude (i.e. 71.091645) values then it works fine for me. 
So I want to make this dynamic. So that it takes automatically longitude and latitude value from the account records.
If anyone can help me on this or give some ideas. It will be really helpful.
 
 
 
  • July 10, 2015
  • Like
  • 0
Hey Everyone,

I am using custom history object for tracking particular field. But somehow i am getting newValue and oldValue as null value. Can anyone please help me on this. If i do the same with lookfield then it shows newValue and OldValue but for otherfields the value is null.

Regards,
Raj
  • February 11, 2015
  • Like
  • 0
Hello Everyone,

In a batch can we delay the execution process between two records. Right now our batch size is 200 and we are processing around 5000 records, and since we are making callout to external system, we are getting 'Read time out error'. I have reduced the size of batch but i guess it will be a problem because in 24 hours we can submit upto 5000 batches. So what if records get increased then i am sure it will hit the batch limit. It will be really helful if anyone can help me on this.

Regards,
Rajiv Roy
  • December 29, 2015
  • Like
  • 0
Hi Everyone,

Case owner can't edit his own case once the status is set to “in progress with requester”. 
Is there any way we can give case owners rights, so that they can edit the case if it is set to “in progress with requester”?

Regards,
Rajiv
  • March 19, 2014
  • Like
  • 1
Hello Everyone,

It's very urgent. Okay so we tried to copy all feedpost and feedcomment into our new custom object, first we exported feedcomment data through Data loader and then we imported this to our new custom object but by mistakenly, we updated our existing feed comments too. Which is okay but later we noticed most of the existing feedcomments became half. We checked our feedcomment excel file but over there also comments were not full. Most of the comments were half. We thought may be, we didn't take the back up properly, so we checked our  weekly Salesforce back up (Which is provided by Salesforce) and over there also feedcomments were half. Anyone knows why this happened. It seems like Salesforce doesn't provide full data. I have already raised a case with Salesforce and now they are investigating the issue but I want to know Does anyone  of you guys faced the same problem? and if yes then how you resolved it. Any help is going to be appreciated. Thank you so much. 

Regards,
Rajiv 
  • May 26, 2016
  • Like
  • 0
Hi Everyone,

We are using Force.com - App Subscription User License of Salesforce. Everything is working but somehow I can't see Case Tab. In the document nothing is mentioned related to Case Tab.
http://www2.sfdcstatic.com/assets/pdf/misc/DS_Force_Pricing_Comparison.pdf?d=70130000000lzSrAAI
The strange thing is when I logged in as Force.com - App Subscription user case object is visible but tab is not. Any idea why this is happening?Infact I can see email to case too. If case object is not allowed in this license then email to case feature should not be there. Any help will be really appreciated. 

Regards,
Rajiv
 
  • April 27, 2016
  • Like
  • 0
Hey Guys,

I am stuck could you guys please help me on this. On the custom object related list there is one edit link. Somehow it is not working properly, So I want to see what's the issue but I am not able to figure it out from where exactly this edit link is coming. I checked the object page layout, visual force pages, button etc but didn't find this link. It will be very helpful if someone help me on this. Thanks.
Attached screenshot for your reference.

User-added image
  • January 29, 2016
  • Like
  • 0
Hello Guys,

I need to capture email reply in Salesforce. For example let's take a scenario I have sent an email to one contact from send an email button from the custom object activity history related list. As soon as I send the mail, Contact will receive mail in his outlook or mailbox . If the contact try to reply over the mail from outlook or gmail then will Salesforce capture this reply automatically? If not how can I achieve this and capture automatically reply ? Please suggest. Thanks.

Regards,
Rajiv
  • January 27, 2016
  • Like
  • 0
Hi 

My org is person enabled org.I am using person accounts in my code to perform somekind of features. 
I have made two packages. 1 ) Unmanaged package and 2) Managed package. 
Unmanaged package is perfectly working fine but somehow managed package is not working and i am not able to figure it out why my code is not working in managed package. Is it a common problem or anyone faced this problem previously. If yes then please help me. 

Thanks,
Rajiv

  • October 07, 2014
  • Like
  • 0
Hi Everyone,

Can anyone tell me what is the main difference between Salesforce excel connector and Data loader. Which one is good. As we can do lots of things from Data loader then why we still use Excel connector? Any help will be greatly appreciated.

Regards,
Rajiv

  • July 25, 2014
  • Like
  • 0

Hi Everyone,

 

I want to copy approval histroy from one object to another object. Could anyone help me on this. Does anyone know how to copy 

this using apex.

 

Regards,

Rajiv

  • January 23, 2013
  • Like
  • 0

Could anyone help me on this, I am getting very strange error in  the Sandbox.

For example if I am trying to write below code an error appears  Variable  does not exist :Id

 

trigger demo on Opportunity (after insert) {

List<Id> oppIds = new List<Id>();
    for(Opportunity opp : Trigger.new){

        oppIds.add(opp.Id);
    }

}

 

I don't understand why this strange error is coming that Id does not exist.

Id is a standard  field of opportunity, could any one help me to resolve this issue or anyone knows why this error is coming. 

It will be really appreciated. Thanks !!

 

Regards,

Rajiv Roy

 

 

 

  • December 16, 2012
  • Like
  • 0

      

Can anyone help me for implementing this requirement .    

  • Search all Chatter posts for Open Opportunities and identify the most recent that contains “#nextstep”.
  • If a Chatter post is found, strip out the text of that post and update the Opportunity Next Step field with the Chatter text.

 

It's urgent ....i have tried this but i have not understood what is the meaning for text of that Chatter post

 

 

 

Please help...

 

Thanks in advanced

  • April 21, 2012
  • Like
  • 0

Hi Guys,

 

I am sending a mail where image gets attached to it. Its working fine but due to hard code now its creating problem. It's trigger which sends email to customer along with image. We need to make this URL dynamic can anybody no how can we implement this or make this URL dynamic. I want to show the image along with the mail.   String htmlbody = '<img src="http://na1.salesforce.com/img/response_peops.jpg"/> 

 

When I remove img tag then only link displays. I want that image to be appears in the email.Can anybody know how can we do this. It's really appreciated.

 

Thanks,

  • February 20, 2012
  • Like
  • 0

Hello,

 

I have a simple trigger on the Opportunity object that fires when an Opportunity is edited and forces an edit/save on the OpportunityLineItems associated with the Opportunity.  When I try to Data Load some bulk changes, I get the following error:

 

System.LimitException: Too many SOQL queries: 101

 

I'm fairly new to Apex code.  I believe the problem is that I am running SOQL inside a FOR loop, but I'm not quite sure how to resolve it.  My trigger is below.  Any help would be appreciated.  Thanks.

 

 

trigger UpdateDeliverables on Opportunity (after insert, after update) {
   // Forces Edit/Save on Deliverables in order to fire Workflow field Update to update quantity field with Q__c value    

FOR(Opportunity opp : Trigger.new)  {

    LIST<OpportunityLineItem> oppLine = [SELECT Id
    FROM OpportunityLineItem
    WHERE OpportunityId = :opp.Id
    AND Flat_Price__c != TRUE];
    
    IF(oppLine.size() > 0)
    update oppLine;
    }

}

I am facing this issue.Can anybody help me out?

 

 

"

Update error code CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY: ReconcileOrder: execution of BeforeUpdate caused by: System.Exception: Apex heap size too large: 5218807

"

i Created the Trigger for Lead Conversion to Custom object. Now i Need BulkTrigger for Lead Conversion. i can try but still i am not completed how to  create the BulkTrigger. in this Trigger i am using Two custom objects.i.e Agency and Broker once Lead is converted Lead Name goes to Broker and Company goes to Agency object.This code working fine but this not Bulk Process. i need BulkProcess for this Trigger.Please help me.................

Trigger

=======

trigger ConvertLead on Lead (after insert, after update) {

 

if (Trigger.new.size()> 0){

if(Trigger.new[0].isConverted == true && Trigger.new[0].Lead_type_picklist__c =='Broker') {
   

   if (Trigger.new[0].ConvertedAccountId != null){

for(Account a :[Select a.Id,a.Name,a.Description,a.BillingStreet,a.BillingState, a.BillingPostalCode, a.BillingCountry, a.BillingCity,a.county__c,a.phone From Account a Where a.Id =:Trigger.new[0].ConvertedAccountId]){
ag = new Agency__c();
ag.Name = a.Name;
ag.Mailing_Address__c = a.BillingStreet;
ag.City__c =a.BillingCity;
ag.State__c = a.BillingState;
ag.County__c = a.County__c;
ag.Zip_Code__c = a.BillingPostalCode;
ag.Account__c = Trigger.new[0].ConvertedAccountId;
ag.Phone__c = a.Phone;
}
insert ag;
}
List<Contact> con = new List<Contact>();
List<Broker__c> brokers = new List<Broker__c>();

if(Trigger.new[0].ConvertedContactId != null){

for(Contact c :[Select id,Name,Description,AccountId from Contact where Id = :Trigger.new[0].ConvertedContactId]){
Broker__c b = new Broker__c();
b.Name = c.Name;
b.Agency__c = ag.id;
b.Contact_ID__c = c.Id;
brokers.add(b);
}
insert brokers;
}
}
}
}

how can i created BulkProcess for this Trigger pls help................

  • January 23, 2012
  • Like
  • 0

Hi all, apex n00b here...

 

I am trying to modify this lovely VF example from Jeff Doyglas (http://blog.jeffdouglas.com/2009/05/08/inline-visualforce-pages-with-standard-page-layouts/) to enable Activity History searching for my users. Everything goes great until actually attempting to search, where I receive this error:

 

System.QueryException: entity type ActivityHistory does not support query 

Class.ActivitySearchController.search: line 39, column 1

 

Can anyone offer a suggestion for modifying the class below to make this work? I know that ActivityHistory querying requires a relationship query, but I am not sure how to achieve this in the following scenario:

 

public class ActivitySearchController {
 
    //added an instance varaible for the standard controller
    private ApexPages.StandardController controller {get; set;}
    // the actual account
    private Account a;
    // the results from the search. do not init the results or a blank rows show up initially on page load
    public List<ActivityHistory> searchResults {get;set;}
 
    // the text in the search box
    public string searchText {
        get {
            if (searchText == null) searchText = 'Enter keywords'; // prefill the search box for ease of use
            return searchText;
        }
        set;
    }
 
    public ActivitySearchController(ApexPages.StandardController controller) {
 
        //initialize the stanrdard controller
        this.controller = controller;
        this.a = (Account)controller.getRecord();
 
    }
 
    // fired when the search button is clicked
    public PageReference search() {
        if (searchResults == null) {
            searchResults = new List<ActivityHistory>(); // init the list if it is null
        } else {
            searchResults.clear(); // clear out the current results if they exist
        }
        // Note: you could have achieved the same results as above by just using:
        // searchResults = new List<categoryWrapper>();
     
        // use some dynamic soql to find the related activities by subject
        String qry = 'Select ah.Id, ah.subject, ah.whoid, ah.whatid, ah.accountid, ah.ownerid, ah.activitydate, ah.description from ActivityHistory ah Where AccountId = \''+a.Id+'\' And ah.Subject LIKE \'%'+searchText+'%\' Order By ah.Subject';
        searchResults = Database.query(qry);
        return null;
    }
 
}

 

  • January 20, 2012
  • Like
  • 0