• S Gogati
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 6
    Replies
Hi Team,

I Need to show the LastModified Date in user's Local time Zone, Using SOSL am getting data from salesforce. And trying with bellow method, but no luck.
Can anyone help on this?

 public static String formatDateBasedOnLocale( String value ) {
        /*DateTime dateTimeToFormat = DateTime.valueOf( value );
        Date dateToFormat = dateTimeToFormat.date();
        return dateToFormat.format();*/
     /*String timeZone = UserInfo.getTimeZone().getID();
     Datetime dateGMT=DateTime.valueOf( value );
     Datetime d1=Datetime.valueOf(dateGMT);
     return d1.format();*/
     System.debug('UserInfo.getTimeZone().getID() '+UserInfo.getTimeZone().getID());
     System.debug('value  '+value );
     DateTime param_time= DateTime.valueOf( value );
     string var_time = param_time.format('yyyy-MM-dd HH:mm:ss',UserInfo.getTimeZone().getID());
     return datetime.valueOf(var_time).format();

    }
 
I want to create a PDF at browser level but renderaspdf functionality is creating the pdf at the server level. Please help me on thiis.


Thanks in Advance
Hi All,

     We have an package, while excuting the testclass at customer end, due to custom validations few test class are failing. Do we have any mechanism  to skip validation rules in apex test class.


Thanks in Advance
Hi Friends,
 I have return the follwoing method  
public with sharing class GETTABDescribe {
 public string jsonStr {set;get;}
   public GETTABDescribe(){
        List<string> SObjectList = new List<string>();
        jsonStr='';
        List<Schema.DescribeTabSetResult> describeTabSetResults = Schema.describeTabs(); 
        Set<String> tabSet=new Set<String>();
        for(Schema.DescribeTabSetResult tsr : describeTabSetResults){
            List<Schema.DescribeTabResult> tabs = tsr.getTabs();
            tabSet.add('-------'+tsr.getLabel()+'---'+tsr.isSelected()+'----'+tsr.getLogoUrl()+'---------');
            for(Schema.DescribeTabResult tab: tabs)
            {  
                {
                    tabSet.add(tab.getSobjectName().toLowerCase()); 
                }
            }
        }
        List<String> setIdList = new List<String>();
        setIdList.addAll(tabSet);
        setIdList.sort();
        jsonStr  = String.join(setIdList, '\n');
    }
}
Which is returning, only the selected tabs in the ORG and also its running on USER level. 

But My requirement is to get the ALL the available tabs across all profiles or system adminstrator level.
Hi All,

If the record was already opened manually from other view (with manual click), and then click on the link, we will not get focus on to that tab
if we open the record through the link and when go click on the same link we will getting the focus.


Here is my code

<apex:page standardController="Account">
    <apex:includeScript value="/support/console/22.0/integration.js"/>
    <script type="text/javascript">
        function testOpenPrimaryTab() {
            //Open a new primary tab with the salesforce.com home page in it
            sforce.console.openPrimaryTab(null, '/0019000000lcM34?isdtp=vw', true,'TEST123', openSuccess, '0019000000lcM34');
        }
        var openSuccess = function openSuccess(result) {
            //Report whether opening the new tab was successful
            if (result.success == true) {
                //alert('Primary tab successfully opened');
            } else {
                //alert('Primary tab cannot be opened');
            }
        };
     </script>
    <table>
        <tr><td><A HREF="#" onClick="testOpenPrimaryTab();return false"> With PrimaryTab</A>  </td></tr>
    </table>
</apex:page>


 
We can  Enable clickjack protection for non-setup Salesforce pages under Setup > Security Controls > Session Settings.

My requirement is we need to know programatically  wheather  ClickJack is enabled or not (Apex controller)
Hi All,

     We have an package, while excuting the testclass at customer end, due to custom validations few test class are failing. Do we have any mechanism  to skip validation rules in apex test class.


Thanks in Advance
Hi Friends,
 I have return the follwoing method  
public with sharing class GETTABDescribe {
 public string jsonStr {set;get;}
   public GETTABDescribe(){
        List<string> SObjectList = new List<string>();
        jsonStr='';
        List<Schema.DescribeTabSetResult> describeTabSetResults = Schema.describeTabs(); 
        Set<String> tabSet=new Set<String>();
        for(Schema.DescribeTabSetResult tsr : describeTabSetResults){
            List<Schema.DescribeTabResult> tabs = tsr.getTabs();
            tabSet.add('-------'+tsr.getLabel()+'---'+tsr.isSelected()+'----'+tsr.getLogoUrl()+'---------');
            for(Schema.DescribeTabResult tab: tabs)
            {  
                {
                    tabSet.add(tab.getSobjectName().toLowerCase()); 
                }
            }
        }
        List<String> setIdList = new List<String>();
        setIdList.addAll(tabSet);
        setIdList.sort();
        jsonStr  = String.join(setIdList, '\n');
    }
}
Which is returning, only the selected tabs in the ORG and also its running on USER level. 

But My requirement is to get the ALL the available tabs across all profiles or system adminstrator level.
We can  Enable clickjack protection for non-setup Salesforce pages under Setup > Security Controls > Session Settings.

My requirement is we need to know programatically  wheather  ClickJack is enabled or not (Apex controller)