• Aditya Pavan lakshmi
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 8
    Replies
Hi friends, I have used 100 percentage of apex class,still there are few more classes to write.so how can i overcome this issues and help me on this.Asmy org is full.
User-added image
Thanks & Regards 
Pavan
Hi all,

I want to display all the case attachments related to the case ,while passing the caseId in the URL ,I am facing some difficulties in that.Any Help would be greatly appriciated.

Thanks
I am getting the error of return type must be of datetime.

public Datetime getcreatedDate( Datetime createdDate ) {
        if( createdDate != null ) {
            String timeVal = ' ';
            Decimal dateVal;
            dateVal=Math.Floor(Decimal.valueOf((Datetime.now().getTime()-createdDate.getTime() ))/(1000));//In Second
            if( dateVal >= 60 ) {
                dateVal=Math.Floor(dateVal/60); //In Minutes
                timeVal = timeValue(dateVal,' minutes ',' minute ');
                if(dateVal>=60 ){
                    dateVal=Math.Floor(dateVal/60); //In Hours
                    timeVal = timeValue(dateVal,' hours ',' hour ');
                    if(dateVal>=24){
                        dateVal= Math.Floor(dateVal/24); //In Days
                        timeVal = timeValue(dateVal,' days ',' day ');
                        system.debug( timeVal );
                        system.debug( dateVal );
                        if(dateVal >= 30){
                            dateVal = Math.Floor(dateVal/30);
                            timeVal = timeValue(dateVal,' months ',' month ');
                            system.debug( timeVal );
                            system.debug( dateVal );
                            if(dateVal >= 365){
                                dateVal = Math.Floor(dateVal/365);
                                timeVal = timeValue(dateVal,' years ',' year ');
                                system.debug( timeVal );
                                system.debug( dateVal );
                            }
                        }
                    }
                }
            }
            else {
                if(dateVal>1) {
                    timeVal = dateVal +' Seconds ago ';
                }
                else {
                   timeVal = dateVal +' Second ago ';
                }
            }
            return timeVal;
        }
        return null;
    }
 
 public String timeValue( Decimal dtValue,String plural,String singular ) {
    String timeStr = '';
    timeStr = String.valueOf(dtValue)+ (dtValue>1 ? plural : singular )+'ago';
    return timeStr;
 }

HI all,

Requirement :

Imagine if there is a form,it consists of 3 pages.The user was trying to fill the form,After filling two pages,he wants to fill that form later from where he stops.
As per the team suggestion we are about to go with IndexedDB.Any Suggestion or Any Example or similar kind of Scenario.

Any Suggestion would be greatly Appriciated.

Also,What is the diiference b/w Cookies and IndexedDB

Hi,

I am getting the error in the production,please help me how to figure out the issue in the sandbox.

Please Check the below screen shot and Kindly help me

Thanks &Regards,
Pavan VempatiError in Production trying to replicate in sandbox
Hi All,

I want to ristrict the user on creating a Lead?How can I achieve this ?

The scenario will be like this a user can create only 15 leads.after that an error message will display that you reached the max level.
Hi friends, I have used 100 percentage of apex class,still there are few more classes to write.so how can i overcome this issues and help me on this.Asmy org is full.
User-added image
Thanks & Regards 
Pavan
I am getting the error of return type must be of datetime.

public Datetime getcreatedDate( Datetime createdDate ) {
        if( createdDate != null ) {
            String timeVal = ' ';
            Decimal dateVal;
            dateVal=Math.Floor(Decimal.valueOf((Datetime.now().getTime()-createdDate.getTime() ))/(1000));//In Second
            if( dateVal >= 60 ) {
                dateVal=Math.Floor(dateVal/60); //In Minutes
                timeVal = timeValue(dateVal,' minutes ',' minute ');
                if(dateVal>=60 ){
                    dateVal=Math.Floor(dateVal/60); //In Hours
                    timeVal = timeValue(dateVal,' hours ',' hour ');
                    if(dateVal>=24){
                        dateVal= Math.Floor(dateVal/24); //In Days
                        timeVal = timeValue(dateVal,' days ',' day ');
                        system.debug( timeVal );
                        system.debug( dateVal );
                        if(dateVal >= 30){
                            dateVal = Math.Floor(dateVal/30);
                            timeVal = timeValue(dateVal,' months ',' month ');
                            system.debug( timeVal );
                            system.debug( dateVal );
                            if(dateVal >= 365){
                                dateVal = Math.Floor(dateVal/365);
                                timeVal = timeValue(dateVal,' years ',' year ');
                                system.debug( timeVal );
                                system.debug( dateVal );
                            }
                        }
                    }
                }
            }
            else {
                if(dateVal>1) {
                    timeVal = dateVal +' Seconds ago ';
                }
                else {
                   timeVal = dateVal +' Second ago ';
                }
            }
            return timeVal;
        }
        return null;
    }
 
 public String timeValue( Decimal dtValue,String plural,String singular ) {
    String timeStr = '';
    timeStr = String.valueOf(dtValue)+ (dtValue>1 ? plural : singular )+'ago';
    return timeStr;
 }
Hi,

I am getting the error in the production,please help me how to figure out the issue in the sandbox.

Please Check the below screen shot and Kindly help me

Thanks &Regards,
Pavan VempatiError in Production trying to replicate in sandbox