• amol salve
  • NEWBIE
  • 10 Points
  • Member since 2015

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

I have three fields in my VF page and user has to input two of them manually. Once both the values are entered, I need to show the Sum of both the entered values dynamically on the screen and that value must be saved to the third variable.

<apex:inputField value="{!Employee_segment_ineligible_under_plan__c}" id="eng" style="width:80%"></apex:inputField>

<apex:inputField value="{!Individual_income_reported_via_IRS__c}" id="enf" style="width:80%"></apex:inputField>

The sum should be displayed dynamically something like this and displayed without page being refreshed:

Based on your answers, the calculated subtotal is  __<calculated field>__ employees.

Please Help.

Thanks!!
  • June 12, 2017
  • Like
  • 0
Hi, I am having problems in undertaking one project, that's problem is mass edit record in custom object.
not selected edit, How can I mass edit all record for Related Custom object?
Examples:
User-added image
User-added image
User-added image

Thanks
Hi All,
I want insert record and update record.
When I create a record in Account, I want create same record in Contact also.
I want to Update the same record in Account and the contact also should update.

Please share if any one has syntax for this.

Thanks in Advance

Regards
Hari
Hello, I have the Apex Trigger below that is updating the Else statement on the parent object (Prospect) as soon as the child record (Appointment) is created. I need the parent field (Appointment_Quoted_Price__c) to update when the IF statement is true. Your feedback is greatly appreciated.
trigger Appointment_Price_Quoted on i360__Appointment__c (after insert) 
{
    if(Trigger.isAfter)
    {
        if(Trigger.isInsert)
        {
            set<Id> ProspectSet = new set<Id>();
            for(i360__Appointment__c Appointment :Trigger.new){
                ProspectSet.add(Appointment.i360__Prospect__c);
            }
            map<string, i360__Prospect__c> ProspectMap = new map<string, i360__Prospect__c>(
               [SELECT Id, Appointment_Quoted_Price__c 
               FROM i360__Prospect__c
                WHERE Id IN :ProspectSet]
            );
            list<i360__Prospect__c> ProspectsToUpdate = new list<i360__Prospect__c>();
            for(i360__Appointment__c Appointment : Trigger.new){
                i360__Prospect__c prospect = new i360__Prospect__c();
                Prospect.Id = ProspectMap.get(Appointment.i360__Prospect__c).Id;
                if((Appointment.i360__Result__c == 'Demoed, Not Sold' || Appointment.i360__Result__c == 'Sold') &&  Appointment.i360__Prospect__c != null){
                    prospect.Appointment_Quoted_Price__c = Appointment.Quoted_Amount__c;
                }else{
                    prospect.Appointment_Quoted_Price__c = 0.00;
                }
                ProspectsToUpdate.add(prospect);
            }
            if(ProspectsToUpdate.size() > 0){
                update ProspectsToUpdate;
            }
        }
    }
}