• Somasundaram Subramanian
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 25
    Questions
  • 17
    Replies
am new to delopment  how to rmeove duplicate in the list
zUsageToCreateT9 
 
why am getting IN operator must be used with an iterable expression at line 

for(pse__Milestone__c ms : mapMilestone.values()){
            if(mapMilestoneRREVA.containsKey(ms.Id) && ms.Budget__c != null){
                set<Id> tempEVAIds = new set<Id>();
                tempEVAIds.addAll(mapMilestoneRREVA.get(ms.Id));
                if(mapBudgetRREVA.containsKey(ms.Budget__c)) {
                    tempEVAIds.addAll(mapBudgetRREVA.get(ms.Budget__c));
                }
                mapBudgetRREVA.put(ms.Budget__c, tempEVAIds);
            }
        }
        system.debug('total mapBudgetRREVA mappings:'+mapBudgetRREVA.size()+' : '+mapBudgetRREVA);  

     map<Id,pse__Est_Vs_Actuals__c> mapEVA = new map<Id,pse__Est_Vs_Actuals__c>([select Id,pse__Project__c,pse__Estimated_Hours__c,pse__Scheduled_Bill_Rate__c,
        pse__Start_Date__c,pse__End_Date__c,pse__Actual_Hours__c,pse__Actual_Billable_Amount__c, pse__Assignment__c from pse__Est_Vs_Actuals__c where pse__Time_Period_Type__c IN: TimePeriodType and  pse__Assignment__r.pse__Milestone__r.Budget__c IN: mapBudgetRREVA
         and ((pse__Start_Date__c >=: M_SWDate and pse__Estimated_Hours__c > 0) or (pse__End_Date__c <: M_EWDate and pse__Actual_Hours__c >0))]);


        
 
am new to development , in below code they are getting values in Projects and using this projects value in soql query 
am new to development, what will be the value of projects in below code
  global void execute(Database.BatchableContext BC, List<pse__Proj__c> projects){

        date M_TDate = date.today();//Today Date               
        date M_SWDate = M_TDate.toStartofWeek();//Start Date of week      
        date M_EWDate = M_SWDate.addDays(6);//End Date of Week
        
        set <string> ResourceRequestStatus= new set <string> {'Ready to Staff'};        
        set <string> TimePeriodType = new set <string> {'Week'};
        
        map<Id,set<Id>> mapAssignmentEVA = new map<Id,set<Id>>();
        
        map<Id,set<Id>> mapRREVA = new map<Id,set<Id>>();
        
        map<Id,set<Id>> mapMilestoneRREVA = new map<Id,set<Id>>();
        map<Id,set<Id>> mapMilestoneEVA = new map<Id,set<Id>>();
        
        map<Id,set<Id>> mapBudgetRREVA = new map<Id,set<Id>>();
        map<Id,set<Id>> mapBudgetEVA = new map<Id,set<Id>>();
        
        map<Id,pse__Resource_Request__c> mapRRforRR = new map<Id,pse__Resource_Request__c>([select Id, pse__Project__c,pse__SOW_Hours__c, pse__Requested_Bill_Rate__c, pse__Assignment__c, pse__Milestone__c
        from pse__Resource_Request__c  where pse__Status__c IN: ResourceRequestStatus and pse__Project__c IN: projects]);
I have a formula field and I have a picklist field called stagename, it has  5 single vaues 
the formula field should get value of  Account.Account_FY_Franchis__c (field from account)
only when the stagename is "1" or "2"  for other stagenames this formula field should not change , is it possible?
thanks
please suggest me some good app for cpq configuration deplopyment between org
thanks
i want to find out test code coverage apex class so that i ask my devloper to increase the code coverage, how do i find , pls suggest
one of the managed package is installed by an admin and he is no longer with org, how to i delete this batch job and create new batch jobUser-added image
The package is already suspended and when i tried to unstall the package it throw below error and it says more than 300 classes referred like below 

The Apex class "InflAPIHandler" is in use by a queued or in progress Apex Batch or Sharing Recalculation and cannot be deleted.
when i query the below one and I couldnt find any of the above class id is in batch , how to fix this
SELECT ApexClassId,CompletedDate,CreatedById,CreatedDate,ExtendedStatus,Id,JobItemsProcessed,JobType,LastProcessed,LastProcessedOffset,MethodName,NumberOfErrors,ParentJobId,Status,TotalJobItems FROM AsyncApexJob 
thanks
when i try to uninstall packages and not sure how to find the action , and i noticed one action it refer this ddpdesigncontainer but even i save its not removed , please verify the screen shot , pls advise me how to rmeoveUser-added image
User-added image
I want to uninstall installed package but the below action is blocking and noticed that even i select no override still it shows DdpdesignerContainer 
how to remove this
User-added image
i have a currecny field type 
how to compare the value of field is >0 using apex class please suggets
i have a field its from financial package and currency type field ffps_zuora__PrebillConsumed__c value is  USD 0.00
the apex class code as per the value it should not assign prebill usage but its processing and the value consider as greater than 0 any idea?
 if (bei.ffps_zuora__PrebillConsumed__c > 0) {
        prebillUsage = setPrebillUsageData(bei, subName);
      }

public void createServicesUsageT97(){

    if (zUsageToCreateT97.isEmpty()){
      System.debug('no usage to create in T97');
      return;
    }
      
    // batch by 50 usage records 
    for (Integer i = 0; i <= zUsageToCreateT97.size()/50 ; i++){
      JSONGenerator jsonBody = JSON.createGenerator(false);
      jsonBody.writeStartObject();
      jsonBody.writeStringField('type', 'Usage');
      jsonBody.writeObjectField('objects', batch50(i*50, zUsageToCreateT97.size()));
      jsonBody.writeEndObject();

      // remove the double quote before and after each object definition
      String jsonBodyToString = jsonBody.getAsString().replaceAll('\\"\\{','\\{');
      jsonBodyToString = jsonBodyToString.replaceAll('\\}\\"','\\}'); 
      // remove the escape character before the doubld quote
      jsonBodyToString = jsonBodyToString.replaceAll('\\\\','');
      System.debug('request body: ' + jsonBodyToString);

      HttpRequest req = new HttpRequest();
      req.setEndpoint('callout:'+ config.T97NamedCredential__c + '/v1/action/create?rejectUnknownFields=true');
      req.setHeader('Content-Type', 'application/json');
      req.setMethod('POST');
      req.setBody(jsonBodyToString);
      Http http = new Http();
      HttpResponse res = new HttpResponse();

      if (!Test.isRunningTest()){
        res = http.send(req);
      } else {
        res.setBody(mockResponse);
      } 

      if (res.getStatusCode() == 200){
        parseResponse(JSON.createParser(res.getBody()));
      } else {
        runtimeLog = Z_Util.addRunTimeLogCalloutException(runtimeLog, 'Issues creating usage in T97',
              res.getBody(), '', '');
      } 
    }   
    runtimeLog = Z_Util.addRunTimeLogItem(runtimeLog, (successfullyCreatedUsage.size() + ' successfully created T97 usage record(s)'));
  }

the above code skips and its not thowing error also am new to code , any idea why this skips
I tried using https://www.salesforceben.com/way-to-delete-apex-classes-from-production/
do i need to run the test classes for deletion of apex classes
my list has classes and test classes 
if i select no test class run will this delete the apex class in production?
thanks
I need to delete morethan 50 apex classes, each class is referred in either Apex page or some other class, when i delete the class manually in UAT , will it throw error?
if i use workbecnh and delete then will it take care the reference and delete ? please advise
thanks
is there any way to get an automated way about  the field details of the object and where these fields are used ? 
one of the process builder updates a field in account and this is triggred based on integration and i read that if we avoid process builder , it may fix the issue
can i use flow instead of process builder, will it fix?
thanks
I have created connected app for oauth
it generated customer key and customer secret,
 
do these two information enough to connect from regitered app 
or do i need to pass user name and password to connect from app to salesforce pls advise
thanks
how to set up oauth connection
what are the steps to be followed please advise
thanks
do we have any tool to convert existing process builder into lucid chart
thanks
am new to delopment  how to rmeove duplicate in the list
zUsageToCreateT9 
 
why am getting IN operator must be used with an iterable expression at line 

for(pse__Milestone__c ms : mapMilestone.values()){
            if(mapMilestoneRREVA.containsKey(ms.Id) && ms.Budget__c != null){
                set<Id> tempEVAIds = new set<Id>();
                tempEVAIds.addAll(mapMilestoneRREVA.get(ms.Id));
                if(mapBudgetRREVA.containsKey(ms.Budget__c)) {
                    tempEVAIds.addAll(mapBudgetRREVA.get(ms.Budget__c));
                }
                mapBudgetRREVA.put(ms.Budget__c, tempEVAIds);
            }
        }
        system.debug('total mapBudgetRREVA mappings:'+mapBudgetRREVA.size()+' : '+mapBudgetRREVA);  

     map<Id,pse__Est_Vs_Actuals__c> mapEVA = new map<Id,pse__Est_Vs_Actuals__c>([select Id,pse__Project__c,pse__Estimated_Hours__c,pse__Scheduled_Bill_Rate__c,
        pse__Start_Date__c,pse__End_Date__c,pse__Actual_Hours__c,pse__Actual_Billable_Amount__c, pse__Assignment__c from pse__Est_Vs_Actuals__c where pse__Time_Period_Type__c IN: TimePeriodType and  pse__Assignment__r.pse__Milestone__r.Budget__c IN: mapBudgetRREVA
         and ((pse__Start_Date__c >=: M_SWDate and pse__Estimated_Hours__c > 0) or (pse__End_Date__c <: M_EWDate and pse__Actual_Hours__c >0))]);


        
 
am new to development , in below code they are getting values in Projects and using this projects value in soql query 
am new to development, what will be the value of projects in below code
  global void execute(Database.BatchableContext BC, List<pse__Proj__c> projects){

        date M_TDate = date.today();//Today Date               
        date M_SWDate = M_TDate.toStartofWeek();//Start Date of week      
        date M_EWDate = M_SWDate.addDays(6);//End Date of Week
        
        set <string> ResourceRequestStatus= new set <string> {'Ready to Staff'};        
        set <string> TimePeriodType = new set <string> {'Week'};
        
        map<Id,set<Id>> mapAssignmentEVA = new map<Id,set<Id>>();
        
        map<Id,set<Id>> mapRREVA = new map<Id,set<Id>>();
        
        map<Id,set<Id>> mapMilestoneRREVA = new map<Id,set<Id>>();
        map<Id,set<Id>> mapMilestoneEVA = new map<Id,set<Id>>();
        
        map<Id,set<Id>> mapBudgetRREVA = new map<Id,set<Id>>();
        map<Id,set<Id>> mapBudgetEVA = new map<Id,set<Id>>();
        
        map<Id,pse__Resource_Request__c> mapRRforRR = new map<Id,pse__Resource_Request__c>([select Id, pse__Project__c,pse__SOW_Hours__c, pse__Requested_Bill_Rate__c, pse__Assignment__c, pse__Milestone__c
        from pse__Resource_Request__c  where pse__Status__c IN: ResourceRequestStatus and pse__Project__c IN: projects]);
I have a formula field and I have a picklist field called stagename, it has  5 single vaues 
the formula field should get value of  Account.Account_FY_Franchis__c (field from account)
only when the stagename is "1" or "2"  for other stagenames this formula field should not change , is it possible?
thanks
The package is already suspended and when i tried to unstall the package it throw below error and it says more than 300 classes referred like below 

The Apex class "InflAPIHandler" is in use by a queued or in progress Apex Batch or Sharing Recalculation and cannot be deleted.
when i query the below one and I couldnt find any of the above class id is in batch , how to fix this
SELECT ApexClassId,CompletedDate,CreatedById,CreatedDate,ExtendedStatus,Id,JobItemsProcessed,JobType,LastProcessed,LastProcessedOffset,MethodName,NumberOfErrors,ParentJobId,Status,TotalJobItems FROM AsyncApexJob 
thanks
i have a currecny field type 
how to compare the value of field is >0 using apex class please suggets
i have a field its from financial package and currency type field ffps_zuora__PrebillConsumed__c value is  USD 0.00
the apex class code as per the value it should not assign prebill usage but its processing and the value consider as greater than 0 any idea?
 if (bei.ffps_zuora__PrebillConsumed__c > 0) {
        prebillUsage = setPrebillUsageData(bei, subName);
      }

public void createServicesUsageT97(){

    if (zUsageToCreateT97.isEmpty()){
      System.debug('no usage to create in T97');
      return;
    }
      
    // batch by 50 usage records 
    for (Integer i = 0; i <= zUsageToCreateT97.size()/50 ; i++){
      JSONGenerator jsonBody = JSON.createGenerator(false);
      jsonBody.writeStartObject();
      jsonBody.writeStringField('type', 'Usage');
      jsonBody.writeObjectField('objects', batch50(i*50, zUsageToCreateT97.size()));
      jsonBody.writeEndObject();

      // remove the double quote before and after each object definition
      String jsonBodyToString = jsonBody.getAsString().replaceAll('\\"\\{','\\{');
      jsonBodyToString = jsonBodyToString.replaceAll('\\}\\"','\\}'); 
      // remove the escape character before the doubld quote
      jsonBodyToString = jsonBodyToString.replaceAll('\\\\','');
      System.debug('request body: ' + jsonBodyToString);

      HttpRequest req = new HttpRequest();
      req.setEndpoint('callout:'+ config.T97NamedCredential__c + '/v1/action/create?rejectUnknownFields=true');
      req.setHeader('Content-Type', 'application/json');
      req.setMethod('POST');
      req.setBody(jsonBodyToString);
      Http http = new Http();
      HttpResponse res = new HttpResponse();

      if (!Test.isRunningTest()){
        res = http.send(req);
      } else {
        res.setBody(mockResponse);
      } 

      if (res.getStatusCode() == 200){
        parseResponse(JSON.createParser(res.getBody()));
      } else {
        runtimeLog = Z_Util.addRunTimeLogCalloutException(runtimeLog, 'Issues creating usage in T97',
              res.getBody(), '', '');
      } 
    }   
    runtimeLog = Z_Util.addRunTimeLogItem(runtimeLog, (successfullyCreatedUsage.size() + ' successfully created T97 usage record(s)'));
  }

the above code skips and its not thowing error also am new to code , any idea why this skips
is there any way to get an automated way about  the field details of the object and where these fields are used ? 
how to set up oauth connection
what are the steps to be followed please advise
thanks
when the approval process is not fall in any condiiton when user submit the approval it submi and reject immediately , 
how to prompt user that no condtion falls and system should not submit the approval any idea?
Hi
   I have stage field history and like to take the date value from stage history for the stage 3 ,
how to get this value any suggetsions?

User-added image
 used changeset and deployed the approval process I have deployed 18 approval process from opportunity object but after deployment I noticed that it has stamped 24 approval process,
I double checked the name of the process and its only 18 process in changeset dont know why 24 process are stamped , may i know the reason for this.
in the below , FY21 US Strategic CO Approval v2 is not added but after deployment I checked this approval process is stamped today date 
User-added image