• Miranda L 2
  • NEWBIE
  • 20 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 26
    Questions
  • 18
    Replies
Hello,
We have a standard plan in Salesforce for enterprise edition so Can we upgrade to Premier Success plans and is that included into our licenses or do we need to pay any extra cost.
Please let me know.
Thank you
1. How to count API calls for specific WebServices"
2. Can we generate a report to see how many API calls for specific web services"
Hello there,
We are having Opportunity vf page and the related list Campaign Influence but when I click on the del in the related list then its not getting delete. Can you suggest where should I make changes in VF so that it will work.
here is my vf page code 
 
<apex:page standardController="Opportunity" extensions="OpportunityViewController">
    <div><c:OpportunityDHStageComponent rendered="{!isDynamicHedging}"/></div>
    <div><c:OpportunityBaseStageComponent rendered="{!!isDynamicHedging}"/></div>
    <apex:pageMessages id="messages"></apex:pageMessages>
    <apex:detail relatedList="true" showChatter="false" inlineEdit="true"/>
</apex:page>

Thanks
Hello there,
I am getting above subject email into my inbox, could anyone explain me what is wrong going around to resolve it.
Thanks
Hello there,
I have written batch class which is not working as expected so could you please help me to findout the issue.

 
Hi there,
I wondering when I tried to check to find out my current date then it gives me 2 hours back time.

User-added image    Datetime cDT = System.now();
    system.debug('Date Time: '+cDT);
    String LongDate = cDT.format('EEEE, MMMM d, yyyy');
    system.debug('long Date: '+LongDate);
   datetime d = Datetime.now();
   system.debug('d: '+d);
why my current time is not showing. I have checked the company information which is the exact my location but still the time showing 2 hours back. Please guide me.
 
Hello there,
I am getting the error after I press the button 
System.QueryException: List has no rows for assignment to SObject
Class.WizardCompController.<init>: line 269, column 1
please suggest me how to resolve it
 
Hello there,
We have a visualforce page where we use lookup field there all the record types showing but I want it show only trade record type contract owner.
Thanks
Hello,
I am assigning list value to a text field but while assigning there are parenthesis which I want to remove so I used remove method but I am using it two times to remove it. Is there a way to use at once or some other tricks
Test Product Item	(dh, ph, kh, ab, cd)

Test_Product_Item__c   = invoiceWrapped.product_items.toString().replace('(','').replace(')','')

Thanks
Hello there,
my batch class failed to update some records please do help me. Here is the error message
Failed to process batch for class 'BatchFirstInvoiceasProductClient' for job id '7070X0000CQtt7h' caused by: System.DmlException: Update failed. First exception on row 0 with id 0010X00004LVOpyQAH; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record or 200 records:


Thank you
Hello there,
my batch getting failed to update some records and I gets following error message.
Apex script unhandled exception by user/organization: 0098d000007tvRV/00Db002ef00HO6N

Failed to process batch for class 'CalcFirstInvoice' for job id '7070X5640CQtuKf'

caused by: System.DmlException: Update failed. First exception on row 0 with id 001b000000OlwatAAB; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: []

Class.CalcFirstInvoice.execute: line 26, column 1

Please help me
{
    "statusCode": 400,
    "status": "Error",
    "recordReferences": [],
    "errors": [
        {
            "recordId": "Class.System.JSON.deserialize: line 15, column 1\nClass.GlobalWS.processTable: line 33, column 1",
            "errorMessage": "Illegal value for primitive"
        }
    ]
}
please help me
 
third party need to pass a list of values in the request body of POST method but I get 400: Bad Request error.
Third party JSON using like below
{"entityName":"Invoice","records":[{
"company_id":"YKY7EP1K1",
//below product items will have multiple values which would be in string.
"product_items":["apple","orange"],
"workflow_state":null
}]
}
so how could I develope product_items to assign this array string values to my Invoice object field. Webservice already got developed and its running fine but this new field got created recently and third party want to send in array format so how could I implement it.
Thanks in advance 
I have created report so I want to calculate revenue. How could I calculate in report.
Hello there,
I am creating report which I want to take value from Other recordType for example 
Custom Object has Transaction__c Look field and Transaction__c Object has 3 RecordType 
1/ Order
2/ Trading
3/Finish
Our invoice get connected with Transaction__c Order Record type of the ID so I am unable to take value in the report for Trading Report type.
Could you pelase suggest me. How can I create formula or something in the report to take value from Transaction__c object other report type.
Thanks
Hello there,
I am getting following error while sending the data from third party
"error":{"code":"CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY","message":"accountTrigge: execution of BeforeInsert\n\ncaused by: System.NullPointerException: Attempt to de-reference a null object\n\nClass.TriggerAccount.calculateTime: line 23, column 1\nClass.TriggerAccount.handle: line 12, column 1\nClass.Triggers.manage: line 51, column 1\nTrigger.accountTrigger: line 53, column 1"

Please guide me
 
Hello there,
How to create validation which should not display themself as their manager or some lines of code to not to display them or ignore them to display themself as their own manager.
Please guide
1. Is it possible to fetch all the picklist field names along with the picklist field values available in Salesforce? Is there any object available in salesforce to query picklist values? Eg: Select Name From Picklist_Table__c ?
 
2. Using SOQL query is it possible to fetch the picklist values through R-language query? 
Hello there,
We have custom buttons in custom objects which is placed in classic through page layout but those buttons not visible into lightning. Is there have any possible reasons.
Thanks
Hello there,
someone from our Salesforce org click on the lightning so my organization switched to lightnig but they do not want to shift to the lightning. How could I back to Classic without telling them to click on classic and disable lightning.
Thanks
Hello there,
I have written batch class which is not working as expected so could you please help me to findout the issue.

 
Hi there,
I wondering when I tried to check to find out my current date then it gives me 2 hours back time.

User-added image    Datetime cDT = System.now();
    system.debug('Date Time: '+cDT);
    String LongDate = cDT.format('EEEE, MMMM d, yyyy');
    system.debug('long Date: '+LongDate);
   datetime d = Datetime.now();
   system.debug('d: '+d);
why my current time is not showing. I have checked the company information which is the exact my location but still the time showing 2 hours back. Please guide me.
 
public class LeadHelper {
        public static void createContact(List<Lead> leadList){
        Id ContactRecordTypeId =  Schema.SObjectType.Contact.getRecordTypeInfosByDeveloperName().get('New').getRecordTypeId();
        List<Contact> listCo=new List<Contact>();
        for(Lead l : leadList){
            Contact Con = new Contact();
            Con.firstName = l.firstName;
            Con.LastName = l.lastname;
            Con.Email = l.Email;
            Con.MobilePhone = l.MobilePhone.Substring(2,l.MobilePhone.length());
            Con.RecordTypeId = ContactRecordTypeId;
            Con.Source__c = 'Facebook';
            Con.Project__c = l.Project__c;
            Con.Address__c = l.Billing_City__c;
            Con.Ad_Name__c = l.Ad_Name__c;
            listCo.add(Con);
}  
     system.debug('listCo : ' + listCo);
        insert listCo;

            
      }
}


Please help me how can write test class code
Hello there,
We have a visualforce page where we use lookup field there all the record types showing but I want it show only trade record type contract owner.
Thanks
Hello there,
my batch class failed to update some records please do help me. Here is the error message
Failed to process batch for class 'BatchFirstInvoiceasProductClient' for job id '7070X0000CQtt7h' caused by: System.DmlException: Update failed. First exception on row 0 with id 0010X00004LVOpyQAH; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record or 200 records:


Thank you
Hello there,
my batch getting failed to update some records and I gets following error message.
Apex script unhandled exception by user/organization: 0098d000007tvRV/00Db002ef00HO6N

Failed to process batch for class 'CalcFirstInvoice' for job id '7070X5640CQtuKf'

caused by: System.DmlException: Update failed. First exception on row 0 with id 001b000000OlwatAAB; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: []

Class.CalcFirstInvoice.execute: line 26, column 1

Please help me
{
    "statusCode": 400,
    "status": "Error",
    "recordReferences": [],
    "errors": [
        {
            "recordId": "Class.System.JSON.deserialize: line 15, column 1\nClass.GlobalWS.processTable: line 33, column 1",
            "errorMessage": "Illegal value for primitive"
        }
    ]
}
please help me
 
third party need to pass a list of values in the request body of POST method but I get 400: Bad Request error.
Third party JSON using like below
{"entityName":"Invoice","records":[{
"company_id":"YKY7EP1K1",
//below product items will have multiple values which would be in string.
"product_items":["apple","orange"],
"workflow_state":null
}]
}
so how could I develope product_items to assign this array string values to my Invoice object field. Webservice already got developed and its running fine but this new field got created recently and third party want to send in array format so how could I implement it.
Thanks in advance 
Hello there,
How to create validation which should not display themself as their manager or some lines of code to not to display them or ignore them to display themself as their own manager.
Please guide
1. Is it possible to fetch all the picklist field names along with the picklist field values available in Salesforce? Is there any object available in salesforce to query picklist values? Eg: Select Name From Picklist_Table__c ?
 
2. Using SOQL query is it possible to fetch the picklist values through R-language query? 
Hello there,
Please help me to fix this error. My records not updating.

Apex script unhandled exception by user/organization: 0051X0000018hKG/00D1X0000008akn
Source organization: 00Db0000000HO6N (null)
Failed to process batch for class 'AllTimeRevenueAndYtDRevenueBatch' for job id '7071X00000FepEJ'

caused by: System.LimitException: Too many query rows: 50001

Class.AllTimeRevenueAndYtDRevenueBatch.execute: line 23, column 1
global class AllTimeRevenueAndYtDRevenueBatch implements Database.Batchable<sObject>,Database.Stateful,Schedulable {
global Decimal sum;
    public list<Account> oldInvoicesToUpdate = new list<Account>();
    public list<Account> invToUpdate = new list<Account>();
    public Set<ID> newEntitiesIds = new Set<ID>();
    global AllTimeRevenueAndYtDRevenueBatch(){}
        /* Batch class constructor */
    //Start method
    global Database.QueryLocator start(Database.BatchableContext BC)
    {
        //String query='SELECT id, Amount from Opportunity';
         String query='SELECT id, Normalized_Amount__c,Account__c from Invoice__c';
         return Database.getQueryLocator(query);
        }

    //Excute method
    
global void execute(Database.BatchableContext BC, List<Invoice__c> scope)
{
    //Excution logic
    //List<Opportunity> opp= new List<Opportunities>();
    //AggregateResult[] gr= [SELECT SUM(Amount) optyamt FROM Opportunity];
    AggregateResult[] gr= [SELECT SUM(Normalized_Amount__c) NormalizeAmount,Grouping(Account__c), Account__c
                                 FROM Invoice__c
                                 WHERE Category_Invoice__c != 'Monthly' AND Status__c != 'invoice_canceled' 
                                 GROUP BY Account__c];
    
    for(AggregateResult ag:gr){
          if((ID)ag.get('Account__c') != null){
                                         invToUpdate.add(new Account (
                                             ID = (ID)ag.get('Account__c'),
                                             //YtD_Revenue_for_Kantox__c = (Double)ag.get('NormalizeAmount'),
                                             AllTimeRevenueKantox__c = (Double)ag.get('NormalizeAmount')
                                             
                                         ));
                                     }
        
        //sum = (Decimal)ag.get('optyamt');
         
    }
    try{
            if(!invToUpdate.isEmpty()){
                update invToUpdate;
            }
        } catch(DmlException e) {
            System.debug('The following exception has occurred: ' + e.getMessage());
        }
    
}
      global void finish(Database.BatchableContext BC){
            // Finish logic
          system.debug(''+sum); 
       }
    public void execute(SchedulableContext Sc) {
        AllTimeRevenueAndYtDRevenueBatch batch = new AllTimeRevenueAndYtDRevenueBatch();
        Database.executeBatch(batch);    
    }
}

 
I need help to improve my code because in this method I am getting Nullpointerexception please suggest me
private void storeData(){
        Map<ID,Invoice__c> newInvoices = (Map<ID,Invoice__c>) Trigger.newMap;
  
        for(Invoice__c i: newInvoices.Values()){
            newEntitiesIds.add(i.Account__c);
        }
        
        if(Trigger.isUpdate){
            for(Invoice__c i: (List<Invoice__c>) Trigger.Old){
                if(i.Account__c != newInvoices.get(i.id).Account__c){
                    oldEntitiesIds.add(i.Account__c);
                }
            }
        }
           
        
    }

 
I have a Contact(Parent) and Prorgam Enrollment(Child). 

A contact can have multiple Program Enrollments. There is a date field on the Program Enrollment. 
For example, If a contact has 4 Program Enrollments and if I update the date field in One Program Enrollment, the same date should be updated in the other program enrollments too?? 

Can I achieve this through workflow rules? or process builder with out any code?


I appreciate your time and Help!