• Raghu Ch 2
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 1
    Replies
Hi,

Lightning data table not pulling the data. rows are comming as blank. I am trying to display the picklist values of Type field on the account. Code below:

HTML File:
<template>
            <lightning-datatable
            key-field="Id"
            columns={columns}
            data={picklistValues.data.values}>
    
            </lightning-datatable>


</template>

JS File:
import {
    LightningElement,
    wire
} from 'lwc';
import {
    getPicklistValues
} from 'lightning/uiObjectInfoApi';
import TYPE_FIELD from '@salesforce/schema/Account.Type';


export default class Picklistvalues extends LightningElement {

    columns = [
        { label: 'Id', fieldName: 'Id', type: 'Id' },
        { label: 'Account Type', fieldName: TYPE_FIELD.fieldApiName, type: 'text' }
    ];


    @wire(getPicklistValues, {
        recordTypeId: '012o0000000qnHlAAI',
        fieldApiName: TYPE_FIELD,
    })
    picklistValues;
}
let recordEditForm = this.template.querySelector('lightning-record-edit-form');
 let fields = {};
 this.fieldSetFields.forEach(field=> {
console.log('##### I am on line1254##### field value is ## '+ JSON.stringify(field.css));
 let keyVal = field.key;
 let fieldVal = this.template.querySelector('.' + keyVal).value;
 fields[field.fieldName] = fieldVal;
 //console.log('## I am on line 1187@@@@@@ ' + field + ' - '+ i);
 if(this[i].keyVal=='Sales_Authorization_Type__c-1'){
     console.log('##### i am on line 1186');
     field[i].css = this.keyVal + 'slds-show';
     console.log('@@@@ I am on line 1191@');
 }
 });

While iterting through JS for loop, the shown above, the css property 'slds-show' should apply to only the record that matches the if criteria, but sls-show property is being applied to all the elements which the loop is iterating over it. 

Let me know what the issue could be.
Hi,

The user is not getting chatter email notifications after a tracked field update is made to the account the user follows. The user has also added the account to the chatter stream named "Account stream". The notification settings for the stream are set to Every Post.

User-added image
Hi, I am trying to use THIS_WEEK date filter in my custom setting and trying to refrence it in my code. I am getting the below error:
System.TypeException: Invalid date: THIS_WEEK

Code snippet below:

PayCycleInformationWrapper payCycleInfoWrap=new PayCycleInformationWrapper(); List<cve__PaymentScheduleItem__c> psItemList=new List<cve__PaymentScheduleItem__c>(); Map<string,cve__PaymentScheduleItem__c> payFreqPSItemMap=new Map<string,cve__PaymentScheduleItem__c>(); WTW_Report_Parameters__c wtwReportParams = WTW_Report_Parameters__c.getInstance(UserInfo.getProfileId()); String payableTime=wtwReportParams.Payable__c;  // place where i am storing THIS_WEEK as filter
Date payableDate=Date.valueOf(payableTime);
String payFrequency=wtwReportParams.Pay_Frequency__c; set<string> payFrequencySet=new set<string>(); payFrequencySet.add(payFrequency);

psItemList=[ Id FROM cve__PaymentScheduleItem__c where cve__PaymentSchedule__r.Name Like '%OnCycle%' and cve__payable__c=:payableDate and cve__paymentschedule__r.Name ];
Hi, I am getting the below error when i try to deploy the sample bikes application to the salesforce org. 


Error deploying or retrieving source: The file or directory that you tried to deploy or retrieve isn't in a package directory that's specified in your sfdx-project.json file. Add this location to your "packageDirectories" value, or deploy or retrieve a different file or directory. For details about sfdx-project.json, see: https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_config.htm

Below is my sfdx-project.json file

{
    "packageDirectories": [
        {
            "path": "C:/Users/raghu.cheruvu/Documents/ebikes-lwc-master/force-app",
            "default": false
        }
    ],
    "namespace": "",
    "sourceApiVersion": "47.0"
}

Let me know if something else needs to be configured
Hi,

I am parsing .csv file in visualforce. While parsing a percentage column from .csv file and assigning to the a percentage column (FMC_Ownership__c) in salesforce. I get the below error.

Invalid decimal error.

Code below let me know what the issue could be.

public class upload{

public string fileName{get;set;}
    public blob fileBody{get;set;}
    public attachment att{set;get;}
    
    public String[] filelines = new String[]{};
    
    public string nameFile{get;set;}


nameFile=fileBody.toString();
             //nameFile=EncodingUtil.base64Encode(fileBody);
           filelines = nameFile.split('\n');
            system.debug('#######' + filelines.size());
            
            List<Acquisition__c> aqList=new List<Acquisition__c>([Select Id,Pro_Forma_Version__c
                                            from Acquisition__c
                                            where Id=:ID]);
            
            aqUpdaList.clear();
            
            Map<Id,Acquisition__c> aqMapUpdate=new Map<Id,Acquisition__c>();
             for (Integer i=0;i<filelines.size();i++)
                {
                    String[] inputvalues = new String[]{};
                    inputvalues = filelines[i].split(',');
                    system.debug('#######' + inputvalues[1]);
                    for(Acquisition__c a:aqList){
                    a.Pro_Forma_Version__c=inputvalues[0];
                    a.FMC_Ownership__c=decimal.valueof(inputvalues[1].trim());
                    //Decimal.valueOf(inputvalues[1]);
                    //decimal.valueOf(inputvalues[1]);
                    aqUpdaList.add(a);
                    aqMapUpdate.put(a.Id,a);
                    }
                    //system.debug('#######' + Decimal.valueOf(inputvalues[1]));
                }
            
                //update aqUpdaList;
                update aqMapUpdate.values();
}
Hi,

I am working on a scenario where the file needs to be picked up from a SFTP server and loaded into salesforce.

Can salesforce web service pick up a file from sftp location and load it into salesforce? Whats the sytax for contructing a SFTP request?
Hi, 

I am trying to load attachment to salesforce using bulk api. As mentioned in the docs, i specified the request .txt as below in the root of the zipped folder:
[
  {
    "Name" : "Test.pdf",
    "ParentId" : "001U000000sRM7dIAG",
    "Body" : "#Test.pdf"
  }
  
]

But when the file is being loaded into salesforce, the body is being loaded as string (Test) but not as path. Content of the attachment is not getting loaded.Is there a way to specify the file path in json key-value pair? or does the bullk api for loading binary attachments work only with .csv format or xm format?
Hi All,

Getting the below error when i click on quick action containing a lightning component. 
Action failed: forceChatter:lightningComponent$controller$doInit (undefined is not an object (evaluating 'fn-apply')]

quickActionHandlerHelper.js failed to create component - forceChatter:lightningComponent

Let me know what the issue could be.
Hi,

I have a time dependent workflow action on a Opportunity to send an email alert 30 days before opportunity close date, if the opportunity amount is greater than 90,000. The email notification is being sent even if the close date of the opportunity is this week. Has any one come across this issue?
Hi All,

Getting the below error when i click on quick action containing a lightning component. 
Action failed: forceChatter:lightningComponent$controller$doInit (undefined is not an object (evaluating 'fn-apply')]

quickActionHandlerHelper.js failed to create component - forceChatter:lightningComponent

Let me know what the issue could be.
Hi,

The user is not getting chatter email notifications after a tracked field update is made to the account the user follows. The user has also added the account to the chatter stream named "Account stream". The notification settings for the stream are set to Every Post.

User-added image