• Anvesh Singh
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 6
    Replies
Hi All, my apologies if this has been asked somewhere else. I didn't find any answer hence I have to post this question.

USE CASE: 
I am using database.query(queryString);
In queryString = 'SELECT id,linkEntityId,ContentDocumentId FROM ContentDocumentLink WHERE linkEntityID IN :listofRecords';

Here "listOfRecords" is a set of Ids (approx 5000 ids).
The above query returns only 6 contentDocumentLink.
But my org has more than 6 contentDocumentLink for those "listOfRecords".

How do I know if there are more than 6 files?
Because when I run the same query with selected linkEntityIds or hardcoded linkEntityIds (10 "listOfRecords") I get more than 6 records.

Question
So anyone has any idea is there any limitation on LinkEntityId when used as a filter in ContentDocumentLink?
I have a visualforce page that uses apex: enhancedList tag.

The page is working absolutely fine in classic experience when I am using Chrome Browser but is not working when I am using Lightning Experience. When I click Next, Previous links (Pagination) it doesn't respond.

Error in Console: Unsafe JavaScript attempt to initiate navigation for a frame with URL ...

Is there any workaround? I tried apex: listView but it didn't serve by necessity as apex:listView doesn't support Type=" Activity".
Any suggestion will be of great help.console error
Hi All, my apologies if this has been asked somewhere else. I didn't find any answer hence I have to post this question.

USE CASE: 
I am using database.query(queryString);
In queryString = 'SELECT id,linkEntityId,ContentDocumentId FROM ContentDocumentLink WHERE linkEntityID IN :listofRecords';

Here "listOfRecords" is a set of Ids (approx 5000 ids).
The above query returns only 6 contentDocumentLink.
But my org has more than 6 contentDocumentLink for those "listOfRecords".

How do I know if there are more than 6 files?
Because when I run the same query with selected linkEntityIds or hardcoded linkEntityIds (10 "listOfRecords") I get more than 6 records.

Question
So anyone has any idea is there any limitation on LinkEntityId when used as a filter in ContentDocumentLink?
HI All

1.Example for Iterable in Batch apex?
2. Example for schedulable batch apex?
HI ,I am doing a trailhead on salesforce Lighting this is my code 

<aura:component >
    <aura:attribute name="item"  type="Camping_Item__c"  /> <!-- required="true" type="String"  -->
    <p> The Item is <ui:outputText value ="{!v.item}"></ui:outputText></p>
    <p>Name:
        <ui:outputText value="{!v.item.name}" /> 
    </p>

    <p>Quantity:
        <ui:outputNumber value="{!v.item.Quantity__c}" /> 
    </p>

    <p>Price:
        <ui:outputCurrency value="{!v.item.Price__c}" /> 
    </p>

    <p>Packed?:
        <ui:outputCheckbox value="{!v.item.Packed__c}" /> 
    </p>
    
    <p><ui:button label="Packed!" press="{!c.packItem}"></ui:button>
    </p>
</aura:component>



Now Its required of me to :
Add a button to the campingListItem component that when clicked, marks the item as packed.
1.Add a button labeled "Packed!" that calls the packItem controller function when clicked.
2.The controller action marks the item attribute as packed and disables the button.

I have done with the first point
I'm struggling with the second point.

the controller code looks something like this (which currently isnt working)

({
    packItem : function(component, event, helper) {
        var btn= event.getSource();
        var BtnMessage =btn.get("v.label");  
        component.set("v.item","Packed");          
        btn.disabled=false;
    }
})



each time I have failing the trailhead because of this error message
Challenge Not yet complete... here's what's wrong: 
The campingListItem JavaScript controller isn't setting the 'Packed' value correctly.



 
I'm running into some behavior with Apex SOSL queries in our managed package that I don't quite understand. Previously I was hitting a 200-record return limit on SOSL queries.  After realizing this limit was increased to 2000 in API version 28, I changed our API version to the latest (32). Now I'm seeing us hit a limit of 250 records per type.

For instance, with the query:
List<List<SObject>> searchList = [FIND 'com' IN ALL FIELDS RETURNING Lead(Id), Account(Id)];

Results seem to be capped at 250 Leads and 250 Accounts returned.  I can't find any documentation of such a limit.  The only thing I can find is a way to increase the batchSize in QueryOptions for API-based SOSL queries, but I can't see anything that applies to Apex.

Any help?  Thanks in advance!
Hi , 

I am writing single email message to code to send emails. I am dynamically constructing toAddresses to send emails. The code is working fine and sending email to toAddresses and setTargetobjectid. 

I don't want to send email to setTargetobjectId. is there any way to stop sending email to setTargetobjectid?

Thanks
Siva.

I'm wondering is it possible to create Excel or CSV file in apex code (as attachment) is it possible ? currently i only see it works with VF page, but i'm looking to do it in apex code not using vf page, I don't see any options.

 

Any help is appreciated.

 

Thanks

Ram

 

  • December 29, 2011
  • Like
  • 0