• Akshata Shah
  • NEWBIE
  • 60 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 10
    Questions
  • 11
    Replies
Hello Admins,
Pleas help me to solve the above error.
Here is my formula field 
IF(  Net_Taxable_Salary__c  < 250000, 0,
   IF( Net_Taxable_Salary__c   > 500000, 12500,  
(  Net_Taxable_Salary__c  -  250000 ) *0.05 ) )

Regards,
Akshata Shah
Vf page
 
<apex:pageBlock rendered="{!(EmployeeOnLeave.size>0)}">
                        <apex:outputPanel id="EmployeeOnLeave">
                            <apex:pageBlockTable value="{!EmployeeOnLeave}" var="l" id="EmpOnLeave" title="Employee on Leave today">
                                <apex:column headerValue="Name" value="{!l.Resource__r.Name}" /> 
                                <apex:column headerValue="To Date" value="{!l.To_Date__c}" />
                                <apex:column headerValue="Type" value="{!l.Type__c}" />
                                <apex:column headerValue="Status" value="{!l.Decision__c}" />
                            </apex:pageBlockTable>
                        </apex:outputPanel>
                    </apex:pageBlock>

controller
 
public List<Leave__c> EmployeeOnLeave{set;get;}
public void  getEmployeeLeave(){
        
        date dt=date.today();
        system.debug(dt);
        List<Leave__c> AllLeaveList=new List<Leave__c>();
        
        AllLeaveList=[Select Resource__r.Name,From_Date__c,To_Date__c,Type__c,Decision__c From Leave__c where Decision__c=:'Approved'];
        
        system.debug(AllLeaveList);
        if(AllLeaveList.size()>0){
            for(Leave__c l:AllLeaveList){
                system.debug(l);
                if(dt>=l.From_Date__c && dt<=l.To_date__c){
                    EmployeeOnLeave.add(l);
                }
                system.debug(EmployeeOnLeave);
            }
        }
    }
Error is at  EmployeeOnLeave.add(l);
please help me
Regards,
Akshata​​
Hey Friends,
I am developing HR management system in which i need to take employee's daily attendance. how to do it in salesforce?
Please help me.

Thank you
Akshata shah
Hii Friends,
I want code for upsert records
I have oject Timesheet__c custom object.
Which has following filed.
Name
Month__c(Master_detail with Month__c object)
Resource__c(Lookup with Resource__c object)

i want code for if the Timesheet for that Month is already exist then update that records if not then create new record.
this is my code
Timesheet__c ts=new Timesheet__c();
                    ts.Month__c=new_records3.Id;
                    ts.Resource__c=currentRecord.Resource__c;
                    List<Timesheet__c> tlist=new List<Timesheet__c>();
                    tlist=[SELECT ID,Name,Month__r.Name,Resource__r.Name 
                           FROM Timesheet__c
                           WHERE Month__r.Name=: new_records3.Name AND Resource__r.Name=:currentRecord.Resource__r.Name];
                    if(tlist.size()>0){
                        for(Timesheet__c t:tlist){
                            update ts t.ID;
                        }
                        
                    }
                    else
                        insert ts;

Above not updating existing records.It creating new records.
Please help me as soon as possible. Its very urgent
Thanks in advance
Hello Friends,
I have custom button on custom object.
custom object calls VF page and controller.
How i can prevent second click on custom button using checkbox(true or false)
On second it should display error message like
"Cant click for second time".
Pleas help me!
Thank you
Akshata
Hii Friends,
I want code for to redirect window to another page after clicking custom button.
Help me PLzzz.
 
<apex:page standardController="Offers_Appraisals__c" extensions="NanoHRSheet" action="{!HRSalarySheet}">
    
</apex:page>
This is my VF page.
Thank you :)
 
Please help me to solve this!

Create a custom object called as 'Logs'. Create a long text area field called as 'Error'.
Create 100 Lead records using DML operations having a unique name. For all records which were not inserted into Lead object, insert a record in Log object along with the reason why a record was not inserted. Also, execute assignment rules to auto allocate Lead records to correct owner.

Thanks in advance.
I have object Assets in that number of records are stored.
In Assets object there is one custom picklist Assets_Belongs _to__c(Company, Personal)
I want to calculate total count on Assets Object for the records whoes Assets_Belongs _to__c =Company.
And that count want to display on Assets Object.
I have two custom object Resource__c and Leave__c. Leave__c has lookup with Resource__c.
In Resource there are two custom field Total_Allocated_Paid_Leaves__C and Total_Used_Paid_Leaves__c.
Where Leave__c object has one custom field Leaves__c.
I want trigger on
If i entered +ve value in Leaves__c (Leave__c's field) it will add in Total_Allocated_Paid_Leaves__C (Resouce__c's field)
and if i enterd -ve value in  Leaves__c (Leave__c's field) it will add in otal_Used_Paid_Leaves__c.
I have custom object Resource__c with custom field Total_Allocated_Paid_Leaves__c .I want to update this field with existing value + New value.
Please Help me!
 
Hello Admins,
Pleas help me to solve the above error.
Here is my formula field 
IF(  Net_Taxable_Salary__c  < 250000, 0,
   IF( Net_Taxable_Salary__c   > 500000, 12500,  
(  Net_Taxable_Salary__c  -  250000 ) *0.05 ) )

Regards,
Akshata Shah
Hey Friends,
I am developing HR management system in which i need to take employee's daily attendance. how to do it in salesforce?
Please help me.

Thank you
Akshata shah

<apex:page controller="List_Example_2">
    <apex:form>
    <apex:pageblock title="Student" id="fm"    >
        
         
            <apex:pageblockbuttons location="top">
                <apex:commandbutton value="Add" action="{!Addme}" reRender="fm"/>
                <apex:commandbutton value="Clear" action="{!Clearme}" reRender="fm"/>
            </apex:pageblockbuttons>
       
        
        
                    <apex:pageblocksection columns="1">
                        <apex:inputtext value="{!stud.LastName__c}"/>
                        <apex:inputtext value="{!stud.FirstName__c}"/>
                        <apex:inputtext value="{!stud.Phone__c}"/>
                        <apex:inputtext value="{!stud.City__c}"/>
                        <apex:inputtext value="{!stud.Email__c}"/>
                    </apex:pageblocksection>
        
                     <apex:pageblocksection columns="1" rendered="{!Student__c.size>0}">
                     <apex:pageblocktable value="{!Student__c}" var="a">
                         <apex:column value="{!a.LastName__c}"/>
                         <apex:column value="{!a.FirstName__c}"/>
                         <apex:column value="{!a.Phone__c}"/>
                         <apex:column value="{!a.City__c}"/>
                         <apex:column value="{!a.Email__c}"/>
                     </apex:pageblocktable>   
                     </apex:pageblocksection>
              
        </apex:pageblock>
    </apex:form>
</apex:page>
Hii Friends,
I want code for upsert records
I have oject Timesheet__c custom object.
Which has following filed.
Name
Month__c(Master_detail with Month__c object)
Resource__c(Lookup with Resource__c object)

i want code for if the Timesheet for that Month is already exist then update that records if not then create new record.
this is my code
Timesheet__c ts=new Timesheet__c();
                    ts.Month__c=new_records3.Id;
                    ts.Resource__c=currentRecord.Resource__c;
                    List<Timesheet__c> tlist=new List<Timesheet__c>();
                    tlist=[SELECT ID,Name,Month__r.Name,Resource__r.Name 
                           FROM Timesheet__c
                           WHERE Month__r.Name=: new_records3.Name AND Resource__r.Name=:currentRecord.Resource__r.Name];
                    if(tlist.size()>0){
                        for(Timesheet__c t:tlist){
                            update ts t.ID;
                        }
                        
                    }
                    else
                        insert ts;

Above not updating existing records.It creating new records.
Please help me as soon as possible. Its very urgent
Thanks in advance
Hello Friends,
I have custom button on custom object.
custom object calls VF page and controller.
How i can prevent second click on custom button using checkbox(true or false)
On second it should display error message like
"Cant click for second time".
Pleas help me!
Thank you
Akshata
Please help me to solve this!

Create a custom object called as 'Logs'. Create a long text area field called as 'Error'.
Create 100 Lead records using DML operations having a unique name. For all records which were not inserted into Lead object, insert a record in Log object along with the reason why a record was not inserted. Also, execute assignment rules to auto allocate Lead records to correct owner.

Thanks in advance.
I have two custom object Resource__c and Leave__c. Leave__c has lookup with Resource__c.
In Resource there are two custom field Total_Allocated_Paid_Leaves__C and Total_Used_Paid_Leaves__c.
Where Leave__c object has one custom field Leaves__c.
I want trigger on
If i entered +ve value in Leaves__c (Leave__c's field) it will add in Total_Allocated_Paid_Leaves__C (Resouce__c's field)
and if i enterd -ve value in  Leaves__c (Leave__c's field) it will add in otal_Used_Paid_Leaves__c.
I have custom object Resource__c with custom field Total_Allocated_Paid_Leaves__c .I want to update this field with existing value + New value.
Please Help me!
 
Can you give me the examples of Future method and  Asynchronous apex ?

Thanks in Advance