• iffu
  • NEWBIE
  • 40 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 29
    Replies

Hi Guys,

 

I am using !actionRemote class from javascript and for this reason, I was getting "Insufficient Priviliges" on the relevant VF Page and I upgraded API version of the pages from 20.0 to 23.0 and it worked fine (irrelevant err message but version upgrade make sense here).

 

It was working fine until Friday and now the problem is, after the weekend the Production Environment gives me this error with 23.0 version but works fine in 20.0 version and the sandbox environments are giving me the error with 20.0 version but works fine in 23.0 version. I doubt this is due to the last upgrade of Salesforce during weekend, Has anyone every come across the same error.

 

Any reply would highly be appreciated!

 

  • November 22, 2011
  • Like
  • 0

Hi All,

 

I am just confused with this formula error in Rule Critirea of Workflow.The formula is;

 

IF(CONTAINS(Project__r.Project_Region__c, TEXT(Country__r.Region__c)), false, true) it throws an error saying;

 

Error: Incorrect parameter for TEXT. Expected Number, Date, DateTime, received Picklist

 

But when I am using TEXT() function for the picklist field in Add Field Update formula section - TEXT(Country__r.Region__c)) it works!

 

Any thoughts?

Thanks in advance!

  • November 03, 2011
  • Like
  • 0

Hi,


We are trying to use apex:inputField to edit the field body of Standard Object "Question" in a visualforcepage.

Our problem is that the editor which renders with apex:inputField is visible when we look at the visualforce page inside SFDC.

But, it doesn't render when we call this page inside Salesforce site.

We need apex:inputField since we want to give user the ability to upload image while editing the post.

We have given permissions to all fields. 

Can you please help us with this?

  • July 31, 2012
  • Like
  • 0

hi,

i need to store the ratings given for a partiuclar image.

but im not getting the out put.

i have reference the code from http://blog.tquila.com/2012/03/13/recipe-to-add-ajax-dynamic-ratings-in-salesforce-using-jquery/#comment-255.

please help me.

 

apex class:

public with sharing class Rating {
   
 
  public Rating(ApexPages.StandardController controller) {
  Complete_Rating__c co = (Complete_Rating__c)controller.getRecord();
   System.debug('adadaad'+cr_id);
   cr_id = co.id;
  }
   
 
  public string cr_id = ApexPages.currentPage().getParameters().get('Id');
 
  private integer current_rating;
  private Rating__c ratingObj = new Rating__c();
  private integer stored_val;
 
   
  public integer storedVal{
  get{
  try {
  Complete_Rating__c crObj = [SELECT Average_Ratings__c FROM Complete_Rating__c WHERE Id = : cr_id];
 
  stored_val = Integer.valueOf(crObj.Average_Ratings__c);
  }catch(QueryException e) {
  stored_val = 0;
  }
  if(stored_val == null)
  stored_val = 0;
   
  return stored_val;
 }
  }
   
 
  public integer currentRating{
  get {
  if (current_rating == null) {
  try {
  ratingObj = [SELECT Scale__c, Rated_By__c FROM Rating__c WHERE Complete_Rating__c = : cr_id AND Rated_By__c = :UserInfo.getUserId()];
  current_rating = Integer.valueOf(ratingObj.Scale__c);
  }catch(QueryException qe){
  current_rating = 0;
  ratingObj.Rated_By__c = UserInfo.getUserId();
  ratingObj.Complete_Rating__c = cr_id;
  }
  }
  return current_rating;
  }
  set {
  current_rating = value;
  }
  }
 
   
  public void submit() {
  ratingObj.Scale__c = currentRating;
  upsert ratingObj;
  }
  }

 

vf page:

<apex:page standardController="Complete_Rating__c" extensions="Rating" >
  <apex:form >
  <apex:outputPanel id="mainPanel">
      <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
      <script>
      jQuery(document).ready(function($) {
          var storedValue = {!storedVal};
          setThumbs(storedValue); // load the average rating first.
   
          // When clicked, get the position of the thumb and submit it accordingly
          $(".thumb").click(function() {
              var rating = $(this).attr('rating');
              submitRating(rating);
          });
          // Hovering function to show colored and black&white thumbs depending on the cursor position.
          $(".thumb").hover(
              function() {
                  var rating = $(this).attr('rating');
                  setThumbs(rating);
              },
              function() {
                  var storedValue = {!currentRating};
                  setThumbs(storedValue);
              });
      });
   
      function setThumbs(rating){
          turnOnThumbs(rating);
          turnOffThumbs(rating);
      }
   
      function turnOnThumbs(rating){
          for(i=1; i<=rating; i++){
              var thumbId = '#thumb' + i;
             $(thumbId).attr('src', '{!$Resource.Likes_Thumb}');
          }
      }
      function turnOffThumbs(rating){
          for(j=5; j>rating; j--){
              var thumbId = '#thumb' + j;
              $(thumbId).attr('src', '{!$Resource.Dislike_Thumb}');
          }
      }
   
      </script>
      <div align="left">
      <img src="{!$Resource.Likes_Thumb}" width="25" height="25" id="thumb1" rating="1"/>
      <img src="{!$Resource.Likes_Thumb}" width="25" height="25" id="thumb2" rating="2"/>
      <img src="{!$Resource.Likes_Thumb}" width="25" height="25" id="thumb3" rating="3"/>
      <img src="{!$Resource.Likes_Thumb}" width="25" height="25" id="thumb4" rating="4"/>
      <img src="{!$Resource.Likes_Thumb}" width="25" height="25" id="thumb5" rating="5"/>
       </div>
   </apex:outputPanel>
   
   <apex:actionFunction name="submitRating" action="{!submit}" reRender="mainPanel">
       <apex:param name="firstParam" assignTo="{!currentRating}" value=""/>
   </apex:actionFunction>
   
  </apex:form>
  </apex:page>

  • May 31, 2012
  • Like
  • 0

Hi Guys,

 

I am using !actionRemote class from javascript and for this reason, I was getting "Insufficient Priviliges" on the relevant VF Page and I upgraded API version of the pages from 20.0 to 23.0 and it worked fine (irrelevant err message but version upgrade make sense here).

 

It was working fine until Friday and now the problem is, after the weekend the Production Environment gives me this error with 23.0 version but works fine in 20.0 version and the sandbox environments are giving me the error with 20.0 version but works fine in 23.0 version. I doubt this is due to the last upgrade of Salesforce during weekend, Has anyone every come across the same error.

 

Any reply would highly be appreciated!

 

  • November 22, 2011
  • Like
  • 0

Hi All,

 

I am just confused with this formula error in Rule Critirea of Workflow.The formula is;

 

IF(CONTAINS(Project__r.Project_Region__c, TEXT(Country__r.Region__c)), false, true) it throws an error saying;

 

Error: Incorrect parameter for TEXT. Expected Number, Date, DateTime, received Picklist

 

But when I am using TEXT() function for the picklist field in Add Field Update formula section - TEXT(Country__r.Region__c)) it works!

 

Any thoughts?

Thanks in advance!

  • November 03, 2011
  • Like
  • 0

Hi,

I have a list of objects which are in String format.

List<String> obj=new List<String>();

in "obj" list i have E__c, F__c and some more object names.

sObject  objData=new E__c();

But here, in the place of E__c i need to change the object names dynamically based on list values(I need to convert List<String> type to sObject type dynamically ).

How can it possible.

please suggest me.

 

Regards:

Ramya.

 

Hi Friends,

I have created one approval process and in Final Approval Actions there are three email alerts.

How to control the order of execution.

I have tried by removed all the email alerts and add them in alphabetical order based on Email Alert Name but there is no use.

 

Please post any ideas.

 

Thanks,

Indy

 

 

  • February 03, 2011
  • Like
  • 0

HI All,

 

I have stored contact field API name in other object as text.Now i am retriving that field name and need to convert as field token.

 

For eg:

list<CampSetup__c> allCampmember= [select id,ContactDate_ApiName__c,Name from CampSetup__c];
                 map<String,String> mapallcamp = new map<String,String>();


//map defines campaign name as key and contact date field Api name as value        

        if(!allCampmember.isEmpty())
             {
                  for(CampSetup__c cc :allCampmember)
                  {
                      mapallcamp.put(cc.Name,cc.ContactDate_ApiName__c);
                  }
            }

 

now i have all the field name values in my map

Campaign  camp = [select id,name from CampaignMember where id ='abdcksf'];

CampaignMember con = [select id,name,Contact.abcd__c from CampaignMember where id ='abdcksf'];

when i try try to access

Date dd =con.Contact.(mapallcamp.get(camp.name)) //which gives an error as the map value is a string not field token

 

Please let me konw how to get the fieldtoken.

 

 

 

  • July 14, 2010
  • Like
  • 0

I have created a page in my own developer instance where I have the sys admin access and when I am trying to access the page...I am getting the followng error

 

 

Insufficient Privileges


You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary.

 

 

I have checked the profile and can see that I have access to the page and corresponding class as well; yet I am having the problem..

 

Any solution to this will be highly appreciable!!!

Hi,

I have to export data from the .csv file( in a shared folder) to the corresponding fields in my Salesforce account using Apex code.

Kindly advice me how to achieve this...
Also share if some sample codes are available.


Thanks in Advance
Ambily

  • April 21, 2010
  • Like
  • 0

Can we get a proper log without any limitations? I have a batch that works fine when the record count is low but fails at high counts. In the latter case I cannot see what the error was because the debug log cuts off somewhere in the middle. Up until now I have been dealing with this just by making guesses and trial and error changes but I really don't think I should be doing that!! :)

 

Is it possible to see what the error was? Thanks.

  • December 16, 2009
  • Like
  • 1

Hi:

   My users can not see the VF page, they keep getting the following error:

 

Insufficient Privileges

You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary. 

 

What should I do?

Using VF, I have modified some of my related lists to display additional columns of information (from objects not available in the "stock" lists). Beyond that I want these re-created lists to look and feel the same as the "stock" ones. And they do, with just one exception: there is no confirmation that pops up when the Del link is clicked.
 
Code:
<apex:outputLink value="/setup/own/deleteredirect.jsp">Del
     <apex:param name="Id" value="{!priority.ID_3__c}"/>
     <apex:param name="delID" value="{!priority.ID_1__c}"/>
     <apex:param name="retURL" value="/{!priority.ID_3__c}"/>
</apex:outputLink>

As you can see the link has the same URL as the stock link and the params provide the needed information from the controller extension. What do I need to do to get the confirmation pop-up? The users are paranoid about accidentally deleting something.
 
Thanks,
 
Mauricio
  • April 24, 2008
  • Like
  • 0