• Sai Kethu
  • NEWBIE
  • 25 Points
  • Member since 2012
  • Cognizant Technology Solutions

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 2
    Questions
  • 15
    Replies
I have been working on the VF page conversion into Lightning Design system, In the current VF page I have a Section which will be rendering based on the a Picklist change with in Page. However I have trouble getting this done. 


Please help me here....

Thanks in advance.

Regards

Hi  All,

 

 

          Im Facing an issue while updating the Event records owner change. Below is the error im getting 

"Apex Event trigger cannot handle batch operations on recurring events" .

 

Here is my Query in the trigger,

 

' SELECT Id, OwnerId,Status__c FROM events where  RecurrenceActivityId != null  and IsRecurrence = true '

 

I think there should be mistake in the query.

 

Please help me with the issue

Hi All, 

VSCode does not retrieve js-meta.xml file for LWC. I have also tried to pull LWC using package.xml, only css, css-meta.xml, HTML and js files are retrieved.

Without the js-meta.xml file, I cannot deploy any changes to LWC. It gives an error for js-meta.xml file. How to resolve this issue?
  • December 29, 2021
  • Like
  • 0
Followed through the steps and I am receiving the error


There was an unhandled exception. Please reference ID: AKWLPXWN. Error: Faraday::ClientError. Message: INVALID_FIELD: SELECT Id FROM Contact where name='Edna Frank' ^ ERROR at Row:1:Column:30 field 'name' can not be filtered in a query call

Any suggestions?
Hello,

I have a custom object - program and i have a picklist field - status in it. We also have record types for this object. We have created path for different record types and we have deployed. But when i try pushing other changes for program object (Eg. Validation rules on program, list views for program object etc), we are getting the below error
User-added image

Request to guide on fixing the issue. 

Thanks in advance!
 
I have been working on the VF page conversion into Lightning Design system, In the current VF page I have a Section which will be rendering based on the a Picklist change with in Page. However I have trouble getting this done. 


Please help me here....

Thanks in advance.

Regards
Hi,

I am using two apex pie chart and I am rerendering the output panel using action polar. After a single refresh, the pie chart automatically vanish away.
I am getting this error in console - SfdcCore.js:386 Visualforce Chart: Error loading configuration for chart 'xjid0jid23': TypeError: Cannot read property 'dom' of null.
<apex:outputPanel id = "main">
	<apex:outputPanel rendered="{!IF(Type2 == 'test' && Type1 =='test2',true,false)}">
			<div style="text-align:center; height:115px;float:left;position: relative;top: 10px;}">
				<apex:chart height="115" width="115" data="{!pieData}" animate="false" colorSet="{!IF((widthInterval >= 90 && widthInterval < 100) ,'Yellow,#F8F8F8',if(widthInterval < 90, '#009933,#F8F8F8', 'Red,#F8F8F8'))}" > 
					<apex:pieSeries dataField="data" highlight="false" showInLegend="false" tips="false" donut="85" /> 
				</apex:chart>
				<div> 
					<div style="font-size: 20px;left: 5px;"><b style="position:relative;bottom: 68px;left: 5px;"> {!widthInterval}% </b></div>
					<apex:outputPanel rendered="{!widthInterval < 100}">
					 <div style="position: relative;top: -26px;">
						<div style="position: relative;bottom: 135px;font-size: 15px;"><b> {!test}</b></div>
						<div style="text-align:center;margin-top: -12px;"><b>Target-{!test2} </b></div>
					  </div>
					</apex:outputPanel>        
		<apex:outputPanel
		
		<apex:outputPanel rendered="{!IF(Type2 == 'test' && Type1 =='test2',true,false)}">
			<div style="text-align:center; height:115px;float:left;position: relative;top: 10px;}">
				<apex:chart height="115" width="115" data="{!pieData2}" animate="false" colorSet="{!IF((widthInterval >= 90 && widthInterval < 100) ,'Yellow,#F8F8F8',if(widthInterval < 90, '#009933,#F8F8F8', 'Red,#F8F8F8'))}" > 
					<apex:pieSeries dataField="data" highlight="false" showInLegend="false" tips="false" donut="85" /> 
				</apex:chart>
				<div> 
					<div style="font-size: 20px;left: 5px;"><b style="position:relative;bottom: 68px;left: 5px;"> {!widthInterval2}% </b></div>
					<apex:outputPanel rendered="{!widthInterval2 < 100}">
					 <div style="position: relative;top: -26px;">
						<div style="position: relative;bottom: 135px;font-size: 15px;"><b> {!test}</b></div>
						<div style="text-align:center;margin-top: -12px;"><b>Target-{!test2} </b></div>
					  </div>
					</apex:outputPanel>        
		<apex:outputPanel
		
		 <apex:outputPanel>
            <apex:actionPoller action="{!CallMethod}" reRender="main" interval="5"/>
         </apex:outputPanel>
	
</apex:outputPanel>

 
Hi,

I'm trying to develop a global action with a custom visualforce page for Lightning and SF1. However, the global action does not show up. Any other types (standard ones) show up, but not the one with custom visualforce. Below are some details:
1. The VF does not have any Javascript (It is a dummy page: <apex:page/>)
2. The VF is enabled for mobile

Any help on this would be very welcome..!!

- Ayan
Hi All,

I am using the below code to display chart on vf page . But it is not displaying anything. Can anyone have a look- 
 
public with sharing class wrapper_test_controller {
public list<wrapperclass> wrapperelement_for_account{get;set;}
public list<wrapperclass> wrapperelement_for_contact{get;set;}
public string selectedproductfamily {get;set;}
public list<Work_Order_Item__c> queryResult{get;set;}

public List<SelectOption> getproductfamily(){
        List<SelectOption> options = new List<SelectOption>();
        options.add(new SelectOption('None', 'None'));
        options.add(new SelectOption('Bedding', 'Bedding'));
        options.add(new SelectOption('Flooring', 'Flooring'));
        options.add(new SelectOption('Seating', 'Seating'));
        options.add(new SelectOption('Wall Treatments', 'Wall Treatments'));
        options.add(new SelectOption('Other', 'Other'));
        
        return options;
}

    public PageReference query() {
    system.debug('@@@'+selectedproductfamily);

        String qryString = 'select Product__r.Measurement_Type__c,Product__r.Treatment_Unit_Price__c,Product__r.Cleaning_Unit_Price__c,Product__c,Product__r.Name,Product__r.Family,id,name,Service__c,Quantity__c,Length__c,Width__c from Work_Order_Item__c WHERE ' +

            '(Product__r.Family like \'%' + selectedproductfamily + '%\')';

        queryResult = Database.query(qryString);
        
        return null;

    }

//list<Product2> object1 = [select id,name,Family,Measurement_Type__c,Treatment_Unit_Price__c,Cleaning_Unit_Price__c from Product2 limit 10];
//list<Work_Order_Item__c> object2 = [select Product__r.Measurement_Type__c,Product__r.Treatment_Unit_Price__c,Product__r.Cleaning_Unit_Price__c,Product__c,Product__r.Name,Product__r.Family,id,name,Service__c,Quantity__c,Length__c,Width__c from Work_Order_Item__c limit 10];

public wrapper_test_controller (ApexPages.StandardController controller) {

 }

//public list<wrapperclass> getaccountwrapperret(){
//wrapperelement_for_account = new list<wrapperclass>();
//for(Product2 obj1: object1){
//wrapperelement_for_account.add(new wrapperclass(obj1));
//}
//return wrapperelement_for_account;
//}
public list<wrapperclass> getPieData() {
 List<wrapperclass> data = new List<wrapperclass>();

List<Work_Order_Item__c> memb = new List<Work_Order_Item__c>();  
        

 AggregateResult[] groupedResults  = [SELECT count(Id) c, Product__r.Family f
        FROM Work_Order_Item__c
        WHERE Product__r.Family != null
        GROUP BY Product__r.Family];
 
 system.debug('@@@@'+ groupedResults);
 system.debug('@@@@'+ groupedResults.size());
 for (AggregateResult ar : groupedResults)  {            
                   
                     data.add(new wrapperclass(
                         String.ValueOf(ar.get('f')),
                         Double.ValueOf(ar.get('c'))
                         ));
                        
             }      
             return data; 
 
}
public class wrapperclass{
public String name { get; set; }  
 public Decimal data { get; set; }  
public Product2 object_account_1{get;set;}
public Work_Order_Item__c object_contact_2{get;set;}

public wrapperclass(Product2 obj1){
this.object_account_1 = (obj1);
}
public wrapperclass(Work_Order_Item__c obj2){
this.object_contact_2 = (obj2);}
public wrapperclass(String name, Decimal data) {
 this.name = name;  
 this.data = data;  
}
}
}

VF PAge - 
 
<apex:page standardController="Work_Order__c" extensions="wrapper_test_controller">
    <apex:form >
        <apex:pageblock id="pb">
        
        <apex:pageblockSection title="Work Order Details">
         <apex:inputField label="Account" value="{!Work_Order__c.Account__c}" required="true"/>
         
         <apex:inputField label="Status" value="{!Work_Order__c.Status__c}" required="true"/>
          <apex:inputField label="Service Date" value="{!Work_Order__c.Service_Date__c}" required="true"/>
        
        
        </apex:pageblockSection>
        <apex:pageblockSection title="Summary">
        
        <apex:chart height="350" width="450" data="{!pieData.size}">
            <apex:pieSeries dataField="data" labelField="Name"/>
            <apex:legend position="bottom"/>
        </apex:chart>
        
        
        </apex:pageblockSection>
                 <apex:pageblocksection title="Products" >
               
               <apex:outputPanel title="Family">
               <apex:outputLabel value="Family:"> &nbsp;&nbsp;
               <apex:actionRegion >              
                <apex:selectList value="{!selectedproductfamily}" size="1" label="Family"  rendered="true" >
                    <apex:actionSupport action="{!query}" reRender="pb1" id="fam" event="onchange"/> 
                    
                    <apex:selectOptions value="{!productfamily}" />
                    
                </apex:selectList>
                   </apex:actionRegion> 
                   </apex:outputLabel>
                   </apex:outputPanel>  
            </apex:pageblocksection>
          </apex:pageBlock>
          
          <apex:pageBlock id="pb1" mode="edit">  
         <apex:pageblocktable value="{!queryResult}" var="acc">
          <apex:column value="{!acc.Product__r.Name}" />
          <apex:column value="{!acc.Product__r.Family}" />
          <apex:column value="{!acc.Product__r.Measurement_Type__c}" />
          <apex:column value="{!acc.Product__r.Treatment_Unit_Price__c}" />
          <apex:column value="{!acc.Product__r.Cleaning_Unit_Price__c}" />
          <apex:column headerValue="Service">
          <apex:inputfield value="{!acc.Service__c}"/>
          </apex:column>
          
          <apex:column headerValue="Quantity">
          <apex:inputfield value="{!acc.Quantity__c}"/>
          </apex:column>
          
           <apex:column headerValue="Length">
          <apex:inputfield value="{!acc.Length__c}"/>
          </apex:column>
          
           <apex:column headerValue="Width">
          <apex:inputfield value="{!acc.Width__c}"/>
          </apex:column>

          </apex:pageblocktable>
        </apex:pageblock>
    </apex:form>
</apex:page>

I checked in inspect element i got a javascript error - 

SfdcCore.js:384 Visualforce Chart: Error loading configuration for chart 'jid0jid1pbjid3jid4': Unable to infer data model from result: result is not an Arrayb.resolve.b.provide.log @ SfdcCore.js:384 https://login.salesforce.com/17181/logo180.png Failed to load resource: the server responded with a status of 404 (Not Found)

Not sure wht tht means.

While debug i am getting in log the below - 
 
USER_DEBUG|[57]|DEBUG|@@@@(AggregateResult:{c=26, f=Bedding})



Regards
I wanted to make sure I wasn't missing anything. We're attempting to remove all "test" Notes we've loaded into our Developer Org.

But, it doesn't appear that Mass Delete in the Developer Org exists? Is this correct?

How have many of you removed records from the Notes object? Dataloader.io? Or Support Case?

Thanks,

-E
Hi Experts,
 
I need a trigger help.
Two objects having lookup relationship.
Parent Object - Case
Child Object - Candidate_Task__c
Child object having one custom number field   Resource_incurred_hours_Update__c.
Parent object having one custom number field   Total_Hours_Update__c.
I need to calculate the sum of all “Resource incurred hours” field values and populate in “Total Hours” field.
Please find the below image and trigger.

Case Object and Custom Object (Project - Task - Resource):

Case and Custom Object (Project - Task - Resource)

Trigger:

trigger RollUpIncurredHours on Candidate_Task__c (after delete, after insert, after update) {
 
  //Limit the size of list by using Sets which do not contain duplicate elements
  set<iD> ProjectTaskResourceIds = new set<iD>();
 
  //When adding new Incurred Hours or updating existing Incurred Hours
  if(trigger.isInsert || trigger.isUpdate){
    for(Candidate_Task__c p : trigger.new){
      ProjectTaskResourceIds.add(p.Resource_incurred_hours_Update__c);
    }
  }
 
  //When deleting Incurred Hours
  if(trigger.isDelete){
    for( Candidate_Task__c p : trigger.old){
      ProjectTaskResourceIds.add(p.Resource_incurred_hours_Update__c);
    }
  }
 
  //Map will contain one ProjectTaskResource Id to one sum value
  map<Id,Double> ProjectTaskResourceMap = new map<Id,Double> ();
 
  //Produce a sum of Resource_incurred_hours_Update__c and add them to the map
  //use group by to have a single ProjectTaskResource Id with a single Incurred Hours
  for(AggregateResult q : [select sum(Resource_incurred_hours_Update__c)
    from Candidate_Task__c where Candidate_Task__c IN :ProjectTaskResourceIds group by Candidate_Task__c]){
      ProjectTaskResourceMap.put((Id)q.get('Candidate_Task__c'),(Double)q.get('expr0'));
  }
 
  List ProjectTaskResourceToUpdate = new List();
 
  //Run the for loop on ProjectTaskResource using the non-duplicate set of ProjectTaskResource Ids
  //Get the sum value from the map and create a list of ProjectTaskResource to update
  for(Candidate_Task__c o : [Select Id, Resource_incurred_hours_Update__c from Candidate_Task__c where Id IN :ProjectTaskResourceIds]){
    Double IncurredHoursSum = ProjectTaskResourceMap.get(o.Id);
    o.Resource_incurred_hours_Update__c = IncurredHoursSum;
    ProjectTaskResourceToUpdate.add(o);
  }
 
  update ProjectTaskResourceToUpdate;
}
 
Anyone sort out my issue. Thanks in advance.
 
Thanks,
Manu
Hello,


I need a sort button in Orders for Order Products where I can sort the products into the order that I want. There is a sort button in the Opps for the products there. Has anyone found out how to create a custom button with the similar functionallity?
Hello all the SalesForce Guru,
        I want to say thank you ahead. We run in to issue with one of our Apex trigger which trigger when one of our coustom object field is modify some contact informations change. I didn't wrote the Apex code. The trigger seem to work fine under system administrator profile, but acting very strange under other more restristed profile. I added all the apex classes and visualforce page permission to this profile, also profile have edit pirviliege to contact information. 
        Did I miss anything? Thank you very much for your help!

Hi everyone,

We are currently trying to sync the field of an Account from an external service.
The external service is a just an Azure database, there is also an http api in front of the database that we can use.

What we want to achieve is :

Each time a salesforce user display the account page, the data is retrieved from the external database/webservice and the Account's field is updated accordingly.

We found potential solutions but are not sure which one is the best :

- There's something called "Lightning" that looks like it could do the job.
- We can create an Apex method that will do the job.
     - How can we trigger it so that we have the behavior we want ? Could we invoke it with javascript from the account page ?
     - If we can't achieve the behavior we want, is invoking it with a 'refresh' button the best method ?


Thanks everyone

Hi  All,

 

 

          Im Facing an issue while updating the Event records owner change. Below is the error im getting 

"Apex Event trigger cannot handle batch operations on recurring events" .

 

Here is my Query in the trigger,

 

' SELECT Id, OwnerId,Status__c FROM events where  RecurrenceActivityId != null  and IsRecurrence = true '

 

I think there should be mistake in the query.

 

Please help me with the issue

Hi everyone,

We are currently trying to sync the field of an Account from an external service.
The external service is a just an Azure database, there is also an http api in front of the database that we can use.

What we want to achieve is :

Each time a salesforce user display the account page, the data is retrieved from the external database/webservice and the Account's field is updated accordingly.

We found potential solutions but are not sure which one is the best :

- There's something called "Lightning" that looks like it could do the job.
- We can create an Apex method that will do the job.
     - How can we trigger it so that we have the behavior we want ? Could we invoke it with javascript from the account page ?
     - If we can't achieve the behavior we want, is invoking it with a 'refresh' button the best method ?


Thanks everyone