• t.deepthi05
  • NEWBIE
  • 55 Points
  • Member since 2012

  • Chatter
    Feed
  • 2
    Best Answers
  • 2
    Likes Received
  • 0
    Likes Given
  • 38
    Questions
  • 53
    Replies
I have developing apex class that will send an email with site URL, it's hard coded it's working our org, when I deploy the apex class in another org, It's sending the same URL as it's hard coded.

I need to send the URL dynamically depends on where it's installed.
I am displaying radio button is visualforce page.I have a requirement where when i click a radio button value it has populate it child radio buttons under it. i.e in the following way

-->fruits
     ==Apple
     ==Mango
     ==orange
-->Vegetables
     ==potato
     ==tomato

So from the above example initially it has to display fruits and vegetables when i click on fruits(Apple,Mango,Orange) have to display and when vegetable is selected (Potato,tomato) have to be displayed
I want send a reminder to a contact owner for birthday reminder based on the birthday field in the contact object. If the birthday falls on week day notification has to be sent on the same day else if on Saturday one day before and else if on Sunday two days before can i know how to achieve the above logic?

 
I creating an event in salesforce and sending the activity date and time from the UI.

It saving the same time in sandbox.I moved the same to production is showing a time difference of -7 hrs

My time zone for both production and sandbox is the same i.e:(GMT-07:00) Pacific Daylight Time (America/Los_Angeles)

but when i query the activity date and time it is showing the current time.

But in the UI it is displaying the wrong time.
I am deploying my code to production and i am getting the below error

My trigger

trigger OpportunityTrigger on Opportunity (after delete, after insert, after undelete,
after update, before delete, before insert, before update) {

    if(Trigger.isAfter && Trigger.isInsert){
        {
        EncryptURl.insertOpp(Trigger.new,Trigger.newMap.keySet());
        }
}

and my trigger class is

public static void insertOpp(Opportunity[] o,Set<id> newMapKeySet)
{

    list<Opportunity> oppsToUpdate =[select id,Encrypted_URL__c from Opportunity where id  IN :newMapKeySet];
    for(Opportunity op:oppsToUpdate){
        if(op.id != null){
            string oppid=op.id;
            Blob dataLead = Blob.valueOf(oppid);
            String b64Data = EncodingUtil.base64Encode(dataLead);
            string oppURL =Label.PWV_FavoriteURL+'oId='+b64Data;
            op.Encrypted_URL__c =oppURL;
        }  
   }
    try{
    update oppsToUpdate;
    }catch(exception e){
            system.debug('DMl exception'+e);
     }

}

can i know how to over the soql exception

I am showing up the error for some records

Encryption

string lid=l[0].id+'';
String key1 = Label.PWV_CryptoKey;
Blob Key = Blob.valueOf(key1);
Blob data = Blob.valueOf(lid);
Blob encryptedData = Crypto.encryptWithManagedIV('AES128', key, data);
String b64Data = EncodingUtil.base64Encode(encryptedData);
string leaURL =Label.PWV_FavoriteURL+'lid='+b64Data;
l[0].Encrypted_URL__c =leaURL;
Decryption:

String key1 = Label.PWV_CryptoKey;
Blob Key = Blob.valueOf(key1);
oid=ApexPages.currentPage().getParameters().get('oId');
Blob data = EncodingUtil.base64Decode(oid);
Blob decryptedData = Crypto.decryptWithManagedIV('AES128', key, data);
String decryptedDataString = decryptedData.toString();

I am using remote action for displaying records on the visual force page.My remote action method is inside repeat tag when i rerender my repeat my remote action is not functioning.

I am getting the following error."No remoted actions found to resolve"

Can i know how to rerender the panel with repeat tag and i cannot write remote action outside repeat panel.

Hi,

I am encryptying my lead and opportunity id.

System.InvalidParameterValueException: Invalid initialization vector. Must be 16 bytes.

It is working for some records it is showing up the above error for some records

   Encryption

    string lid=l[0].id+'';
    String key1 = Label.PWV_CryptoKey;
    Blob Key = Blob.valueOf(key1);
    Blob data = Blob.valueOf(lid);
    Blob encryptedData = Crypto.encryptWithManagedIV('AES128', key, data);
    String b64Data = EncodingUtil.base64Encode(encryptedData);
    string leaURL =Label.PWV_FavoriteURL+'lid='+b64Data;
    l[0].Encrypted_URL__c =leaURL;
=========================================================

Decryption:

String key1 = Label.PWV_CryptoKey;
Blob Key = Blob.valueOf(key1);
oid=ApexPages.currentPage().getParameters().get('oId');
Blob data = EncodingUtil.base64Decode(oid);
Blob decryptedData = Crypto.decryptWithManagedIV('AES128', key, data);
String decryptedDataString = decryptedData.toString();
 


Hi,

I am deploying my package into production and i am getting the follwoing error.

Failure Message: "line -1, column -1: Previous load of class failed: ***********_test", Failure Stack Trace: "null"

Can i know why i am getting the follwoing error when i running the test classes it is working fine.
Hi,

I have list of records displaying with repeat tag in visualforce page.I want intially to show 5 records and then on button click i want display next 5 records along with the current records in the same  page until i have records in the list.

I have https callouts so i want to implemt the above functionality using java script

how to set the repeat size value to 5 intially and incerment it further using javascript


Hi ,

I want to display mutiple records on page using pagination.

i want create a next button and on clicking of this button the want display next set of records along with the current records.

Is there any way that I can append the newly fetched records with previous records?

Can i have sample code for the above requirement
Hi All,

I want to display all the records in single page 

i.e intial when the  Page  load five records have to display and when i click on next button it has load next 5 records with the inital 5 records 
i.e. a total of 10 records 

Can i have any work around for the above requirement.

Using custom controller or javascript

Hi All,

I want to display mutiple records on page using pagination.

i want create a next button and on clicking of this button the want display next set of records along with the current records.

Is there any way that I can append the newly fetched records with previous records?


Hi,

I am updating my task activity date in lead using a trigger when ever i am creating a new task record on the lead object

but the activity date is wrongly updated in the lead

can i know why and here is my code

if(!leadIds.isEmpty())
        {
             leadsToUpdate = new list<Lead>([Select Id, Name, Activity_Date__c, (Select Id, ActivityDate From Tasks limit 100) From Lead Where Id in : leadIds limit 1]);
        }
        if(!leadsToUpdate.isEmpty()){
            for(Lead l: leadsToUpdate)
            {
                for(Task t : l.Tasks)
                {
                    if (t.ActivityDate > Date.today())
                    {
                     system.debug('t.ActivityDate'+t.ActivityDate);
                        l.Activity_Date__c = t.ActivityDate;
                    }
                }
            }
        update leadsToUpdate;
        }
Hi All,

I am using standard set controller and displaying records using pagination

when i clicking on next,or pervious it is displaying the same records in all the pages.

can i know why its is happening.
Hi 

I am using standard set contoller for pagination and i am facing the follwing error when i clicking on the next button 

Can i have solution how to resolve this error

Modified rows exist in the records collection!
Error is in expression '{!next}' in page
Hi,

I am using apex tab panel but switching between tabs is not happening 

I even tried the below code in my page to test  even this is not working

<apex:tabPanel switchType="client" selectedTab="name2" id="theTabPanel">
        <apex:tab label="One" name="name1" id="tabOnes">content for tab one</apex:tab>
        <apex:tab label="Two" name="name2" id="tabTwos">content for tab two</apex:tab>
    </apex:tabPanel>

Added the below javascript :

<script type="text/javascript" language="javascript">
    if(jQuery) {
        jQuery.noConflict();
    }
</script>
still the switching is not happening .

Can i know exactly where the problem is.



Hi All,

I am using StandardSetController.

public ApexPages.StandardSetController con { get; set; }

public ApexPages.StandardSetController refresh(){

if (con==null)
Con = new ApexPages.StandardSetController(Database.getQueryLocator(
                    [SELECT Name v]));

}
return con;
}
public list<wraplist> wrap(){

List<V> vList = new List<V>();
 vList = (List<V>)con.getRecords();
system.debug(con.getResultSize()); // returns for size 4 
system.debug(vList.Size()); // returns 1

}

can i know why all the values are not added to the list
Hi 

How can we convert Inbound Html emails recivecied through email services into readble format?

now i am adding them as notes and adding to the respective record in which i am unable read the attached email.

can convert it into html or pdf format and add it to the respective record.

Hi,

 

I want to implement back button functionality using command link I am able to redirect to my desired page but  i want pervious page  filter data selected along with redirecting.

 

Hi,

 

I have a list of values to be passed to the controller on buttonclick.I used Param tag but i am getting only one value to the controller where the list contains two values.

 

how to pass list of values to the controller using paramtag or by other means.

 

Regards,

Deepthi.T

Hi,

I have list of records displaying with repeat tag in visualforce page.I want intially to show 5 records and then on button click i want display next 5 records along with the current records in the same  page until i have records in the list.

I have https callouts so i want to implemt the above functionality using java script

how to set the repeat size value to 5 intially and incerment it further using javascript


Hi All,

I am using standard set controller and displaying records using pagination

when i clicking on next,or pervious it is displaying the same records in all the pages.

can i know why its is happening.
I am deploying my code to production and i am getting the below error

My trigger

trigger OpportunityTrigger on Opportunity (after delete, after insert, after undelete,
after update, before delete, before insert, before update) {

    if(Trigger.isAfter && Trigger.isInsert){
        {
        EncryptURl.insertOpp(Trigger.new,Trigger.newMap.keySet());
        }
}

and my trigger class is

public static void insertOpp(Opportunity[] o,Set<id> newMapKeySet)
{

    list<Opportunity> oppsToUpdate =[select id,Encrypted_URL__c from Opportunity where id  IN :newMapKeySet];
    for(Opportunity op:oppsToUpdate){
        if(op.id != null){
            string oppid=op.id;
            Blob dataLead = Blob.valueOf(oppid);
            String b64Data = EncodingUtil.base64Encode(dataLead);
            string oppURL =Label.PWV_FavoriteURL+'oId='+b64Data;
            op.Encrypted_URL__c =oppURL;
        }  
   }
    try{
    update oppsToUpdate;
    }catch(exception e){
            system.debug('DMl exception'+e);
     }

}

can i know how to over the soql exception

I am using remote action for displaying records on the visual force page.My remote action method is inside repeat tag when i rerender my repeat my remote action is not functioning.

I am getting the following error."No remoted actions found to resolve"

Can i know how to rerender the panel with repeat tag and i cannot write remote action outside repeat panel.


Hi,

I am deploying my package into production and i am getting the follwoing error.

Failure Message: "line -1, column -1: Previous load of class failed: ***********_test", Failure Stack Trace: "null"

Can i know why i am getting the follwoing error when i running the test classes it is working fine.
Hi,

I have list of records displaying with repeat tag in visualforce page.I want intially to show 5 records and then on button click i want display next 5 records along with the current records in the same  page until i have records in the list.

I have https callouts so i want to implemt the above functionality using java script

how to set the repeat size value to 5 intially and incerment it further using javascript


Hi All,

I want to display all the records in single page 

i.e intial when the  Page  load five records have to display and when i click on next button it has load next 5 records with the inital 5 records 
i.e. a total of 10 records 

Can i have any work around for the above requirement.

Using custom controller or javascript

Hi All,

I want to display mutiple records on page using pagination.

i want create a next button and on clicking of this button the want display next set of records along with the current records.

Is there any way that I can append the newly fetched records with previous records?


Hi,

I am updating my task activity date in lead using a trigger when ever i am creating a new task record on the lead object

but the activity date is wrongly updated in the lead

can i know why and here is my code

if(!leadIds.isEmpty())
        {
             leadsToUpdate = new list<Lead>([Select Id, Name, Activity_Date__c, (Select Id, ActivityDate From Tasks limit 100) From Lead Where Id in : leadIds limit 1]);
        }
        if(!leadsToUpdate.isEmpty()){
            for(Lead l: leadsToUpdate)
            {
                for(Task t : l.Tasks)
                {
                    if (t.ActivityDate > Date.today())
                    {
                     system.debug('t.ActivityDate'+t.ActivityDate);
                        l.Activity_Date__c = t.ActivityDate;
                    }
                }
            }
        update leadsToUpdate;
        }
I have developing apex class that will send an email with site URL, it's hard coded it's working our org, when I deploy the apex class in another org, It's sending the same URL as it's hard coded.

I need to send the URL dynamically depends on where it's installed.