Kumar Roopam
IndividualForum Replies Created
-
Kumar
MemberJanuary 16, 2017 at 7:13 am in reply to: How can we connect client side controller to server side controller in Salesforce Lightning?Hi Sushant,
Go through following link
Hope this helps.
-
Kumar
MemberJanuary 16, 2017 at 7:11 am in reply to: Getting the current visualforce page name in SalesforceThanks
-
Kumar
MemberJanuary 16, 2017 at 7:08 am in reply to: How can we re-render a list inside a custom object in Salesforce Lightning Component?Hi Sushant,
For re-rendering a list in lightning, you just need to use component.set to set the value of the list attributes with updated values (which you obtain from a client side APEX controller maybe?).
Example:
This is your attribute:
<aura:attribute name="expenses" type="Expense__c[]"/>
So in your JS controller, you do something like:
var expenses = component.get("v.expenses");
expenses.push(response.getReturnValue());
component.set("v.expenses", expenses);where the response is coming from the client-side controller.
Hope this helps.
-
Kumar
MemberJanuary 12, 2017 at 2:48 pm in reply to: Can component.find() find a dynamically created component in salesforce?Hi Sushant,
Yes, it can. To this you have to roughly follow these steps:
- Create the component using $A.createComponent
- Finding the parent component to attach the dynamic child using component.find(parentId) which returns the component instance(Aura.Component)
- Then getting the body of the above, then adding dynamic child to the body and setting the body.
- So, child component(dynamic) needs to be inside the body of the parent component to be rendered in the view.
Also remember, you are attaching the dynamically created component to the body of the <div aura:id="divDynamicChild"></div> not to the actualy body of the component <c:testFindDynamic_Parent>.
Hope this helps.
-
Kumar
MemberJanuary 12, 2017 at 2:43 pm in reply to: How to use Enqueue action in salesforce Lightning page?Hi Sushant,
Enqueue action is used in lightning javascript controllers to call server-side action.
Refer to this developer guide to understand the working.
-
Kumar
MemberJanuary 12, 2017 at 2:38 pm in reply to: Custom Tab not showing in Salesforce Lightning navigation menuThanks dude!
-
Kumar
MemberJanuary 12, 2017 at 2:37 pm in reply to: Difference Between Before trigger and After Trigger in Salesforce, If Possible With example. Can anyone help me out? -
Hi Vikas,
Yes, it will work but it not considered the best practice as you are calling an asynchronous code block inside an already asynchronous Execute method of the batch.
You can very well only use the batch class for most use cases and still provide functionality.
Hope this helps!
-
Kumar
MemberJanuary 11, 2017 at 1:24 pm in reply to: Does the time dependent workflow in Salesforce verify the rule criteria is true or not before it is execution?Hi Mohit,
Time dependent workflows verify the criteria first and then, if the criteria is met, then only the time dependent action is performed.
For example, if you have defined the action to be performed after a week, then
- the workflow will fire
- evaluate criteria
- then if criteria is met, the action will be performed after one week.
Hope this helps.
-
Kumar
MemberJanuary 11, 2017 at 9:47 am in reply to: What is Remote Action in Salesforce/What is the use of this action?Hi Sushant,
JavaScript remoting in Visualforce provides support for some methods in Apex controllers to be called via JavaScript.
JavaScript remoting has three parts:
1. The remote method invocation you add to the Visualforce page, written in JavaScript.
2. The remote method definition in your Apex controller class. This method definition is written in Apex, but there are few differences from normal action methods.
3.The response handler callback function you add to or include in your Visualforce page, written in JavaScript.For more info on why we use Javascript remoting, refer to this blog.
Hope this helps.
-
Kumar
MemberJanuary 11, 2017 at 7:22 am in reply to: Difference between session cache and org cache in salesforceHi Vikas,
The difference between them is as follows:
Org Cache
Org cache stores org-wide data that anyone in the org can use. Org cache is accessible across sessions, requests, and org users and profiles.For example, weather data can be cached and displayed for contacts based on their location. Or daily snapshots of currency exchange rates can be cached for use in an app.
Session Cache
Session cache stores data for an individual user and is tied to that user’s session. The maximum life of a session is 8 hours.For example, suppose that your app calculates the distance from a user’s location to all customers the user wishes to visit on the same day. The location and the calculated distances can be stored in the session cache. That way, if the user wants to get this information again, the distances don’t need to be recalculated. Or, you might have an app that enables users to customize their navigation tab order and reuse that order as they visit other pages in the app.
Hope this helps.
-
Kumar
MemberJanuary 10, 2017 at 12:17 pm in reply to: How to add page numbers in Salesforce visualforce page during custom controller pagination action? -
Kumar
MemberJanuary 10, 2017 at 12:04 pm in reply to: How to post data using Bulk API using workbench tool in Salesforce?Hi Sushant,
Your request body format seems to be correct, just cross check the session id value. You may have copied an extra space in the id, happens all the time.
Also the session id expires after specific time period, unless you keep making requests before that periodically.
- This reply was modified 7 years, 11 months ago by Kumar.
-
Kumar
MemberJanuary 10, 2017 at 11:01 am in reply to: Issue with After Trigger And Before Trigger in SalesforceHi Vikas,
The reason your code is not working the same in the 'before' trigger is because the new opportunity you have inserted has still not been committed in the database, hence it does not have a Id value for now which you are querying here:
for(Opportunity A:[SELECT id FROM Opportunity WHERE StageName = ‘Closed Won’ AND id IN :Trigger.New])
Hope this helps.
-
Kumar
MemberJanuary 10, 2017 at 10:54 am in reply to: Queueable Method and future method in SalesforceHi Vikas,
If you were exceeding a governor limit in your future method, or if you think a future method requires a higher limit, you can possibly increase the limits for your future method,see Future Methods with Higher Limits.
Another reason to use future methods instead of queueable is when your functionality is sometimes executed synchronously, and sometimes asynchronously. It’s much easier to refactor a method in this manner than converting to a queueable class. This is handy when you discover that part of your existing code needs to be moved to async execution. You can simply create a similar future method that wraps your synchronous method like so:
@future
static void myFutureMethod(List<String> params) {
// call synchronous method
mySyncMethod(params);
}Hope this helps.
-
Hi Vikas,
A callback URL will be invoked by the API method you're calling after it's done. So if you call
POST /api.example.com/foo?callbackURL=http://my.server.com/bar
Then when /foo is finished, it sends a request to http://my.server.com/bar. The contents and method of that request are going to vary - check the documentation for the API you're accessing.
-
Hi,
It means that the website you are calling with HTTPS has a domain name that is different from what you're using. So if you think you're calling "https://api.myservice.com", and the website's certificate is only for "www.myservice.com", you get this error. If you connect to the service using a browser, see if it has a security exception, and if not, if the domain name redirected, then check the domain name of the service you're calling to make sure it's the right one (see https://en.wikipedia.org/wiki/Subject_Alternative_Name).
Unfortunatelly this error also occurs when multiple certificates are hosted on the same IP address. It seems that salesforce is missing SNI support (see http://en.wikipedia.org/wiki/Server_Name_Indication).
Hope this helps.
-
Kumar
MemberJanuary 9, 2017 at 6:05 am in reply to: What are the different approaches or methods of JSON parsing in Salesforce?Hey Sushant,
JSON Parsing in Salesforce can be done by two ways:
- By deserializing the JSON into a class.
- Using JSON.Parser methods.
You can refer to https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_json_jsonparser.htm
Hope this helps!
-
Kumar
MemberJanuary 9, 2017 at 5:33 am in reply to: How to update a field after every 24hrs in salesforce?Hi Pranav,
You can use schedulable apex to auto-update a field every 24hrs.
Following is the snippet of anonymous code which will help you to schedule your apex Job to run Every HOUR.
ScheduleclassEveryhour objschclass = new ScheduleclassEveryhour ();
string strSeconds = '0';
string strMinutes = '0';
string strHours = '0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23';
string strDay_of_month = '*';
string strMonth = '*';
string strDay_of_week = '?';
String sch = strSeconds + ' ' + strMinutes + ' ' + strHours + ' ' + strDay_of_month + ' ' + strMonth + ' ' + strDay_of_week;
system.schedule('ScheduleclassEveryhour', sch, objschclass);You can implement the field updation logic inside this 'ScheduleclassEveryhour' class which implements the Schedulable interface.
Hope this helps!
- This reply was modified 7 years, 11 months ago by Kumar.
-
Kumar
MemberJanuary 9, 2017 at 5:23 am in reply to: How to remove standard button from custom object list view page in Salesforce?Hi Upendra,
Go into the custom object's definition and scroll down to the Search layouts section, and look at the <SObject> List View for your custom object. The 4th column from the left ('Buttons Displayed') shows you which buttons are currently displayed when you are on the list view.
Clicking Edit next to the List View will bring you to the selection screen where you can add/remove the Standard Buttons as well as any custom buttons that you may have created.
I hope this helps you out!
-
Kumar
MemberJanuary 6, 2017 at 1:38 pm in reply to: How can we make Rest API callout inside Trigger in salesforceHi Vikas,
To make a REST API callout inside a trigger, you need to create a future method and then use that method in your trigger.
You can not use regular methods for API callouts in a trigger.
-
Kumar
MemberJanuary 6, 2017 at 1:34 pm in reply to: How can we Delete mass Accounts from org using Dml operation in salesforce?Hi vikas,
There is no soql command to delete rows directly. What you can do instead is to create a list with all the accounts in your org and then delete that list.
For example:
list<Account> acc = [SELECT id FROM Account]; delete acc;
Hope this helps.
-
Kumar
MemberJanuary 6, 2017 at 11:55 am in reply to: Difference between Json parsing and Json deserialization in salesforce?Hi Sushant,
JSON deserialization is a method used for JSON parsing in salesforce.
We can deserialize a JSON response into a class using the 'JSON.deserialize' method.
For more info you can go to:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_json_jsonparser.htm
Hope this helps
-
Kumar
MemberJanuary 6, 2017 at 11:49 am in reply to: What is the Order of Execution (Rules, Triggers etc.) in Salesforce & Debug Log?Hey Vikas,
The order of execution in Salesforce is as follows:
- System Validation rule (required field, field format)
- Before Triggers are executed
- Custom Validation rules are checked
- After Triggers are executed
- Assignment Rules are executed
- Auto-Response Rules are executed
- Workflow Rules are executed
- Before and after triggers are executed one more time if the workflow rule updates a field
- Escalation Rules are executed
- Parent Rollup Summary Formula or Cross Object Formula fields are updated in the respective objects. (These parent records also goes through the entire execution order)
- Criteria Based Sharing rules are evaluated
- Any Post-Commit Logic is executed (like sending an email)
Hope this helps.
-
Kumar
MemberJanuary 5, 2017 at 8:51 am in reply to: What are external objects? what are the uses of external objects in salesforce?Hi Sushant,
External objects are supported in API version 32.0 and later. External objects are similar to custom objects, but external object record data is stored outside your Salesforce organization. For example, perhaps you have data that’s stored on premises in an enterprise resource planning (ERP) system. Instead of copying the data into your org, you can use external objects to access the data in real time via web service callouts.
External objects are available with Salesforce Connect and Files Connect. Each external object is associated with an external data source definition in your Salesforce organization.For more info, refer to: