• Nikhil Sharma 17
  • SMARTIE
  • 624 Points
  • Member since 2015

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 24
    Replies
How does SF calculate the CPU time?
Hi,
I am able to integrate the live agent into my app, but it always pop up a new window. I am trying to make it display in an iframe within the page to avoid a pop up window. I have look into liveagent.startChatWithWindow(), but I couldn't get it to work when I pass the iframe id as parameter to the function. Is it possible to do that? Thanks!
Hi All,
I am trying to display a picklist using apex on the Visualforce page with elements apex:selectlist/apex:selectOption, but the html passthrough attribute for place holder doesnt seemed to be working. Below is my code for reference. 
<apex:selectList id="businessType" size="1" value="{!businessType}" html-placeholder="Select business type">
     <apex:selectOptions value="{!businessTypes}" />
 </apex:selectList>
code in controller:
 public List<SelectOption> businessTypes {
        get {
            if (businessTypes == null) {
                businessTypes = getbusinessTypes();
            }
            return businessTypes;
        }
        private set;
    }
    private List<SelectOption> getbusinessTypes() {
        List<SelectOption> optionList = new List<SelectOption>();
        
        try {
            Map<String, Schema.Sobjectfield> corpAppFields = Schema.SObjectType.FXIP_OLAF__c.fields.getMap();
            Schema.DescribeFieldResult describe = corpAppFields.get('Business_Entity_Type__c').getDescribe();
            List<Schema.PicklistEntry> options = describe.getPicklistValues();
            for (Schema.PicklistEntry option : options) {
                optionList.add(new selectOption(option.getValue(), option.getLabel()));
            }           
                      
        }
        catch(Exception ex) {
            System.debug('Unable to load Business Types');
            throw ex;
        }
        return optionList;
    }

 
MIXED_DML_OPERATION, DML operation on setup object is not permitted after you have updated a non-setup object (or vice versa): Account, original object: EmailTemplate: []
Hello,
I have a custom object that I want one standard user to be able to customize.  This means from Setup>Create>Objects they should be able to go to the object and customize things like changing picklist values.  I created a permission set for this object and gave him full access, but I cannot seem to set this up for one user having those rights to one object.  If I allow the customize application setting then they can customize ALL objects and I don't want that.  Does anyone have a solution for this? 
I'm attempting to work with Kixie (VOIP phone service which plugs in to SF) to log calls automatically. Kixie support says I need to access Field Accessibility/Events in order to enable the links to the call recordings to be logged. Problem is, there's no menu called "Field Accessibility" under my security settings. How can I gain access? 
How does SF calculate the CPU time?
Hi - signed up for a new DE org to test out trailhead service cloud module but dont see Service Console - could someone review my setup credentials or advise if I need to activate something please?

Following Trailhead instructions 'Introduction to Case Management' but this is the Snapshot of what I see in cases tab? 
User-added image Thanks
I cannot sign up for the developer edition - It states my email user name (dlazor@salesforce.com) is already taken
Hi,
I am able to integrate the live agent into my app, but it always pop up a new window. I am trying to make it display in an iframe within the page to avoid a pop up window. I have look into liveagent.startChatWithWindow(), but I couldn't get it to work when I pass the iframe id as parameter to the function. Is it possible to do that? Thanks!
Hi All,
I am trying to display a picklist using apex on the Visualforce page with elements apex:selectlist/apex:selectOption, but the html passthrough attribute for place holder doesnt seemed to be working. Below is my code for reference. 
<apex:selectList id="businessType" size="1" value="{!businessType}" html-placeholder="Select business type">
     <apex:selectOptions value="{!businessTypes}" />
 </apex:selectList>
code in controller:
 public List<SelectOption> businessTypes {
        get {
            if (businessTypes == null) {
                businessTypes = getbusinessTypes();
            }
            return businessTypes;
        }
        private set;
    }
    private List<SelectOption> getbusinessTypes() {
        List<SelectOption> optionList = new List<SelectOption>();
        
        try {
            Map<String, Schema.Sobjectfield> corpAppFields = Schema.SObjectType.FXIP_OLAF__c.fields.getMap();
            Schema.DescribeFieldResult describe = corpAppFields.get('Business_Entity_Type__c').getDescribe();
            List<Schema.PicklistEntry> options = describe.getPicklistValues();
            for (Schema.PicklistEntry option : options) {
                optionList.add(new selectOption(option.getValue(), option.getLabel()));
            }           
                      
        }
        catch(Exception ex) {
            System.debug('Unable to load Business Types');
            throw ex;
        }
        return optionList;
    }

 
Is there any way to cutomize classic visualforce page to look like lightning VF page (without to switching to lightning)? 

My requirement is to build a new VF page that is about to be used in salesforce classic but the styling should be like lightning.

 
Hello,

I am trying to pass a variable from a URL into my Controller Extension, and then use that variable in a SOQL Where Clause within the same extension. I still learning to code and I'm not doing somthing correctly. Any guidance would be much appreciated!

This is what I have:

Passing the variable through the URL:
  • There's a simple varable called "varFacilityID" assigned a value via the URL. For example: /apex/search_service_request?varFacilityID=00160000010NjFa
 
  • I included the following parameter on my Visualforce Page:
    <apex:param name="varFacilityID" value="{!$CurrentPage.parameters.varFacilityID}"/>
    
  • I added the following string to my controller:
    //get Facility ID //     
    public String MyFacilityID = ApexPages.currentPage().getParameters().get('varFacilityID')

Adding the variable into the where clause:
  • I have the following query... (Note: This was working prior to adding the additional "where" condition for MyFacilityID.
    //perform search - return specified fields from the record that meets the where clause // 
       public void search(){  
           string searchquery='select Philips_Site_Number__r.name,Name,SR_Created_Date__c,Status__c,Subject__c,Priority__c,id from service_request__c where Philips_Site_Number__r.Facility__c = MyFacilityID AND Philips_Site_Number__r.name like \'%'+searchstring+'%\' order by createddate DESC Limit 20';
         sr= Database.query(searchquery);  
       }
This is the full code below:

Controller Extension:
public class ServiceRequestSearchController {
public list <Service_Request__c> sr {get;set;}  
 
//get Facility ID //     
public String MyFacilityID = ApexPages.currentPage().getParameters().get('varFacilityID');
    
        
   public string searchstring { get; set;}  
   public ServiceRequestSearchController(ApexPages.StandardController controller) {  
   }     
    
    //perform search - return specified fields from the record that meets the where clause // 
   public void search(){  
       string searchquery='select Philips_Site_Number__r.name,Name,SR_Created_Date__c,Status__c,Subject__c,Priority__c,id from service_request__c where Philips_Site_Number__r.Facility__c = MyFacilityID AND Philips_Site_Number__r.name like \'%'+searchstring+'%\' order by createddate DESC Limit 20';
     sr= Database.query(searchquery);  
   }  
   public void clear(){  
   sr.clear();  
   } 
 }



Visual Force Page:
<apex:page standardController="Service_Request__c" showHeader="false" extensions="ServiceRequestSearchController">  
If your Service Request has been Accepted, then click the "Search for Work Order" link to see the details of your Service Request and related Work Order. <br></br>
  <apex:form >  
 <apex:param name="varFacilityID" value="{!$CurrentPage.parameters.varFacilityID}"/>
 <apex:inputText value="{!searchstring}" label="Input"/>   
  <apex:commandButton value="Search records" action="{!search}"/>  
  <apex:commandButton value="Clear records" action="{!search}"/>  
   <apex:pageBlock title="Search Result">  
    <apex:pageblockTable width="80%" value="{!sr}" var="s">  
     <apex:column headerValue="Asset Name" >
        <apex:outputText >{!s.Philips_Site_Number__r.Name}</apex:outputText>
     </apex:column>        
     <apex:column headerValue="Service Request #" >
        <apex:outputText >{!s.Name}</apex:outputText>
     </apex:column>  
     <apex:column headerValue="SR Status" >  
        <apex:outputText >{!s.Status__c}</apex:outputText>  &nbsp;<apex:outputText rendered="{!s.Status__c='Accepted'}" ><a href="A PRIVATE URL IS LOCATED HERE... THIS HAS BEEN INTENTIONALLY REMOVED PRIOR TO POSTING ON SFDC DEV FORMS AS IT DOESN'T RELATE TO ISSUE" Target="_blank">(Search for Work Order)</a></apex:outputText>
     </apex:column>   
    <apex:column headerValue="Problem Reported" >  
        <apex:outputText >{!s.Subject__c}</apex:outputText>  
     </apex:column>     
    <apex:column headerValue="Priority" >  
        <apex:outputText >{!s.Priority__c}</apex:outputText>  
     </apex:column>         
     <apex:column headerValue="Created Date" >  
        <apex:outputText >{!s.SR_Created_Date__c}</apex:outputText>  
     </apex:column>           
    </apex:pageBlockTable>     
   </apex:pageBlock>  
  </apex:form>  
 </apex:page>



 
Hi All, 
question when I query TaskRelation table it comes back with a TaskId column ( for exapmle 00TU000000Sp000000). When I take this ID and paste it into URL it takes me dorectly into the Task, all look good. 
But now I try to query Task table (SELECT Id,OwnerId,Status,Subject FROM Task WHERE Id = '00TU000000Sp000000') it comes back empty: 
"Sorry, no records returned."
How is this possible? 
Please help. 
I want to sync my salesforce contacts to mysql database. bidirectionally. what approach should i use from salesforce end. I am using Php.

Need help
Thanks

Hi All,

 

I am new to Saleforce development. Please can any one guide me to sample apex code to create(add) custom fields to custom or standard objects dynamically using Salesforce Metadata API in my development org.

 

Thanks in advance.

  • June 29, 2011
  • Like
  • 0