Forum Replies Created

Viewing 1 - 25 of 124 posts
  • Kumar

    Member
    January 2, 2018 at 1:57 pm

    Thanks you Mohit! Didn't strike me to use aggregate queries to group records by OwnerIds.

  • Kumar

    Member
    December 29, 2017 at 12:16 pm

    Hey Shaik,

    You would to most probably write a trigger on Opportunity which saves the count of records created by a user in a custom setting or something. From where you could validate that if a user has created 15 records on Opportunity or not.

    Thanks

  • Kumar

    Member
    February 22, 2017 at 10:08 am

    Hi Sushant,

    As far as I know, sent email messages have a limit of 1,000 per day. You can check out this developer forum post for more information.

  • Kumar

    Member
    February 22, 2017 at 10:04 am

    Hi Sushant,

    If you have a particular user id, you can query on the PermissionSetAssignment object to get the id of all users who have a specific level of access on that Sobject.

    For example, this query gives you all the users who have 'view all' and 'modify all' permissions on Account.

    SELECT Assignee.Id, Assignee.Name FROM PermissionSetAssignment WHERE PermissionSetId IN (SELECT ParentId FROM ObjectPermissions WHERE SObjectType = 'Account' AND PermissionsViewAllRecords = true AND PermissionsModifyAllRecords = true)

    • This reply was modified 4 years, 9 months ago by  Kumar.
  • Kumar

    Member
    February 22, 2017 at 10:00 am

    Hi Prasanth,

    As far as I know, deleting components from a managed package requires you to log a case with Salesforce, as normally you can not delete any component from a managed package.

    For more information go to this link. Hope this helps.

    • This reply was modified 4 years, 9 months ago by  Kumar.
  • Kumar

    Member
    February 16, 2017 at 2:10 pm

    Hi Vikas,

    In order to be used in a community, your lightning component must implement the "forceCommunity:availableForAllPageTypes" interface and its access must be "global".

    Something like this:

    <aura:component implements="forceCommunity:availableForAllPageTypes" access="global">
    <aura:attribute name="greeting" type="String" default="Hello" access="global" />
    <aura:attribute name="subject" type="String" default="World" access="global" />

    <div style="box">
    <span class="greeting">{!v.greeting}</span>, {!v.subject}!
    </div>
    </aura:component>

  • Kumar

    Member
    February 15, 2017 at 2:38 pm

    Hi Vikas,

    One way you could make this work is use <apex:input type="number" /> instead of apex:inputText.

    Otherwise, you could implement some javascript validation or send it back to your controller and do the validation in Apex.

  • Kumar

    Member
    February 15, 2017 at 2:35 pm

    Hi Sushant,

    You can use a rich text type field and insert your image there.

    Hope this helps.

     

  • Kumar

    Member
    February 15, 2017 at 2:34 pm

    Hi Sushant,

    You can use @testSetup to define common test data for all the methods of a test class.

    Go to the developer guide for more details.

     

  • Kumar

    Member
    February 14, 2017 at 2:52 pm

    Hi Vikas,

    Refer to this post, it deals with the same scenario.

  • Kumar

    Member
    February 14, 2017 at 2:51 pm

    Hi Vikas,

    You can look into database.savepoint and database.rollback in Salesforce.

    Refer to this link for more info.

  • Kumar

    Member
    February 13, 2017 at 7:34 am

    Hi Mohit,

    You can use chaining batch jobs can be used for this purpose, for more information you can check out this link.

  • Kumar

    Member
    February 13, 2017 at 7:30 am

    Hi Prakhar,

    Refer to this link, it may help.

  • Kumar

    Member
    February 13, 2017 at 7:26 am

    Hi Pranav,

    You can query for the attachment with the parentId as the Id of the object record. For example:

    SELECT Id FROM Attachment WHERE parentID = <your record's Id>

    Hope this helps.

  • Kumar

    Member
    February 10, 2017 at 2:55 pm

    Hi Sushant,

    Workbench is a powerful, web-based suite of tools designed for administrators and developers to interact with Salesforce.com organizations via the Force.com APIs. Workbench includes robust support for the Force.com Partner, Bulk, Rest, Streaming, Metadata, and Apex APIs that allows users to describe, query, manipulate, and migrate both data and metadata in Salesforce.com organizations directly in their web browser with a simple and intuitive user interface. Workbench also provides many advanced features for testing and troubleshooting the Force.com APIs, such as customizable SOAP headers, debug logs for API traffic, backward compatibility testing with previous API versions, and single sign-on integration within the Salesforce application.

    Data Loader is an easy to use graphical tool that helps you to get your data into Salesforce objects. The Data Loader can also be used to extract data from database objects into any of the destinations mentioned above. You can even use the Data Loader to perform bulk deletions by exporting the ID fields for the data you wish to delete and using that source to specify deletions through the Data Loader.

    The Data Loader requires the use of the Force.com API. If your Salesforce edition allows the use of the API (Enterprise, Unlimited and Developer Editions), you can download the Data Loader from the Setup menu, under Administer heading -Data Management.

  • Kumar

    Member
    February 10, 2017 at 11:33 am

    Hi Mohit,

    Custom Labels and the $Label global can be used for this purpose! Instead of evaluating Visualforce inside your JavaScript, you can do a little bit of JavaScript inside your Visualforce.

    Load your Custom Labels into the platform using the normal interface,
    Create what I like to call a "JavaScript bridging component" that loads before your script, like so:

    <script>
    window.$Label = window.$Label || {};
    $Label.MyError = '{!JSENCODE($Label.MyError)}';
    $Label.MyPrompt = '{!JSENCODE($Label.MyPrompt)}';
    $Label.MyMessage = '{!JSENCODE($Label.MyMessage)}';
    </script>

    Now in your javascript (in a static resource) use the variables just as if they were VF without {!}

    <script src="{!URLFOR($Resource.ScriptZip, '/my.js')}">
    //NOTE: this example code is for clarity,
    //really he lives in the static resource
    function errorHandler() {
    console.log($Label.MyError);
    alert($Label.MyMessage);
    }
    </script>

    This is in the spirit of the platform: there is no need to interpret any variation on the token names and you can pluck the values straight out in your JavaScript without inventing anything.

    Hope this helps.

    • This reply was modified 4 years, 9 months ago by  Kumar.
  • Kumar

    Member
    February 10, 2017 at 11:29 am

    Hi Sushant,

    You can use the LeadConvert class in Salesforce for this scenario. Hope this helps.

  • Kumar

    Member
    February 10, 2017 at 11:11 am

    Hi Sushant,

    Try this formula, this works for any timezone (simply replace the +10 with whatever your timezone is relative to GMT):

    IF(
    ISBLANK(Departure_Date_Time__c ),"0",
    TEXT(MOD(VALUE(
    Left(
    right( trim(TEXT(Departure_Date_Time__c) ),9),2))+10,24))
    &":"&mid(right( trim(TEXT(Departure_Date_Time__c) ),9),4,2)
    )

    Replaced 'Departure_Date_Time__c' with your datetime field, hope this helps.

  • Kumar

    Member
    February 10, 2017 at 11:07 am

    Hi Sushant,

    The classname which you've given is wrong. This is the correct styling.

    .THIS .uiButton.btn{
    background-color: #2574a9;
    color: #fff;
    padding: 10px 20px;
    }

    You may also directly give .THIS .btn (There is space if there's an outer DOM element, otherwise you may avoid the spacing.)

    Hope this helps.

  • Kumar

    Member
    February 9, 2017 at 8:14 am

    Hi Sushant,

    The error “System.NullPointerException: Attempt to de-reference a null object” normally occurs when you try to reference an object which has not been initialized or has null values.

    To avoid this you need to make sure that all the sObjects in your class are initialized, preferably in the constructor.

    Hope this helps.

  • Kumar

    Member
    February 5, 2017 at 11:45 am

    Hi Pranav,

    I think that the Sharing Rules in your Dev org are Public. If you change the Org Wide Default sharing to Private, you have a chance to define the Access at the time of Role definition.

    The Role Hierarchy screen lets you define the 'record access' relationship between your Users. Users can always see records they Own, and any records Owned by Users below them in the Role Hierarchy.

    Once your Role Hierarchy is defined, you can use Sharing Settings to determine how you want record access to be controlled in your org (Admin Setup->Security Controls->Sharing Settings). Hope this helps.

  • Kumar

    Member
    February 5, 2017 at 11:43 am
  • Kumar

    Member
    February 5, 2017 at 11:36 am

    Hi Pranav,

    I don't understand the full scope of your requirement but probably you will have to use Apex code and use the mass emails class.

    Hope this helps.

     

    • This reply was modified 4 years, 10 months ago by  Kumar.
  • Kumar

    Member
    February 5, 2017 at 11:35 am
  • Kumar

    Member
    February 5, 2017 at 11:33 am

    Hi Himanshu,

    You refer to this post. Hope this helps.

Viewing 1 - 25 of 124 posts