Admin

Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • in reply to: Bounded and Unbounded expression #1623
    Admin
    Keymaster

    Use unbounded expressions to render static data that won’t change until you need to refresh a page. While bounded expressions are used to reflect changes on your Lightning Component.

    in reply to: Challenge 5 #1602
    Admin
    Keymaster

    Just open the Dev Console and do the activity again. In the down left corner, you’ll see logs generated for the activity. Open any and in filter search task or search for exceptions. There will mostly be some field missing which might hinder task creation. Let me know.

    in reply to: Automate Opportunities #1601
    Admin
    Keymaster

    Hello Vaishnavi. Just open the Dev Console and do the activity again. In the down left corner, you’ll see logs generated for the activity. Open any and in filter search task or search for exceptions. There will mostly be some field missing which might hinder task creation. Let me know.

    in reply to: Too many query rows 50001 in batch class #1527
    Admin
    Keymaster

    Causal queries can be several. One I encountered was when I skipped to use query locator in my batch apex.

    Represents the record set returned by Database.getQueryLocator and used with Batch Apex.

    Using string query was giving error though using ‘Database.QueryLocator’ and returning that as below solved the error.

    public Database.QueryLocator start(Database.BatchableContext bc){
    string accon = ‘Select ID,Name,(Select Id,Company__c FROM CONTACTS) From Account’;
    return Database.getQueryLocator(accon);

    in reply to: Challenge 5 #1502
    Admin
    Keymaster

    HEY ye

    Try debugging the issue it would be easier to check at wat point the issue lies. This error just says to me that something has went wrong.

    in reply to: Automate Opportunities #1499
    Admin
    Keymaster

    Hi paavai

    I advice you to use debug logs. It is clear that a process builder has failed due to an incorrect field assignment during record creation. Check the field mapping.

    Admin
    Keymaster

    We can use right(n) command to get last n digits from a String using Apex.

    Syntax:
    str.right(n);

    Example:
    String strphoneNumber = ‘917718838553’;
    string phnumber = strphoneNumber.right(10);
    string phonewithCode = ’91’+strphoneNumber.right(10);

    in reply to: Challenge 5 #1436
    Admin
    Keymaster

    Hey Loh

    Opportunity.acct.type refers to the prospect acct here.
    your err is basically stating that when the opportunity with prospecting stage and prospect was inserted,…the task was not created successfully.

    so check that the process builder is active, the it is set to when record is created and edited and then check that it check the opportunity and opportunity acct type condition and if yes… create a record>task> give proper subject headline and it shud work.
    you can also debug the Process builder is still issue persists

    Admin
    Keymaster

    I would like to mention that ContentDocument object only supports delete(), describeSObjects(), query(), retrieve(), undelete(), update() calls. And ContentVersion Object supports create(), describeLayout(), describeSObjects(), query(), retrieve(), search(), update(), upsert() calls.

    Documentation can be found here:
    http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_contentdocument.htm

    http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_contentversion.htm

    Now to restrict the files I tried working with before insert and update triggers which did not work well as before the insertion the fileType fields came as null.

    So Using After insert I have achieved the required. Use the below code at your own discretion.

    public without sharing class FileService {
        public static void RestrictFiles(List<ContentVersion> ContentList){
            for(ContentVersion doc : ContentList){
                if(doc.FileType != null && doc.FileType =='EXCEL_X' ){
                    doc.addError('File having this extension could not be attached,Please try some other extension.');
                }
             }
        }
    }
    Admin
    Keymaster

    Calling a controller function from another controller function
    $A.enqueueAction(component.get('c.controllerMethod'));

    When you are calling a helper function from a controller function you can use:
    helper.helperMethod(component, event, helper);

    When you are calling a helper function from a helper function you can use:
    this.helperMethod(component, event, helper);

    Admin
    Keymaster

    https://login.salesforce.com?startURL=%2Fhome%2Fhome.jsp&un=********&pw=*********

    Hey there
    You can pass credentials to salesforce via this link. replace the ***** with username and password.

Viewing 11 posts - 1 through 11 (of 11 total)
error: Content is protected !!