• rawiswar
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 40
    Replies

I'm trying to determine a User's access rights (read only, edit) to a Campaign object at runtime, from Apex, so I can selectively provide custom functionality.

 

I've looked into UserInfo.getProfileId(); but I really need the "Can Modify Current Campaign" or "Cannot Modify Current Campaign" answer if possible.

 

Thanks in advance for any help!!

 

I'm trying to finish up my testMethods on a Controller Extension I wrote for a Visualforce page.  The problem I'm running into is that the controller is involved in a lot of callouts.  There are a couple of Geocoding callouts to Google as well as 4 different callouts to our point of sale system.  Obviously testMethods don't allow callouts, but how can I get my coverage to 75% (currently at 48%) when so much of the code is tied up in callouts?  Suggestions?

Hi,

 

Is it possible to force group sections when a VF page is rendered as a PDF doc. So a a form do not get split between pages (example: Never have the signature block span 2 pages). 

 

I know it's possible to add page breaks in pdf but I don't want to explictly add page breaks and want to only add page breaks if the sections is going to be split bewteen 2 pages.

 

Please let me know if this is possible in VF or if I take advantage of any pdf functionality.

 

Thanks in advance.

 

Message Edited by Ash on 02-18-2009 10:35 AM
Certain threads go dead over time and remain unanswered. Say I come across another dead thread and find that this is the same thing I want resolved, would SF community moderators be willing to add the option for the user to REVIVE this thread and mark it the same. That way people visiting would know that they could help out this person. Just have a label by the side of the thread saying 'unanswered/ unresolved/ revived' and bring it once again to the front of the queue. I am not sure I see any drawbacks in adding this feature.

Is there anything at a higher level than StreamReader to parse XML in Apex? I might be able to get the current issue resolved but it would be great to have anything else also.

As an aside, would someone know when Spring '09  is being released (I will have no need for workarounds once the promised feature set is available).

Hi,

 

 I want to use the class member variable in the webservice method.

 

global class test123 { List<Opportunity> selopplist1 = new List<Opportunity>(); WebService static void getFromListPage(String[] IdList) { SelOppList1 = [select Name, Account.Name, Type from opportunity where id in :IdList]; } }

 Here I want to use selopplist1 in the webservice method, but I am getting an error like variable is not declared.

I tried by keeping global as well as webservice keyword before the declaration but still I am getting the same error.

Any help on this highly appreciated

 

 

I am in production version of salesforce
and I can not create class in salesforce.com, I have to use force.com IDE
How to Generate Apex class from WSDL in Force.com?
i now know for sure that Spring '09 will deprecate scontrols. i would like to know the reason (i know we can do all the work done with scontrols with VF - at least my reqs haven't gotten more complex than that) ... is there a security or performance threat of some sort?
Hi,

Just learning about what is possible with salesforce.com and had an initial question. Can we access and display (and subsequently choose via button to import the data into, e.g., salesforce contacts/leads) external MS SQL data via the salesforce UI, or via a custom "AppXchange" program?  Or would we need to replicate the existing MS SQL data in a Salesforce DB and access it that way? Thanks in advance and please let me know if unclear/need more info.

Dave
I see that this Forum is the best place to learn about salesforce (IMHO better than docs and premier support). My suggestion to further improve the platform would be for all experts here to give more details (even though its not what the query is about) about how the platform does what it does (whenever you have time)... for example one message I remember off the top of my head, told about how sControls are viewed by the platform --- I feel this is the best way to learn how to program on a closed-source environment.
not sure if anyone's been affected by this badly but I seem to notice that javascript and DOM have lots of problems when used within VF. is there something I am missing? IF anyone's interested I could give you some examples.
For external webservice callouts there is a read timeout of 10 seconds. Is there a way to change this timeout?
I am looking to access a database of my own outside of SF (I want to use an apex class so that I can display some information on a VF page). Can someone give me pointers as to where I should be looking for such information?
You've developed a VF page, but the richtext edit, while cool, needs more... I wish that SFDC would've given us a way to "sneak" a look at the HTML contents that form the construct of the message/text that we're editing. So you look behind the scenes with firebug or chrome, then you'll see that SFDC's WYSIWYG editor is just their slightly customized instance of the FCK editor.
 
 
 
The code block:
<apex:inputTextarea value="{!inputValue}" id="theTextarea" richText="true" />
  gets expanded behind the scenes into a few sections:
  1. a div that contains a hidden config value
  2. an iframe that contains the editor
  3. ...and javascript section that calls the necessary parameters when the page is loaded.
Hence, it is possible to embed a second call to the javascript that creates the FCK editor - merely doing this will result in two editors on the screen in Mozilla and IE (chrome won't display duplicate ID field objects...). That is a start, and with a little massaging, you can write a function to get rid of the existing iframe containing the old editor and replace it with the new editor that you're calling.
The steps to do this aren't too bad.
 
How to do it
  1. Create your visual force page as you see fit. It goes without saying that you should have a rich text block linked to some textarea field in your object.
  2. Once you've created your page, test it. Using Chrome or Firebug, find out the ids of the divs that get created when the page runs. From the above example, id="theTextarea", might get turned into:
    • The iFrame: "j_id0:j_id2:editBlock:j_id33:theTextarea___Frame"
    • The config block: "j_id0:j_id2:editBlock:j_id33:theTextarea___Config"
    • The textarea: "j_id0:j_id2:editBlock:j_id33:theTextarea"
      (Honestly, you're just interested in the prefix, the "j_id0:j_id2:editBlock:j_id33:" section - You can append the divId and "__Frame", etc...)
  3. Go back to your visualforce page and add this script block directly under the <apex:inputTextarea> code block.
    <script type="text/javascript">
     setTimeout("swap();",5000);
     function swap() {
      alert("Running function...");
     
      var origFrame = document.getElementById('j_id0:j_id2:editBlock:j_id33:theTextarea___Frame');
      alert("Removing iFrame");
      origFrame.parentNode.removeChild(origFrame);
    
      var configItem = document.getElementById('j_id0:j_id2:editBlock:j_id33:theTextarea___Config');
      alert("Removing config...");
      configItem.parentNode.removeChild(configItem);
    
      alert("Creating new editor...");
      var editor = new FCKeditor('j_id0:j_id2:editBlock:j_id33:theTextarea');
      editor.BasePath = '/apexpages/fckeditor/';
      editor.ReplaceTextarea();
     
      alert("Done...");
     }
    </script>
  4. Retest your page. The old editor should disappear and be replaced with the new one which includes all the fancy features of FCK.
How it works The swap() funtion gets called ~5 second after the page is loaded. While it isn't necessary to wait this long, it is necessary to wait until after the orgininal iFrame gets instantiated. (calling the function before it is there won't find anything...)
 
If you break it or mess it up bad, just remove the script block in your page - this isn't like Heretic's javascript injection which could really screw things up... Hopefully, they'll add the ability for folks to call custom parameters for FCK in the future, but this seems to work for now.
 
Hi,

Anyone know if the Dojo rich text editor for input textareas has been disabled? That's the one that shows up when you set the richtext attribute to true. It has stopped working in my Production server, but it is still working in my sandbox.

I noticed that in the developer server Firebug catches 2 errors, neither of which show up in my sandbox:

dojo.render is undefined

dojo.js line 492
var drh=dojo.render.html;


and

this.lookupInput is null
servletIntegration?lid=01N7[...]
this.lookupInput.onkeyup = AutoComplete.prototype.onKeyUp;


thanks,
-paul


Message Edited by ptepper on 09-10-2008 12:49 PM