• Arun Kumar
  • NEWBIE
  • 388 Points
  • Member since 2013
  • Developer and Consultant
  • Accenture


  • Chatter
    Feed
  • 11
    Best Answers
  • 0
    Likes Received
  • 10
    Likes Given
  • 3
    Questions
  • 101
    Replies
I can get the visualforce page to hide the input field but I'm unsure how to hide the associated label. How can I hide the label as well?
 
<apex:pageBlockSection id="yearInfoPageBlock" title="Fiscal Year Information">

    <apex:inputField value="{!Fiscal_Year__c.name}" onclick="test();"/>
    <apex:inputField value="{!Fiscal_Year__c.Is_Current__c}" id="isCurrent"/>

</apex:pageBlockSection>

<apex:includeScript value="{! $Resource.jQuery }"/>
    <script type="text/javascript">
        function test(){
            $('[id$="isCurrent"]').hide();

            $('[id$="isCurrent"]').hide();
        }
    </script>
Hello,

I have problems logging in to Data loader..
I am logging in to sandbox.

What changes should i make..
thanks
Hello,

In salesforce, "Accounts" and "Contacts" exsist, Many contacts can be related to account.
I wanted to duplicate the object Accounts. I have new object named AccountX but the related list contact does not exsist.

Is it mandatory to create a new object which will act as contact and then only i can have a master detail relationship possible ?
 
Hi All,

I am trying to update the HTML email template in  sandbox(Spring 16 version). i got thi error " Your template contains active content, which can't be verified as safe".

Adv Thnx
Siv
  • January 18, 2016
  • Like
  • 0
When we are required by Salesforce to go to Lightning in production automatically.
Hi All,

​Using SOQl I have fetched 4 fields all the fields are Text datatypes, if any fields have null value i want to replace null value with empty string and return all 4 fields. Please i need urgent help can anyone send some sample code. 

Thanks in advance.
We created a full sandbox from production about four months ago and have now noticed that there are no records in the OpportunityFieldHistory object other than those created after the sandbox came into existence.

Our understanding is that all data should be copied during the creation of a full sandbox - does this not include the OpportunityFieldHistory object? We did not have a sandbox template in place, so we know that was not the cause.

The Opps still exist in production and in full and the OppIDs match on both sides (so they are the original Opps).

Could we have done anything to have caused the history to be removed?
Hello team, 
I have this code
String soql = 'SELECT id, firstName, lastName, accountId FROM Contact';
I need to call all contacts from one simple account. 
I tried this: 
 
SELECT firstName, lastName, accountId FROM Contact WHERE accountid = '00000000000000'

This query worked fine, but my issue is calling all contact list from calling the account name: 
For example: I have Account_1, what I only have is the name, we imagine we do not have the ID, how could make this query by calling the name of the account?
I also tried this but there was no succeed.
String soql = 'SELECT id, firstName, lastName, accountId FROM Contact WHERE account.id;
How could I make this query correct? 
Thanks in advance
 
Hi every body.
This is my System.Schedule method:
updateStatus_interface obj = new updateStatus_interface();
String sch = '0 0 8 * * ?';
System.schedule('New', sch, obj);

Which can Scheduled Next Scheduled Run as this:
User-added image

Now, my question is how to Schedule, which can run every 10 or 12 or 30 minutes?
Hi,
 
   Need a suggestion on implementing a trigger or workflow is best in option 

Requirement is have created a custom object with name Territory_Lookup__c it has fields ( Zip,State,Country,Area,Owner,Territory Area,Territory State, Territory Country) 

We will be loading data into this custom object 

In lead,account and contact we have custom fields ( Territory Area, Territory State and Territory Country) based on exisitng fields like state country zip it must lookup in Territory_Lookup__c and get fields 

What is the best approach doing this will workflow or trigger will be best option.

Thanks
Sudhir
Hi,

 I wrote a trigger on account below is the trigger is working fine when account is update it is working as expected 
trigger logosince on Account (Before update) 
{
  Try
 {
   Set<Id> accountId = new Set<Id>();
   List<Id> chkoneprt = new List<Id>();
   List<Id> chkoneid = new List<Id>();
   for (Account a : Trigger.New) 
   {     
      accountId.add(a.id);
      chkoneid.add(a.id);
      chkoneprt.add(a.parentid);
      
      } 
       
      /* not required for ( account actone : [select id,parentid from account 
                                where id in :accountId 
                               ])
        {
          chkoneid.add(actone.id);  
          chkoneprt.add(actone.parentid);  
        }  */
        
          system.debug('ID' + chkoneid);
         system.debug('Parent ID' + chkoneprt);
         
           List<Account> accounts =   [select id,parentid from account 
                                    where  ( parentid != '' and   parentid in :chkoneprt ) or 
                                           ( parentid != '' and   parentid in :chkoneid ) or
                                                 id in :chkoneid ];
 
        List<Id> finalid = new List<Id>();
        for ( account actpar :  accounts )
        {
          finalid.add(actpar.id);  
            
        }
        system.debug('ID' + chkoneid); 
        system.debug('Final ID' + finalid);        
             
     List<AggregateResult> gr = [ 
     SELECT min(closedate) from opportunity 
     WHERE accountid IN :chkoneid or accountid in :finalid];
   
       
     for (AggregateResult ar : gr)  {
        system.debug('Min Opp date' + (Datetime)ar.get('expr0'));
        for(Account act : trigger.new) 
              {
              act.Logo_Since__c = (Datetime)ar.get('expr0') + 1;
              
              }
         }     
     
 }
 
  catch (System.NullPointerException e) {
    system.debug('Null Exception');
  }    
       
}

There is another trigger on opportunity below isthe trigger which already exist in the system before creating above trigger on account
 
rigger Public_Opportunity_View_trg on Opportunity (After Insert, After Update, After Delete) {

/* Fires during INSERT */
if(trigger.isInsert)
 {
   List<Public_Opportunity_View__c> POVi = new list<Public_Opportunity_View__c>();
   List<Opportunity_Compensation__c> OCi = new list<Opportunity_Compensation__c>();
   
 for(Opportunity opp :trigger.new)
  {
   Public_Opportunity_View__c POV = new Public_Opportunity_View__c();
   Opportunity_Compensation__c OC = new Opportunity_Compensation__c();
    
      POV.Account_ID__c = opp.accountid;
      POV.Opportunity_ID__c    =  opp.ID;
      POV.Close_Date__c        =  opp.CloseDate;
      POV.Opportunity_Name__c  =  opp.Name;
      POV.Name  =  opp.Name;
      POV.Stage__c             =  opp.StageName;
      POV.Lead_Source__c = opp.LeadSource;
      POVi.add(POV);
      
      /* Insert into Opportunity_Compensation__c */
      OC.Name =  opp.Name;
      OC.Opportunity_ID__c =  opp.ID;
      OCi.add(OC);
   
    }
     
     Insert POVi;
     Insert OCi;
   
   }

/* Fires during UPDATE */
  if(trigger.isUpdate)
   {
     List <Opportunity> Opp = [ SELECT id,accountid,CloseDate,Name,StageName,LeadSource FROM Opportunity WHERE id = :Trigger.newMap.keySet()]; 
  List <Public_Opportunity_View__c> Pubopp = [  select id,Account_ID__c,Opportunity_ID__c,Close_Date__c,Opportunity_Name__c,Stage__c,Lead_Source__c   
                                                from Public_Opportunity_View__c
                                                WHERE Opportunity_ID__c = :Trigger.newMap.keySet()];

  
  for ( opportunity opps : opp )
  {
    for (Public_Opportunity_View__c Pubopps : Pubopp )
     {
       
        Pubopps.Account_ID__c        =  opps.accountid;
        Pubopps.Opportunity_ID__c    =  opps.ID;
        Pubopps.Close_Date__c        =  opps.CloseDate;
        Pubopps.Opportunity_Name__c  =  opps.Name;
        Pubopps.Name  =  opps.Name;
        Pubopps.Stage__c             =  opps.StageName;
        Pubopps.Lead_Source__c   =       opps.LeadSource;
      
      
      }
  
    update Pubopp;
    } 
     
   }  
 
   /* Fires during DELETE*/
 if(Trigger.isDelete) 
 {
     
  for(Opportunity opp :trigger.old)
  {   
     
    List<Public_Opportunity_View__c> existopp = [Select Id from Public_Opportunity_View__c where Opportunity_ID__c = :opp.id];
     
     delete existopp;
   }   
    
    List<Public_Opportunity_View__c> nullopp = [Select Id from Public_Opportunity_View__c where Opportunity_ID__c = NULL]; 
     
     delete nullopp;
  }

Now the issue am facing is when converting lead to account and opportunity I get below error message

Error: System.LimitException: Too many SOQL queries: 101 Trigger.Public_Opportunity_View_trg: line 39, column 1

When trigger logosince is disable I dont get any error message it is working as expected. Please suggest me how to resolve this issue 

Thanks
Sudhir
 
Running command "
git clone https://github.com/forcedotcom/sfdx-dreamhouse.git" and getting below error :

Cloning into 'sfdx-dreamhouse'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


 
Hi,

I have getting the error while running the below test code:

You cannot set custom fields or tags on a document published into a private library. Fields set: Opportunity,Account: []

ContentVersion testContentInsert = new ContentVersion(); 
testContentInsert.ContentURL='http://www.google.com/'; 
testContentInsert.Title = 'Google.com'; 
testContentInsert.RecordTypeId = ContentRT.Id;
testContentInsert.Account__c = acc.Id;
testContentInsert.Opportunity__c = opp.Id;
insert testContentInsert; 
Any idea how to stop assignment rule while creation Lead with the help of ForceTk.js standard create() function with the help of "Sforce-Auto-Assign: FALSE"
Running command "
git clone https://github.com/forcedotcom/sfdx-dreamhouse.git" and getting below error :

Cloning into 'sfdx-dreamhouse'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


 
I have completed modules that are now showing incomplete. I am also locked out of developer and the reset passwords will not work.
I can get the visualforce page to hide the input field but I'm unsure how to hide the associated label. How can I hide the label as well?
 
<apex:pageBlockSection id="yearInfoPageBlock" title="Fiscal Year Information">

    <apex:inputField value="{!Fiscal_Year__c.name}" onclick="test();"/>
    <apex:inputField value="{!Fiscal_Year__c.Is_Current__c}" id="isCurrent"/>

</apex:pageBlockSection>

<apex:includeScript value="{! $Resource.jQuery }"/>
    <script type="text/javascript">
        function test(){
            $('[id$="isCurrent"]').hide();

            $('[id$="isCurrent"]').hide();
        }
    </script>
I am trying to post a simple text comment to FeedItem. The comment has line breaks.

Following is my code:
 
String comment = 'Test1\r\n\r\nTest2';

String access_token = AuthController.getJIRAOAuthToken();

String authVal = 'OAuth '+access_token;
HttpRequest req = new HttpRequest();
String endpoint = system.label.JIRA_OAuth_SFDC_REST_API_Endpoint+'/services/data/v35.0/chatter/feed-elements/';


System.debug(endpoint); 
req.setEndpoint(endpoint);
req.setMethod('POST');
req.setHeader('Content-Type','application/json; charset=UTF-8');

req.setHeader('Authorization', authVal);




req.setBody('{"body":{"messageSegments":[{"type":"Text","text":"'+comment+'"}]},"feedElementType":"FeedItem","subjectId":"a3gm0000000066S"}');


Http http = new Http();
//System.debug(req);
HTTPResponse res = http.send(req);
System.debug('**'+res);

I am getting below response.
System.HttpResponse[Status=Bad Request, StatusCode=400]

If I am trying the same code without "\r\n" then it works perfectly fine. Any suggestions please ?

I tried replacing "\r\n" with "&nbsp;" as per the rich text feed item https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/quickreference_post_feed_element_rich_text.htm but even that didn't help. The comment is posted along with "&nbsp;" in text.
I am trying to post a simple text comment to FeedItem. The comment has line breaks.

Following is my code:
 
String comment = 'Test1\r\n\r\nTest2';

String access_token = AuthController.getJIRAOAuthToken();

String authVal = 'OAuth '+access_token;
HttpRequest req = new HttpRequest();
String endpoint = system.label.JIRA_OAuth_SFDC_REST_API_Endpoint+'/services/data/v35.0/chatter/feed-elements/';


System.debug(endpoint); 
req.setEndpoint(endpoint);
req.setMethod('POST');
req.setHeader('Content-Type','application/json; charset=UTF-8');

req.setHeader('Authorization', authVal);




req.setBody('{"body":{"messageSegments":[{"type":"Text","text":"'+comment+'"}]},"feedElementType":"FeedItem","subjectId":"a3gm0000000066S"}');


Http http = new Http();
//System.debug(req);
HTTPResponse res = http.send(req);
System.debug('**'+res);

I am getting below response.
System.HttpResponse[Status=Bad Request, StatusCode=400]

If I am trying the same code without "\r\n" then it works perfectly fine. Any suggestions please ?

I tried replacing "\r\n" with "&nbsp;" as per the rich text feed item https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/quickreference_post_feed_element_rich_text.htm but even that didn't help. The comment is posted along with "&nbsp;" in text.
 
Hello,

I have problems logging in to Data loader..
I am logging in to sandbox.

What changes should i make..
thanks
Hi All,

  I have requirement for Inactive account  if there is no activity like(task,event) assigned for last 30 days for that account.Anyone help on this scenario.Give some sample code.How to implement.

Thanks,
vicky
 
Hi,

I keep getting this error when trying to verify my challenge - "Reports and Dashboards, Visualizing your Data".  I can't figure out what I've done wrong.  Is anyone else getting this error?
User-added image
 
Hello,

In salesforce, "Accounts" and "Contacts" exsist, Many contacts can be related to account.
I wanted to duplicate the object Accounts. I have new object named AccountX but the related list contact does not exsist.

Is it mandatory to create a new object which will act as contact and then only i can have a master detail relationship possible ?
 
i have an account and contact object, if i didn't select "Account lookup" in "contact", after saving the record i want to display a string value in place of "account name"  in detail page using triggers.
HI,

Im looking to reate a formula text field that will bring back either 'Yes' or 'No' depending on a date range. If the date falls between 25/15/2105 and 10/05/2016 then it should bring back Yes.

Thanks
provided challange is: Create a Message of The Day component that displays different text based on an attribute...
https://developer.salesforce.com/trailhead/lex_dev/lightning_components/lightning_components_expressions

i completed this challenge but traihead is not accepting it.. it is giving me error. i.e. : 
Challenge not yet complete... here's what's wrong: 
The component is not evaluating the value of the 'DayOfTheWeek' attribute to determine what to display


but when i execute my component it gives me desired output....
I want to add a button to my opportunity header record that is called Insert Products. This will send the opportunity ID to a visualforce page which will have a select file button and an insert button that will loop through the CSV and insert the records to the related opportunity.

This is for non technical users so using Data loader is not an option.

I got this working using standard apex class however hit a limit when i load over 1,000 records (which would happen regularly).

I need to convert this to a batch process however am not sure how to do this.

Any one able to point me in the right direction? I understand a batch should have a start, execute and finish. However i am not sure where i should split the csv and where to read and load?

I found this link which i could not work out how to translate into my requirements:http://developer.financialforce.com/customizations/importing-large-csv-files-via-batch-apex/

Here is the code i have for the standard apex class which works.
 
public class importOppLinesController {
public List<OpportunityLineItem> oLiObj {get;set;}
public String recOppId {
        get;
        // *** setter is NOT being called ***
        set {
            recOppId = value;
            System.debug('valuevalue);
        }
    }
public Blob csvFileBody{get;set;}
public string csvAsString{get;set;}
public String[] csvFileLines{get;set;}

public List<OpportunityLineItem> oppLine{get;set;}
  public importOppLinesController(){
    csvFileLines = new String[]{};
    oppLine = New List<OpportunityLineItem>();
  }
  public void importCSVFile(){

       PricebookEntry pbeId;
       String unitPrice = '';

       try{
           csvAsString = csvFileBody.toString();
           csvFileLines = csvAsString.split('\n
           for(Integer i=1;i<csvFileLines.size();i++){
               OpportunityLineItem oLiObj = new OpportunityLineItem() ;
               string[] csvRecordData = csvFileLines[i].split(',');

               String pbeCode = csvRecordData[0];
                pbeId = [SELECT Id FROM PricebookEntry WHERE ProductCode = :pbeCode AND Pricebook2Id = 'xxxx HardCodedValue xxxx'][0];                  

                oLiObj.PricebookEntryId = pbeId.Id;

               oLiObj.Quantity = Decimal.valueOf(csvRecordData[1]) ;
               unitPrice = String.valueOf(csvRecordData[2]);
               oLiObj.UnitPrice =  Decimal.valueOf(unitPrice);

               oLiObj.OpportunityId = 'recOppId';;
               insert (oLiObj);
           }
        }
        catch (Exception e)
        {

             ApexPages.Message errorMessage = new ApexPages.Message(ApexPages.severity.ERROR, e + ' - ' + unitPrice);

            ApexPages.addMessage(errorMessage);
        }
  }
}

 
Hi, I need help. I seem to have decently followed the steps of creating a lighting component. I have a page that has links and these links have to be shown specific to user profile.  I am trying all these through a helloWorld component... I am using Chrome.

I have created an apex class, that has just one method : Here it goes.

(1) Apex Class
------------------
public with sharing class helloWorldApex {

       @AuraEnabled
 public String getCurrentUserProfile()
    {
        System.debug('Invoking helloWorldApex class-------------------');
        System.debug('User Id is --------'+UserInfo.getUserId());
        System.debug('User Name is --------'+UserInfo.getFirstName()) ;
        User currentUser = [SELECT Profile.Name FROM User WHERE Id = :UserInfo.getUserId() ];
        String userProfile=currentUser.Profile.Name;
        
        if( currentUser.Profile.Name == 'System Administrator' ){
            System.debug('User does have the System Administrator Access----------');
            
        }
     return userProfile;   
    }
}
Executing ths class is fine in the Debug Console and the User Id and name do get printed in the logs.

Now, I am trying to access this method getCurrentUserProfile() from the component.
Here is my component code. It is named as 

(2) helloWorld.cmp
-----------------------
<aura:component implements="force:appHostable" controller="helloWorldApex">
    <h1>Quick Create Links</h1>
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>

     <ui:outputText value="Your Profile is: "/>
     <ui:outputText value="{!v.currentUserProfile}"/>

< !-- Further here I see if the user profile has got specific profile and should show the links accordingly--> 
</aura:component>

(3) Here is the controller - helloWorldController.js

({
  doInit : function(component, event, helper) {
        debugger; //This does NOT get fired. Not sure why
        alert('doInit function invoked');  //this is getting fired in the browser.. 
    
       var action = component.get("c.getCurrentUserProfile"); //When control comes here, it throws an error in the browser ("Something has gone wrong. Cannot read property '$getActionDef$' of undefined. Please try again")

       alert('2');//this is not getting invoked
       action.setCallback(this, function(response) {
        var state=response.getState();
      alert();
      component.set("v.currentUserProfile", a.getReturnValue());
      });
    $A.enqueueAction(action);
   },
  
})

Can anyone tell me what I am missing ?

Thanks
Sajiv
 

 
Many of our existing Sites go dead when changing CNAME change from <Site Custom Name>.force.com to <domain>.live.siteforce.com . Any ideas on what to do?

We are in the process of transitioning serveral ORGs' sites to HTTPS their domain were added between 2010 and early 2013. Those domains are serving sites using http and CNAMEs are set as <Site Custom Name>.force.com and they have been working fine all these years.
Now in order to enable HTTPS on thos sites the CNAME must be changed to <domain>.live.siteforce.com but we noticed that for some ORGs this works and for some other don't. (Notice that ORG Id is not used because domains created before Summer '13 release must be set without the ORG Id (http://releasenotes.docs.salesforce.com/en-us/summer14/release-notes/communities_custom_domain_URL.htm)).

For the time being the best way to determine if the CNAME change from <Site Custom Name>.force.com to <domain>.live.siteforce.com will work is to execute nslookup <domain>.live.siteforce.com if the name is resolved we can do the switch but if it doesn't resolve the site goes dead.

Cases Opened where salesforce have not been able to pinpoint the problem:
  • #13022163 Org ID:00DG0000000h1Ws CNAME to sites not working site is DOWN 
  • #13007608 Org ID:00DA0000000BrK9 Enable HTTPS in Sites and set CNAME target
  • #13005559 Org ID:00DE0000000Y9b3 CNAM for Sites NOT Working
  • #13009084 Org ID:00D300000000MyI Enable HTTPS in Sites and set CNAME target
References: 
  • http://releasenotes.docs.salesforce.com/en-us/winter15/release-notes/rn_networks_https_domains.htm
  • http://releasenotes.docs.salesforce.com/en-us/summer14/release-notes/communities_custom_domain_URL.htm
  • https://help.salesforce.com/apex/HTViewSolution?urlname=Custom-Domain-and-CNAME&language=en_US
  • https://help.salesforce.com/apex/HTViewSolution?urlname=Setting-Up-Custom-Domains-for-Salesforce-Sites-and-Setting-up-HTTPS-Support-for-Branded-Custom-Domains
I have created a custom VF dashboard to display the dashboard.

I have created multiple components(tables/bar chart/pie), however the look and feeel is different.

How to make the look and feel similar to standard saledforce using CSS..??

Any help please
Hi,

In our one of appexchange app, we have exposed REST webservice. Here, user just passes the SOQL string to our expose REST API and in the form of response we are returning records.
As this is a part of appexchange, so its mandatory to do FLS checking, but as per our application scope SOQL string is generating outside Salesforce and user just passes SOQL string to my Salesforce Webservice, so I am wondering how we can do FLS checking for dynamic SOQL string.

Thanks,
Rupali

We created a full sandbox from production about four months ago and have now noticed that there are no records in the OpportunityFieldHistory object other than those created after the sandbox came into existence.

Our understanding is that all data should be copied during the creation of a full sandbox - does this not include the OpportunityFieldHistory object? We did not have a sandbox template in place, so we know that was not the cause.

The Opps still exist in production and in full and the OppIDs match on both sides (so they are the original Opps).

Could we have done anything to have caused the history to be removed?
Hi Guys,
Everything is fine with my trigger which updates child object(Commissions__c) records under Accounts based on Rule_ID in Commission object. If the new record is having new Rule_ID__C it just inserts new record if the Rule_ID doesn't match with existing record or if it matches with existing Commission records then it will update the existing child object(Commission) record. As the data is coming from third party 
through integration, some times they are sending invalid account ids which leads to create duplicate records in the child object, if I'm 
able to compare the existing salesforce Account id's with new incoming salesforce Account id's my issue will resolve.

Thanks in Advance and here is my code. I'm not providing related apex class code(commissionHelper).

Trigger Commissions_Trigger on Commission__c (after insert, after update) {

    try{
        if(Trigger.isAfter && Trigger.isInsert && !CommissionHelper.isCommissionTgrAlreadyRunning){            
            CommissionHelper.isCommissionTgrAlreadyRunning = true;
            
            set<id> accountids = new set<ID>();
            List<string> ruleIDs = new List<string>();
            
            List<ID> toDeleteCommission = new List<ID>();
            Map<string,Commission___c> triggerCommissionMap = new Map<string,Commission__c> ();
            List<Commission__c> finalUpdate = new List<Commission__c>();

            for(Commission_Meter__c cm : Trigger.new){
                if(string.isNotBlank(cm.Rule_ID__c)){
                    triggerCommissionMetersMap.put(cm.Rule_ID__c+cm.account__c,cm); 
                    ruleIDs.add(cm.Rule_ID__c);
                    accountids.add(cm.account__c);               
                }
            }

            List<Commission__c> existingCommissions = [SELECT Id, Name__c, Sales__c, Status__c, Account__c, Description__c, Rule_ID__c FROM Commission_Meter__c where Rule_ID__c IN :ruleIDs and account__c IN :accountids and ID NOT IN :trigger.new limit 10000];

            for(Commission__c cm : existingCommissions){
            
            string keypoint = cm.Rule_ID__c+cm.account__c;
                Commission_Meter__c cmNew = triggerCommissionMetersMap.get(keypoint);
                if(cmNew != null && string.isNotBlank(cmNew.Rule_ID__c) && string.isNotBlank(cmNew.Account__c) && cmNew.Rule_ID__c.equals(cm.Rule_ID__c) && cmNew.Account__c.equals(cm.Account__c) ){
                    
                    if(string.isNotBlank(cmNew.Rule_ID__c))cm.Rule_ID__c = cmNew.Rule_ID__c;
                    if(string.isNotBlank(cmNew.Name__c))cm.Name__c = cmNew.Name__c;
                    if((cmNew.Sales__c != null))cm.Sales__c = cmNew.Sales__c;
                    if(string.isNotBlank(cmNew.Status__c))cm.Status__c = cmNew.Status__c;
                    if(string.isNotBlank(cmNew.Description__c))cm.Description__c = cmNew.Description__c;
            
        finalUpdate.add(cm);
                todeleteCommission.add(cmNew.id);                   
                }
            }
            system.debug('The finalUpdate Info::'+finalUpdate);
            if(finalUpdate.size() > 0){
                system.Database.update(finalUpdate);
                CommissionHelper.toDeleteCommission(toDeleteCommission);    
            }
            
        }else{
            //Do nothing
            system.debug('This trigger logic is not executing 2nd time');
        }
    }catch(exception ex){
        system.debug('Some thing went wrong::EX:::'+ex);
    }
}

Hi all,
When we perform SSO from 1 system to SFDC the user is authenticated fine but they are Service Cloud users leveraging the Service Console and we want their first page to be https://companyName.my.salesforce.com/console

However they receive an error that says "You can only view this page in a Salesforce console." Does anyone know why this would occur and how to fix it?

 

I have a workflow triggering an email alert. Since past two months till last week everything was working fine. But today, (Monday) when I came to office and checked the triggered emails I found , all the email contained empty content. Subject is fine but the Body is empty. 
I checked the time of the emails to see from when this issue is happening. I found that from Saturday evening IST, this issue had started happening. On saturday, there was no change that happened from my end. Infact nobody worked on saturday from my team. 

I also checked the email template content and it looks perfectly ok.
Can you someone help. Has something happnened on Saturday that lead to this problem?
Hi All,
We are planning to enable state and country pick list feature in our org.First we have implemented this in our sandbox and followed all the 3 steps specified by Salesforce(document). We have updated all the references in Apex classes and VF pages which are showed up in scan results. But still very few of the Apex classes and VF pages are showing up in the scan results(re-ran the scan) even after converting all state and country fields to stateCode and countryCode.

Am i missing something? Can any one through some light?

Note: we are using field sets in VF pages for address fields, when we try to update those fields we are getting error since we have used those field sets for Google map Managed package.

Thanks for looking into the post and helping...