• Rudi_Hulsbos
  • NEWBIE
  • 50 Points
  • Member since 2010

  • Chatter
    Feed
  • 2
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 3
    Replies
Hi,

I am trying to display a map with map values in a visualforce page but keep getting Map key null not found in map error:

Controller:

public MAP<Quote,LIST<QuoteLineItem>> getQuotes(){
        quotelistmap = new MAP<Quote,LIST<QuoteLineItem>>();
         for(Quote getquotes : [SELECT Id, Name, Product__c, Product_Category__c, Total_Price_Incl__c,
                                                 (SELECT Id, Description FROM QuoteLineItems)
                                                  FROM Quote WHERE Opportunity.Link_to_Main_Opportunity__c = :o.Id]){
            quotelistmap.put(getquotes,getquotes.QuoteLineItems);
            system.debug('quotelistmap: '+quotelistmap);
        }
      return quotelistmap;
    }

Visualforce Page:

<apex:dataTable value="{!Quotes}" var="q">
    <apex:column value="{!q.Product_Category__c}"/>
    <apex:column value="{!q.Product__c}"/> 
    <apex:repeat value="{!Quotes[q]}" var="qli"> 
        <apex:column value="{!qli.Id}" /> 
    </apex:repeat>
</apex:dataTable>

Error Message:
Map key null not found in map
Error is in expression '{!Quotes[q]}' in component <apex:dataTable> in page quoteswithquotelineitems

I have searched the community and found some community members doing the exact same thing.

Please help?

Thanks,

Rudi

Hi All,

 

We accidentally deleted an Account record with lots of related custom record information. When we try to undelete the Account record from the Recycle Bin we get the following message:

 

Unable to undelete 1 of the record(s) because:

  • The record may have already been undeleted or removed from the Recycle Bin
  • The record may have been orphaned by the deletion of the custom object
  • You may no longer have access to undelete the record(s)
  • A data integrity rule or Apex trigger would fail if the record was undeleted

Has anybody experienced this issue before? Any ideas as to what could be causing this issue?

 

Thanks,

 

Rudi

Any idea how to create a text file in APEX using values in a list of objects? I have a list of Accounts, the text file must be formatted in a specific format, e.g.. Account Number (1 – 16) right justified, Account Name (17 - 47) left justified, Account Site (47 - 50) right justified.

Hi Community,

 

We are trying to create a new Site in both our production and sandbox orgs, but get the following error when trying to save - duplicate value found: <unknown> duplicates value on record with id: <unknown>. Salesforce support says that they do not support this, so thought i would put the question out there, any ideas on how to resolve this?

 

Thanks,

 

Rudi

Hi All,


We have added quite a lot of css styling to our customer portal, and for that reason we have created custom labels in Salesforce to translate them into different languages. From our customer portal we use the getJSON function to call a visualforce page that contains all the cusotm label values, the returned values will be the translated labels. Now, we had all this working for some time but had to make some changes to the portal and now some of the labels are not translating anymore. There is only one tab that is translating all the labels, and that is the new case menu tab, this is a tab in the portal that points to a custom visualforce tab, when you navigate to any of the other tabs like home the translations do not work. Any ideas on how to resolve this issue or where to troublshoot? I have included the code samples below.


Thanks,


Rudi


<apex:page contentType="application/json">
{!$CurrentPage.parameters.callback}([
        {LabelName: 'homeMenu', LabelValue: '{!$Label.HomeMenu}'},
        {LabelName: 'supportMenu', LabelValue: '{!$Label.SupportMenu}'},
        {LabelName: 'LogOutMenu', LabelValue: '{!$Label.LogOutMenu}'},
        {LabelName: 'newCaseMenu', LabelValue: '{!$Label.NewCaseMenu}'},
        {LabelName: 'viewCaseMenu', LabelValue: '{!$Label.ViewCaseMenu}'},
        {LabelName: 'termsandconditions', LabelValue: '{!$Label.termsandconditions}'},
        {LabelName: 'privacypolicy', LabelValue: '{!$Label.privacypolicy}'},
        {LabelName: 'tclink', LabelValue: '{!$Label.privacypolicylink}'},
        {LabelName: 'KnowledgeBase', LabelValue: '{!$Label.KnowledgeBase}'}])
</apex:page>


$.getJSON("/apex/portalmenusourceJSON?callback=?", function(data){                 
                 $.each(data, function(index,obj){
                     attr="a[label='"+obj.LabelName+"']";
                     $(attr).html(obj.LabelValue);
                  });

Hi All,

 

I want to recreate a martix report in a visualforce page, so that the users can do inline editing and save the records. There are 2 objects involved here (Opportunities(Parent) and Revenue Schedule(Custom - Child). I want the Opportunity Names on the left hand side of the report/vf page and then the Revenue Schedule child records to display horizontally next to each Opportunity record. The header of the revenue shedule records must display only Date (e.g. August 2010, September 2010...), and if a child record has a date that falls withing the header date then display a value for the user to update.

 

I have been reading in the community to find a solution and i think that i might get this right using <apex repeat> , but i am not sure. Any suggestions?

 

Thanks Community

 

Rudi

Hi All,

 

We accidentally deleted an Account record with lots of related custom record information. When we try to undelete the Account record from the Recycle Bin we get the following message:

 

Unable to undelete 1 of the record(s) because:

  • The record may have already been undeleted or removed from the Recycle Bin
  • The record may have been orphaned by the deletion of the custom object
  • You may no longer have access to undelete the record(s)
  • A data integrity rule or Apex trigger would fail if the record was undeleted

Has anybody experienced this issue before? Any ideas as to what could be causing this issue?

 

Thanks,

 

Rudi

Any idea how to create a text file in APEX using values in a list of objects? I have a list of Accounts, the text file must be formatted in a specific format, e.g.. Account Number (1 – 16) right justified, Account Name (17 - 47) left justified, Account Site (47 - 50) right justified.