• Sfdc learner18
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
Hi Experts,

I was getting a error "Exceeded view state " in my Visualforce page so the list variable  i mentioned as transient the error is gone now.But the problem is the sorting is not working ..My code is very big so i cant post it here.It would be very useful if someone give some idea to solve this and make the sorting work,


Thanks!!
Hi experts,
I have a requirement where i need to search a phone number in the UI like => 8405678978.So if i am passing the number in the UI like this 8405678978,it is not querying from the database as in the database the phone number is stored in the following format ==> (840) 567-8978 or 840-567-8978.

Below is the way i have tried in the dynamic query.
if (searchstring != null) {
                String tmpsearchstring = searchstring+'%';
                String tmpPhoneString='%'+searchstring+'%'; 
                System.debug(tmpPhoneString);
                queryString += ' AND (FirstName like :tmpsearchstring OR LastName like :tmpsearchstring OR Name like :tmpsearchstring OR EMail like :tmpsearchstring OR Phone like :tmpPhoneString)';

The problem i am facing is if in the UI i pass 840(only 3 digits) then all other phone numbers with 840 as there middle digits or last digits are displaying....and if i pass a phonenumber as 8405(4 digits) then record is not displaying because of the format of phone number stored in the database. How can i get the records even if i pass 4 digits or more digits in the search box

Looking for the help.

Thanks!!
Hi Experts,

I was getting a error "Exceeded view state " in my Visualforce page so the list variable  i mentioned as transient the error is gone now.But the problem is the sorting is not working ..My code is very big so i cant post it here.It would be very useful if someone give some idea to solve this and make the sorting work,


Thanks!!
Hello Devs,

I have a component that is going to be using a <lightning:datatable /> object I am attempting to set the cols with:
var cols = [
    {label: 'Vendor', fieldName: 'a02_Vendor__r.Name', type: 'text'},
    {label: 'Type', fieldName: 'RecordType.Name', type: 'text'},
    {label: 'Created', fieldName: 'CreatedDate', type: 'Date'}
];
component.set("v.tableCols", cols);
Where the a02_Vendor__r.Name is a related Account Name and the RecordType is the RecordType of the Object being returned by my controller.

When I console.log(response.getReturnValue()) from my call back function I do see that I am getting the apropreate and expected resluts from my controller, however my lighting datatabel IS displaying the CreatedDate field, but the two realted fields are empty. Can we not use related or nested objects in the datatable component? (that would be silly)...

Any help would be much apreciated!