Forum Replies Created

Page 5 of 7
  • Saurabh

    Member
    April 11, 2017 at 2:33 pm in reply to: What is a externalid in salesforce?

    Hi Manpreet

    Suppose we have account table in Salesforce and account table outside of the Salesforce (ex: .csv file, sql database). In Salesforce all the records can be identified with record id and outside of the Salesforce we can't recognize records with Salesforce id that is the reason to compare outside table and salesforce table in Salesforce for one of the field we have to enable external ID (we can enable external id for text, number, auto number and email). If we enable external id we can compare that particular column with the column which is available in external table. While comparing if the both column values are same then it will update otherwise it will insert.

    Hope it helps you:

     

  • Hi Suraj

    Yes, you can make from Batch Classes.

    First, you can't call a future method from a Batch class.  My guess is that the threads generated from batches are considered "future" methods, so trying to do it results in the "Future method cannot be called from a future method" error. So, I removed the future designation from the HTTP callout class.

    But what got it for me was making sure to pass the optional scope parameter when my schedulable class calls the batch.  Otherwise, I hit the wall for callout limits.

    So this:

    database.executebatch(b);

    Becomes:

    database.executebatch(b, 1);

    And now the scheduled job runs perfectly, just as if I had manually run it myself.

    It's per each call of execute() in the batch, so for each "batch", you can call up to 10 HTTP callouts.

    If the callout can handle multiple records at a time, do so, and batch up to 10 callouts per batch, otherwise, set the batch scope to 1, so each apex batch handles one record at a time.

    Hope it may help you:

  • Saurabh

    Member
    April 10, 2017 at 1:59 pm in reply to: What is the use of Database.statefull Interface in salesforce?

    Hi Suraj

    Batch Apex is stateless by default. That means for each execution of your execute method, you receive a fresh copy of your object. All fields of the class are initialized, static and instance. If your batch process needs information that is shared across transactions, one approach is to make the Batch Apex class itself statefull by implementing the Statefull interface. This instructs Force.com to preserve the values of your static and instance variables between transactions.

    Hope it may helps you:

     

  • Saurabh

    Member
    April 10, 2017 at 1:50 pm in reply to: How to avoid recursive workflow rules in Salesforce?

    Hi Manpreet

    We can take two steps to avoid recursive workflow rules -

    1. For the workflow Evaluation Criteria if you choose created, and any time it’s edited to subsequently meet criteria option, we can avoid recursive workflow rules.
    2. If you don't enable Re-evaluate Workflow Rules after Field Change checkbox in the Field Update of a workflow rule we can avoid.

    Hope it help you:

  • Hello Manpreet

    The process that you are trying to achieve is not possible.

    But in order to achieve this  you can do one thing  to add one more step deactivate the approval process and clone the deactivated approval process and add the new steps.

    Hope it may help:

     

  • Saurabh

    Member
    April 10, 2017 at 1:34 pm in reply to: Reports bucketing in Salesforce?

    Hi Manpreet

    Bucket field in Reports is used to group values to the name we specify.

    It can group only the below data types fields

    1. Picklist
    2. Number
    3. Text

    for more information you can lookup here:http://www.infallibletechie.com/2013/03/what-is-use-of-bucket-field-in-reports.html

    Hope it may help you:

  • Hello Suraj

    Reason for you can't pass Object either Standard or Custom in Future method as a Parameter

    The reason why sObjects can’t be passed as arguments to future methods is because the sObject might change between the time you call the method and the time it executes. In this case, the future method will get the old sObject values and might overwrite them. To work with sObjects that already exist in the database, pass the sObject ID instead (or collection of IDs) and use the ID to perform a query for the most up-to-date record.
    And also There is no direct way to pass SObject record as a parameter in @future method, but you can make one hack where first you will serialize object state in string and pass this string to @future method and de-serialize  it again to convert it back in SObject.

    For Example

    trigger MyTrigger on Test_Object__c (after insert) {
    String objJSONStr = Json.serialize(Trigger.new[0]);

    MyFutureClass.myFutureMethod(objJSONStr);
    }
    public class MyFutureClass {
    @future
    public static void generateEtsPdfAttachment(String objJson){
    Test_Object__c obj = (Test_Object__c) Json.deserialize(objJson, System.Type.forName('Test_Object__c'));
    }
    }

    For more information you can lookup here:https://developer.salesforce.com/blogs/developer-relations/2013/06/passing-objects-to-future-annotated-methods.html

    Hope it may help you:

  • Saurabh

    Member
    April 10, 2017 at 10:58 am in reply to: What is Custom Setting in Salesforce and where it is used?

    Hello Suraj

    Custom settings are similar to custom objects and enable application developers to create custom sets of data, as well as create and associate custom data for an organization, profile, or specific user. All custom settings data is exposed in the application cache, which enables efficient access without the cost of repeated queries to the database. This data can then be used by formula fields, validation rules, flows, Apex, and the SOAP API.

    There are two types of custom setting:
    List Custom Settings
    Hierarchy Custom Settings.

    To Know more,Please look here:https://help.salesforce.com/apex/HTViewHelpDoc?id=cs_about.htm

    Use of Custom Settings

    Hard-coding and good code are a match made in hell. RecordTypeIds are most vulnerable to this abuse, and we’re are all familiar with the frustration of finding that code that worked in environment A, suddenly stops working when it is promoted to say test. Why? Because possibly RecordTypeIds are different across the two environments.
    Why hard-code when you can use Custom Setting for stuff like this ? Custom Settings are a SOQL inexpensive way of storing your configurable parameters in the safe confines of the Salesforce database, with all the conveniences of a custom object – create / edit via point and click – standard salesforce !

    You can use custom settings in Apex triggers - the fact that you are in a trigger doesn't make any difference, you can use the mechanism for accessing via Apex:

    To Know more,Please look here:http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_custom_settings.htm

    Hope it may help you:

  • Hi Manpreet

    All users can just Read the record.

    Create a Sharing Rule to give Read/Write access with "Based on criteria" Sharing Rules.

    Hope it may helps:

  • Saurabh

    Member
    April 7, 2017 at 2:22 pm in reply to: Interfaces in apex classes?

    Hi Manpreet

    An interface is like a class in which none of the methods have been implemented—the method signatures are there, but the body of each method is empty. To use an interface, another class must implement it by providing a body for all of the methods contained in the interface.

    Interfaces can provide a layer of abstraction to your code. They separate the specific implementation of a method from the declaration for that method. This way you can have different implementations of a method based on your specific application.

    For more information you can refer to this link:http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_interfaces.htm

    Hope it may helps:

  • Hi Manpreet

    Triggers are used for  Implicit invocation of the apex whereas

    Javascript remoting are used for Explicit invocation of the apex

    Hope it may helps:

     

  • Saurabh

    Member
    April 7, 2017 at 1:15 pm in reply to: How to create lookup field in Salesforce flow?

    Hi Suraj

    There is no direct way to create a lookup field in flow but we can use workaround mentioned in the link given below:

    You can refer to this link for your queryhttp://www.jitendrazaa.com/blog/salesforce/creating-lookup-field-in-flow/

    Hope it may help you:

     

  • Hi Manpreet

    After choosing object on which you want to start the process.

    When you click on the add criteria button in the process builder in that after filling criteria name and setting all  the conditions.you will find an advance option field at the last on.This was the Evaluation Criteria
    “created, and every time it’s edited to meet subsequently criteria after checking this yes checkbox you will get this criteria.

    Some thing like this shown below in the red area

    test

    Hoping this is the answer for your query:

  • Saurabh

    Member
    April 6, 2017 at 4:35 pm in reply to: Making SOQL Query Process Faster in salesforce?

    Hi Manpreet

    You can make SOQL Query to process records faster by using all  those fields which are indexed in a soql query( making the field indexed ,by clicking the external id)

    Hope it helps:

     

  • Saurabh

    Member
    April 6, 2017 at 4:24 pm in reply to: What are wrapper classes used for in salesforce?

    Hello Manpreet

    What Is Wrapper Class & How To Use It In Salesforce
    A wrapper or container class is a class, data structure, or an abstract data type whose instances are a collections of other objects.It is a custom object defined by Salesforce developer where he defines the properties of the wrapper class. Within Apex & Visualforce this can be extremely helpful to achieve many business scenarios within the Salesforce CRM software.

    Use of Wrapper Class within Salesforce:

    You can use wrapper class to display records from multiple records within a single table based around the business needs.
    For more information you can refer to this link:https://success.salesforce.com/answers?id=90630000000hSoLAAU

    Hope this may help:

  • Saurabh

    Member
    April 6, 2017 at 3:31 pm in reply to: Difference between Salesforce.com and Force.com ?

    Hello  Suraj

    Firstly

    Salesforce.com is built on the Force.com platform - they are more or less interchangeable from a technical standpoint. It's a mere matter of marketing semantics. Force.com applies to the infrastructure and codebase that is the foundation for the entire Salesforce solution. They are enforcing the Force.com concept more so because Salesforce can do so much more than CRM nowadays.

    They're effectively the same thing, but Salesforce.com is generally used to refer to the CRM functionality (the sales, service and marketing applications) and Force.com is generally used to refer to the underlying platform (the database, code, and UI on which all the apps are built).

    Secondly

    Regarding the functionality situation. In this case I think you are referring to the Force.com Edition in comparison to the standard Salesforce.com Editions (Professional, Enterprise, etc.). In this case, yes there is a difference. The Force.com Edition (or Platform Edition, depending on the marketing materials you have in hand, what day of the week it is and whether or not your sneakers have green stripes) is a standard Enterprise Edition (if you buy in conjunction with a full Enterprise Edition) minus the CRM functionality - so no Leads, Opportunities, etc. (as far as I know). This Platform Edition is aimed at providing customers with the "platform" on which to build custom applications - for companies that do not so much use Salesforce for the CRM.

    And lastly, regarding the Developer Edition accounts you created with interests in Salesforce.com customization and Force.com platform - again, just another marketing ploy. Salesforce uses the preferences you set to send you more targeted information via email regarding the topics of interest to you.

    Hope it helps

  • Saurabh

    Member
    April 6, 2017 at 3:11 pm in reply to: How to delete a user from Salesforce ?

    Hi Suraj

    You cannot delete users from Salesforce. You can remove their license or deactivate them to remove access to the system, but because they may still own records, they cannot be deleted.

    Hope this may help you:

  • Hi suraj

    You can convert a lookup relationship to a master-detail relationship, but only if the lookup field in all records contains a value.

    And also We can convert the lookup relationship to master detail relationship only if all the existing record has valid lookup field values.

    For better undertstanding refer to this link:http://opfocus.com/converting-lookups-to-master-detail-relationships/

    Hope this may help you:

  • Hi Suraj

    First validation rules will get execute then workflow rules will be execute so the answer is 100 (Even though there is validation rule because of the workflow it will accept 100 in amount field.

    Hope this may helps

  • Saurabh

    Member
    April 4, 2017 at 2:52 pm in reply to: AutoPopulate a Lookup from another Lookup in salesforce?

    Hi Manpreet

    I think the easiest way to do this is to use a headless Flow triggered by the Process Builder as in a Flow you can assign a text string to a picklist or you can done it with 2 picklists on different objects where you can used a variable to take the value from one to copy it to the other.

    Hope this may help:

     

  • Saurabh

    Member
    April 4, 2017 at 2:46 pm in reply to: Task Field update from Account Field in salesforce?

    Hi Manpreet

    You are not able update a task field based on it’s Account Field using Workflow Rule, but you achieve this by using Process builder.

    The reason for this is that you cann't get Whatid in workflows that is needed for getting information of related account wth task but on the other hand in process builder you will get it

    Hope this may help:

  • Hi Suraj

    Below are  some points that helps you in differentiating between workflow and trigger

    Workflow

    • You cannot create records
      They currently can only result in a task, email, field update, or outbound message
      They can only cross objects in a master detail relationship, from the detail to the master, and only for certain scenarios (all custom to custom objects, some custom to standard objects, and even fewer standard to standard)
    • We can not perform Dml operation in workflow
    • We cannot query from database

    Trigger

    • Can do these things, but obviously using code.
      Often needed for roll-up type scenarios where roll up summary fields cannot be used
      Often needed when a record needs to be created on a different object
    • We can use 20 Dml operations in trigger
    • Trigger can be used to invoke a webserive

    Hope this may help you:

  • Saurabh

    Member
    April 4, 2017 at 7:21 am in reply to: Roll up Summary Field on User Object?

    Hi Manpreet ,

    No We can not create rollup Summary Field on User Object.

    This is the  new idea which was given by most of the salesforce developer.

    Hope it helps:

    Thanks

  • Hi Manpreet,

    If in a Master-detail relationship, you first need to insert all master records.

    Then run a report to get all the Inserted Master record Id's and export them your machine.

    Now to insert detail object records, you need to associate them with Master Record ID.

    A possible approcah would be use VLOOkUP function in Excel to populate the Id's.

    Once you have the ID's populated then you can insert Detail records using data loader.

    Whereas 

    VLOOKUP is an Excel function to lookup and retrieve data from a specific column in table. VLOOKUP supports approximate and exact matching, and wildcards (* ?) for partial matches. The "V" stands for "vertical". Lookup values must appear in the first column of the table, with lookup columns to the right.
    Hope it helps.

    Thanks

  • Hi Suraj

    you can achieve your requirement by following error condition:

    AND ( TEXT(Status) = 'Open' , TEXT(PRIORVALUE(Status)) = 'Closed' , NOT(Flag__c))

    Hope this may help you:

    Thanks

Page 5 of 7