• Taruni
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 6
    Replies

Hi,

 

I want to call an apex method from outputilnk.

so, i tried using below code in VF page:

<apex:outputLink value="/{!p.Id}" onclick="CallApexMethod"> {!p.Name} </apex:outputLink>

 

 

<apex:actionFunction name="CallApexMethod" action="{!policy5}" onComplete="alert('After apex method') ;"/>

 

In class:

public PageReference policy5() {
       
        Update ListPolicy;
        return null;
    }

 

When I click on the output link , it should actually go to the record detail page.

So, with the above code when I click the link in the same browser Tab then it is working as expected like it is calling apex method and also redirecting to the record detail page.

 

but if I click on the link to open in new Tab, the above code is not working and its not executing my apex method.

 

IS there any other way to achieve the functionality i.e. both the ways (in the same tab as well in the new tab)?

 

 

  • November 21, 2013
  • Like
  • 0

Hi,


In a related list, I will have few questions generated.Based on the asswer provided to these questions either, I will add or delete certain dependent questions to the same related list.

This is done through trigger.

but my problem is that I am able to delete only single level
but I need to delete multiple levels as below:

eg: Q1-->yes
                 NO--->add Q2---->yes
                                                   NO----->add Q3

when I select Q1 asnwer as "no", question Q2 will be added then I will select Q2 answer as "No" then Q3 will be added but when i change the Q1 answer to "Yes" then I need to delete both Q2 and Q3 questions.

Basically, when parent question is deleted then i need to delete all the sub level questions.

any help will be appreciated.

  • October 23, 2013
  • Like
  • 0

Hi,

 

I want to capture Approval history comments in the master object field for reporting purpose.

 

Any help will be highly appreciated.

 

Thank you

  • October 09, 2013
  • Like
  • 0

Hi,

 

Is there a way to track the previous value of the Opportunity field even though field history tracking is not enabled for that field?

Eg: The Oppty field "Explanation" is having previous values as "XYZ" and if it is changed to "ABC".

Can we get the XYZ by any chance for this Oppty?

  • September 24, 2013
  • Like
  • 0

HI,

 

I need to create a dashboard component such that I wanted to display my Top 10 Oppty(this is decided using Close date in descending order) that are in WON stage and I need to display the Amount of each Oppty in the same Dashboard.

 

Please let me know if this is possible.

Any help will be much appreciated.

 

 

  • August 19, 2013
  • Like
  • 0

Hi,

 

we are planning to merge 2 or more profiles in our organization ,some permissions are enabled on only some profiles and some or not.

Could you please let me know the impact of merging profiles and what all are the things we need to consider or compare before hand.

Like Page layouts,FLS, Custom App settings,Tab settings,Record type settings,Admin permissions,general user premissions,Desktop integration clients,Login hours, Login IP ranges,Enabled Apex classes and VF pages.

 

Do we need to consider anything else other than the specified settings.

 

Thanks in advance.

Hi,

 

what would be the impact of removing the "Salesforce Chatter" app from Custom App Settings on the profiles.

 

Like if we remove "Sales" app from the profiles, users will not be able to see all the tabs except Chatter and Tasks Tab as Salesforce Touch supports only Sales app.

 

Please let me know the impact of removing the "Salesforce Chatter" app and why is it enabled by default on profiles.

 

Thanks.

HI,

 

For a custom object, I have enabled enhanced look up's.

In  Lookup Filter Fields (Search layouts).

I have added 2 fields which are dependent picklists.
On UI, the dependency is working as expected, i.e. Based on value selected in Field1, Field2 values are displayed.
Until Field1 is selected, Field2 cant be selected.

But this is not working as expected in lookup filter's.
All 2 fields are showing values directly without any dependency.

How to get dependency picklists to work in Enhanced Lookup filters.

Hi,

 

We have a Text field(Long Text Area(32768)) called "Comments On Opportunity", Users can edit this field.

When User1 gives some comments in this field and hits on save button, this entered Text should be kept in such a way that we can refer back to these comments in future.

 

I want to track the Comments, User who entered those comments and entered Date.

 

Is there a way  to save the data in this field for future reference (i.e. User1 types something, then later on someone else types something different).  We would like to somehow keep a record of the comments.

 

Hi,

 

I was trying to copy some of the List values to another List.

eg: If List1 ={'A','B','C'}

then I want to copy only List[0] and List[2] values to another list "List2".

please help me with the code.

 

Hi,

The issue is that I deployed a Trigger and Test class in Production from one of our sandbox.
In sandbox code coverage for that trigger is 62% (107/170) and the same in production is showing as only 42% (107/249).

Version in sandbox and prod is 20.0 for both the Trigger and Test class.
If you could observe there is a difference in the total number of lines in both the environments.
I have checked in production to know the difference so I found that its because in production its showing even commented lines and flower braces as not covered.

Any help will be much appreciated!

  • April 25, 2013
  • Like
  • 0

Hi,

 

We have a Batch class which is scheduled to run every day. This batch will update a specific user with role to a custom field on Oppty.

The problem is that we have a Validation rule on Oppty, because of which some Batches are failing.

I want to bypass this validation rule while the Batch job is running.

 

Is the below code snippet correct?

 

*************************************************************************************************************************************

 try{    
      update opp; //This is the Oppty which we are updating
      }
     
      Catch(Exception e)
      {
         string sErrMsg=e.getmessage();
       if(sErrMsg.contains('Opportunities can only be created for active Prospects/Customers.You are unable to create this opportunity because either your prospect has not been approved yet or Prospect/Customer record is inactive--which will require onboarding the Prospect/Customer.'))
           return;
      }

 

*************************************************************************************************************************************

will this piece of code bypass the validation rule and will this help the batches to run successfully?

  • April 16, 2013
  • Like
  • 0

Hi,

 

I want to call an apex method from outputilnk.

so, i tried using below code in VF page:

<apex:outputLink value="/{!p.Id}" onclick="CallApexMethod"> {!p.Name} </apex:outputLink>

 

 

<apex:actionFunction name="CallApexMethod" action="{!policy5}" onComplete="alert('After apex method') ;"/>

 

In class:

public PageReference policy5() {
       
        Update ListPolicy;
        return null;
    }

 

When I click on the output link , it should actually go to the record detail page.

So, with the above code when I click the link in the same browser Tab then it is working as expected like it is calling apex method and also redirecting to the record detail page.

 

but if I click on the link to open in new Tab, the above code is not working and its not executing my apex method.

 

IS there any other way to achieve the functionality i.e. both the ways (in the same tab as well in the new tab)?

 

 

  • November 21, 2013
  • Like
  • 0

Hi,

 

Is there a way to track the previous value of the Opportunity field even though field history tracking is not enabled for that field?

Eg: The Oppty field "Explanation" is having previous values as "XYZ" and if it is changed to "ABC".

Can we get the XYZ by any chance for this Oppty?

  • September 24, 2013
  • Like
  • 0

HI,

 

I need to create a dashboard component such that I wanted to display my Top 10 Oppty(this is decided using Close date in descending order) that are in WON stage and I need to display the Amount of each Oppty in the same Dashboard.

 

Please let me know if this is possible.

Any help will be much appreciated.

 

 

  • August 19, 2013
  • Like
  • 0

Hi,

 

We have a Text field(Long Text Area(32768)) called "Comments On Opportunity", Users can edit this field.

When User1 gives some comments in this field and hits on save button, this entered Text should be kept in such a way that we can refer back to these comments in future.

 

I want to track the Comments, User who entered those comments and entered Date.

 

Is there a way  to save the data in this field for future reference (i.e. User1 types something, then later on someone else types something different).  We would like to somehow keep a record of the comments.

 

Hi,

 

I was trying to copy some of the List values to another List.

eg: If List1 ={'A','B','C'}

then I want to copy only List[0] and List[2] values to another list "List2".

please help me with the code.