Forum Replies Created

Viewing 20 posts - 1 through 20 (of 64 total)
  • #25635
    Forcetalks

    Hi Pranav,

    In SOQL you cannot use * to retrieve all the field values. You have to mention each and every fields API name in your SOQL query.

    Thanks.

    VIEW CONVERSATION
    #25628
    Forcetalks

    Hi Pranav,

    You can assign permission set to user dynamically using following code in your apex –

    PermissionSetAssignment psa = new PermissionSetAssignment
    (PermissionSetId = yourPermissionSetId, AssigneeId = yourAssigneeId);
    insert psa;

    Thanks.

    VIEW CONVERSATION
    #25627
    Forcetalks

    I agree with Himanshu. If you write the code in the helper.js then this code will be accessible from the controller.js, renderer.js and helper.js itself. It will improve your code reusability.

     

     

    VIEW CONVERSATION
    #25625
    Forcetalks

    Hi Pranav,

    Only including the style from the static resource in your lightning component will neither affect your lightning component nor your Lightning application. However, it will affect the preview of the lightning application if the component is included in the Lightning application and uses the CSS attributes. The scope of this static resource will be limited to Lightning component.

    Thanks.

     

    VIEW CONVERSATION
    #25619
    Forcetalks

    Hi Pranav,

    You should use maxlength attribute of the input field instead of calling a method for the validation. If you want to write some custom logic or you want to show a message to the user then you can call a method and follow the approach provided by Abhinav.

    Thanks.

     

     

    VIEW CONVERSATION
    #25590
    Forcetalks

    The above solution will help you definitely. There can be one more possible approach that you can perform a SOQL query on the object in the current transaction where you want old values of any record.

    VIEW CONVERSATION
    #25521
    Forcetalks

    Hi Anish,

    As I can see Stage__c is an custom Object and you are referring object label Stage in your batch class. You should refer API name Stage__c of the Stage object in your batch class as well.

    One more mistake I can see in your code that you have defined setQry(string soqlquery) method in your batch class but this method is not called from anywhere in your batch. You can set your query in the constructor rather than defining setQry(string soqlquery) method.

    Thanks.

     

     

     

    VIEW CONVERSATION
    #25520
    Forcetalks

    Hi Ravi,

    Unfortunately it is not possible to change Price Book for existing Order, like on Opportunity. This Feature is not delivered by Salesforce and still is in Idea.

     

    VIEW CONVERSATION
    #25397
    Forcetalks

    You need to do unit testing for apex classes not for visualforce pages. Yes you will need to write test classes for visualforce page controller before deployment.

     

    VIEW CONVERSATION
    #25396
    Forcetalks

    Hi Pranav,

    There is no sense of assigning the permission set to a profile. The permission set is for adding an exception on the profiles means providing additional access. You can add permission set’s permission on the profile directly.

     

    VIEW CONVERSATION
    #25395
    Forcetalks

    Read-Only: If you check the “Read-Only” checkbox, that field will be read-only for the users of that profile. The user can only see that field, he can’t edit. The field must be Visible to be Read-Only.

    Visible: If you check the “Visible” checkbox, that field will be visible to that profile. User can read & edit that field

    Readable: Read permission on an object gives access to view records that are either created by users themselves or any record that is being shared by sharing rules/role/manual sharing

    VIEW CONVERSATION
    #25394
    Forcetalks

    You can not use a map in a dynamic query because you can only use variables and collections in the dynamic query. map.Keyset() and map.Values() are the methods that you can not use directly inside a dynamic query.

     

    VIEW CONVERSATION
    #25393
    Forcetalks

    You can get the URL Parameters using window.location in your javascript.

    VIEW CONVERSATION
    #25392
    Forcetalks

    Salesforce has released this feature in Lightning as well in Spring ’17. You can create lookup filter in lightning in the same way as you create in the Salesforce Classic.

    VIEW CONVERSATION
    #25391
    Forcetalks

    In this scenario, if criteria are met every time a parent record is updated means you will insert a new child record, it will exceed the maximum depth limit of a trigger and will throw a maximum trigger depth exception.

    VIEW CONVERSATION
    #25390
    Forcetalks

    Reason and Resolution-

    When you have multiple jobs running that update the same set of records, it’s recommended to lock the records using the FOR UPDATE keyword. It will ensure that the record is locked and no other job can update the same record at that point in time. The conflicting job will then wait until the locking on the record is released and then perform the required operations. This will avoid conflicts between jobs that are running concurrently and will not throw up this exception.

    Locking Statements-

    In Apex, you can use FOR UPDATE to lock sObject records while they’re being updated in order to prevent race conditions and other thread safety problems.No other client or user is allowed to make updates either through code or the Salesforce user interface if the record is locked.

    Ex. Account [] accts = [SELECT Id FROM Account LIMIT 2 FOR UPDATE];

     

     

    VIEW CONVERSATION
    #25350
    Forcetalks

    There can be one possible solution. You can hide the field visibility from the profile and create a permission set having field level security based on the requirement and assign this permission set to the desired user.

     

    VIEW CONVERSATION
    #25253
    Forcetalks

    Lightning app builder is enabled by default. You need to go to quick search box and search for “lightning app builder” . There you can see a new button. By clicking new you can create new lightning page.

     

    VIEW CONVERSATION
    #25252
    Forcetalks

    We can retrieve list view column or the records based on the list view id using HTTP request. The response contains the query string that contains columns of the list view. Below code is for reference –

    In the above example, I have retrieved accounts based on the selected list view.

    VIEW CONVERSATION
    #25251
    Forcetalks

    This feature has been delivered in Spring ’17.

    VIEW CONVERSATION
Viewing 20 posts - 1 through 20 (of 64 total)