• Howard Weinstein
  • NEWBIE
  • 20 Points
  • Member since 2015
  • Managing Partner
  • FinServ Consulting LLC

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 2
    Replies
I am trying to figure out how this line got in my visualforce code. The issue is it is disabling the native spellchecker in my browser which I need it to work. I can't find it in any of my pages or my static resources so I am unclear on how it is getting into my VFpage. I can only see it when I view the page source in my browser

At the start of my pages I am adding these items in not sure if this is what is causing it

<apex:stylesheet value="{!$Resource.jqueryUI}" />
<apex:stylesheet value="{!$Resource.Reset}" />
<apex:stylesheet value="{!$Resource.Rms}" />
    
    <apex:includeScript value="{!$Resource.jquery}"/>  
   <apex:includeScript value="{!$Resource.Common}"/>    
   <apex:includeScript value="{!$Resource.jquerymigrate}"/>    
    <apex:includeScript value="{!$Resource.jquerymin}"/>
    
    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"/>
    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>  


var editor = CKEDITOR.replace('j_id0:j_id1:j_id46', { removePlugins : 'elementspath,maximize,image,tabletools,liststyle,contextmenu,resize', baseHref : protocolAndHost + '/EMReview/ckeditor/ckeditor-4.x/rel/', customConfig : '/EMReview/ckeditor/ckeditor-4.x/rel/sfdc-config.js', height : '200', bodyId : 'j_id0:j_id1:j_id46_rta_body', toolbar : 'Visualforce', sfdcLabels :{CkeMediaEmbed : { iframeMissing : 'Invalid &lt;iframe&gt; element. Please use valid code from the approved sites.', subtitle : 'Paste &amp;lt;iframe&amp;gt; code here:', description : 'Use &lt;iframe&gt; code from DailyMotion, Vimeo, and Youtube.', title : 'Embed Multimedia Content', exampleTitle : 'Example:', example : '\n \n &lt;iframe width=\&quot;560\&quot; height=\&quot;315\&quot; src=\&quot;https://www.youtube.com/embed/KcOm0TNvKBA\&quot; frameborder=\&quot;0\&quot; allowfullscreen&gt;&lt;/iframe&gt;\n \n '}, CkeImagePaste : { CkeImagePasteWarning : 'Pasting an image is not working properly with Firefox, please use [Copy Image location] instead.'}, CkeImageDialog : { infoTab_desc_info : 'Enter a description of the image for visually impaired users', uploadTab_desc : 'Description', defaultImageDescription : 'User-added image', uploadTab_file_info : 'Maximum size 1 MB. Only png, gif or jpeg', uploadTab_desc_info : 'Enter a description of the image for visually impaired users', imageUploadLimit_info : 'Max number of upload images exceeded', btn_insert_tooltip : 'Insert Image', httpUrlWarning : 'Are you sure you want to use an HTTP URL? Using HTTP image URLs may result in security warnings about insecure content. To avoid these warnings, use HTTPS image URLs instead.', title : 'Insert Image', error : 'Error:', uploadTab : 'Upload Image', wrongFileTypeError : 'You can insert only .gif .jpeg and .png files.', infoTab_url : 'URL', infoTab : 'Web Address', infoTab_url_info : 'Example: http://www.mysite.com/myimage.jpg', missingUrlError : 'You must enter a URL', uploadTab_file : 'Select Image', btn_update_tooltip : 'Update Image', infoTab_desc : 'Description', btn_insert : 'Insert', btn_update : 'Update', btn_upadte : 'Update', invalidUrlError : 'You can only use http:, https:, data:, //, /, or relative URL schemes.'}, sfdcSwitchToText : { sfdcSwitchToTextAlt : 'Use plain text'}}, contentsCss: ['/ckeditor/ckeditor-4.x/rel/contents.css', '/EMReview/sCSS/35.0/sprites/1444933246000/Theme3/default/base/CKEditor.css'], disableNativeSpellChecker : true,
 
I have a large form with many different entries that the user is able to make entries for. Each item has its own save button. See example below
input area
My issue is that I am using a table structure for my custom so that every category has the same fields and is differentiated by the field values
data sample
In my method I am filtering through to idenitfy the current period entry for the category and placing it in an inputtextarea
method
Then in my apex page I display the data
vf code page
I then have a Save function in the controller that should save the current info to update the record but I am having several issues:
1) the data is not getting updated to any record in the list
2) the current record is not differentiated by the different categories

I can't figure out how to let the controller receive the current inputtextarea the user is updating from the VFpage. If I was able to isolate that I think I could then pass that back to the controller so it knows what to update

 
I took from trailhead the simple example of taking the accounts object and showing the related contacts in a form.

I used two custom objects in my org

We have Employees (SFDC_Employee__c) and we have Reviews (SFDC_SkillsDev_Review__c)

All I am trying to do is have a form that brings up the employee with their related reviews

However I am getting an error each time I try to  reference the Id of the reviews in line 27 which is related to lines 22 to 35

Code Below
<apex:page standardController="SFDC_Employee__c">
    <apex:form>
    
    <apex:pageBlock title="Edit Employee">
        <apex:pageMessages/>

        <apex:pageBlockSection>
            <apex:inputField value="{! SFDC_Employee__c.Name }"/>    
            <apex:pageBlockSection columns="1">
    <apex:inputField value="{! SFDC_Employee__c.Name }"/>
    <apex:inputField value="{! SFDC_Employee__c.Job_Function__c }"/>        
    <apex:inputField value="{! SFDC_Employee__c.Start_Date__c }"/>        
    <apex:inputField value="{! SFDC_Employee__c.Email_Address__c }"/>
</apex:pageBlockSection>
        </apex:pageBlockSection>

        <apex:pageBlockButtons>
            <apex:commandButton action="{! save }" value="Save" />        
        </apex:pageBlockButtons>

    </apex:pageBlock>
        
        <apex:pageBlock title="Reviews">
    <apex:pageBlockTable value="{!SFDC_Employee__c.Reviews__c}" var="review">
        <apex:column>
            <apex:outputLink
                value="{! URLFOR($Action.SFDC_SkillsDev_Review__c.Edit, review.Id) }">
                Edit
            </apex:outputLink>
            &nbsp;
          
        </apex:column>
        <apex:column value="{!review.Name}"/>
        <apex:column value="{!review.Period_Review__c}"/>
        <apex:column value="{!review.Review_Type__c}"/>
    </apex:pageBlockTable>
</apex:pageBlock>
    
    </apex:form>
</apex:page>User-added image
I keep getting this error which does not seem right in the SOSL challenge
Challenge not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.TypeException: Invalid conversion from runtime type List

Here is my code
public class ContactAndLeadSearch {

     public static List<List<SObject>> searchContactsAndLeads (String InputName){
        
       list<list<sObject>> searchlist = [FIND :InputName IN NAME FIELDS
                   RETURNING Contact(ID,FirstName,LastName), Lead(ID,FirstName, LastName)];
        

   
        Lead[] searchLeads = (Lead[])searchlist[0];
        Contact[] searchContacts = (Contact[])searchlist[1];
      
}
}
I am trying to figure out how this line got in my visualforce code. The issue is it is disabling the native spellchecker in my browser which I need it to work. I can't find it in any of my pages or my static resources so I am unclear on how it is getting into my VFpage. I can only see it when I view the page source in my browser

At the start of my pages I am adding these items in not sure if this is what is causing it

<apex:stylesheet value="{!$Resource.jqueryUI}" />
<apex:stylesheet value="{!$Resource.Reset}" />
<apex:stylesheet value="{!$Resource.Rms}" />
    
    <apex:includeScript value="{!$Resource.jquery}"/>  
   <apex:includeScript value="{!$Resource.Common}"/>    
   <apex:includeScript value="{!$Resource.jquerymigrate}"/>    
    <apex:includeScript value="{!$Resource.jquerymin}"/>
    
    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"/>
    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.11.2/jquery-ui.js"></script>  


var editor = CKEDITOR.replace('j_id0:j_id1:j_id46', { removePlugins : 'elementspath,maximize,image,tabletools,liststyle,contextmenu,resize', baseHref : protocolAndHost + '/EMReview/ckeditor/ckeditor-4.x/rel/', customConfig : '/EMReview/ckeditor/ckeditor-4.x/rel/sfdc-config.js', height : '200', bodyId : 'j_id0:j_id1:j_id46_rta_body', toolbar : 'Visualforce', sfdcLabels :{CkeMediaEmbed : { iframeMissing : 'Invalid &lt;iframe&gt; element. Please use valid code from the approved sites.', subtitle : 'Paste &amp;lt;iframe&amp;gt; code here:', description : 'Use &lt;iframe&gt; code from DailyMotion, Vimeo, and Youtube.', title : 'Embed Multimedia Content', exampleTitle : 'Example:', example : '\n \n &lt;iframe width=\&quot;560\&quot; height=\&quot;315\&quot; src=\&quot;https://www.youtube.com/embed/KcOm0TNvKBA\&quot; frameborder=\&quot;0\&quot; allowfullscreen&gt;&lt;/iframe&gt;\n \n '}, CkeImagePaste : { CkeImagePasteWarning : 'Pasting an image is not working properly with Firefox, please use [Copy Image location] instead.'}, CkeImageDialog : { infoTab_desc_info : 'Enter a description of the image for visually impaired users', uploadTab_desc : 'Description', defaultImageDescription : 'User-added image', uploadTab_file_info : 'Maximum size 1 MB. Only png, gif or jpeg', uploadTab_desc_info : 'Enter a description of the image for visually impaired users', imageUploadLimit_info : 'Max number of upload images exceeded', btn_insert_tooltip : 'Insert Image', httpUrlWarning : 'Are you sure you want to use an HTTP URL? Using HTTP image URLs may result in security warnings about insecure content. To avoid these warnings, use HTTPS image URLs instead.', title : 'Insert Image', error : 'Error:', uploadTab : 'Upload Image', wrongFileTypeError : 'You can insert only .gif .jpeg and .png files.', infoTab_url : 'URL', infoTab : 'Web Address', infoTab_url_info : 'Example: http://www.mysite.com/myimage.jpg', missingUrlError : 'You must enter a URL', uploadTab_file : 'Select Image', btn_update_tooltip : 'Update Image', infoTab_desc : 'Description', btn_insert : 'Insert', btn_update : 'Update', btn_upadte : 'Update', invalidUrlError : 'You can only use http:, https:, data:, //, /, or relative URL schemes.'}, sfdcSwitchToText : { sfdcSwitchToTextAlt : 'Use plain text'}}, contentsCss: ['/ckeditor/ckeditor-4.x/rel/contents.css', '/EMReview/sCSS/35.0/sprites/1444933246000/Theme3/default/base/CKEditor.css'], disableNativeSpellChecker : true,
 
I have a large form with many different entries that the user is able to make entries for. Each item has its own save button. See example below
input area
My issue is that I am using a table structure for my custom so that every category has the same fields and is differentiated by the field values
data sample
In my method I am filtering through to idenitfy the current period entry for the category and placing it in an inputtextarea
method
Then in my apex page I display the data
vf code page
I then have a Save function in the controller that should save the current info to update the record but I am having several issues:
1) the data is not getting updated to any record in the list
2) the current record is not differentiated by the different categories

I can't figure out how to let the controller receive the current inputtextarea the user is updating from the VFpage. If I was able to isolate that I think I could then pass that back to the controller so it knows what to update