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

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 0
    Replies
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.