Ajay Prakash
IndividualForum Replies Created
-
Ajay Prakash
MemberJanuary 3, 2018 at 11:17 am in reply to: How to make a call to controller method from button in Salesforce lightning?Hi Portia,
If you want to call a server side controller method from lightning component then you have to create action in lightning component.Please refer below code-
Component-DemoComponent
<aura:component controller ="DemoApexCltr">
<lightning:button variant="brand" label="Submit" onclick="{!c.getAccountJS}" />
</aura:component>Javascript Controller-
({
getAccountJS : function(component, event, helper) {
var action = component.get("c.getAllAccount");
action.setCallback(this,function(response){
console.log(':::'+JSON.stringify(response.getReturnValue()));
});
$A.enqueueAction(action);
}
})Apex Controller - DemoApexCltr
public class DemoApexCltr {
@AuraEnabled
public static list<Account> getAllAccount(){
return [select id,name from account limit 10];
}
}- This reply was modified 6 years, 10 months ago by Ajay Prakash.
-
Ajay Prakash
MemberAugust 31, 2016 at 7:41 am in reply to: What is the reason to skip the DML Operation on Empty List?Hi Mohit,
You will get DML exception if you perform DML operation on empty list . So you need to skip DML operation on empty list.
Thanks
-
Ajay Prakash
MemberApril 30, 2016 at 3:27 pm in reply to: What is the difference between returning null and returning ApexPages.currentPage()?The major difference is when you return null the constructors defined in the controller class don't execute.
Thanks
-
Ajay Prakash
MemberApril 30, 2016 at 3:23 pm in reply to: How is Lightning aware of what record you are on if you embed it in Salesforce1?Hey Himanshu
Your component needs to implement the force:recordTab interface and the record and recordId will be automatically injected when your component is wired into record home.
Thanks
-
Ajay Prakash
MemberApril 30, 2016 at 3:10 pm in reply to: Are Lightning Components intended only for mobile?Hey Himanshu
Components have been built to be mobile first, but with responsive design in mind. So you can use them for both mobile and desktop (as a standalone app).
Thanks
-
Ajay Prakash
MemberApril 30, 2016 at 3:08 pm in reply to: How to generate the random string or random password using Apex?You can use following Apex code to generate random string or random password -
Integer len = 10;
Blob blobKey = crypto.generateAesKey(128);
String key = EncodingUtil.convertToHex(blobKey);
String pwd = key.substring(0,len);you can follow the following link-
https://developer.salesforce.com/forums/?id=906F000000091GsIAI
Thanks
-
Ajay Prakash
MemberApril 30, 2016 at 2:56 pm in reply to: Difference between Chatter API and Connect API in Salesforce?Chatter API is REST API for Chatter to display Salesforce data, especially in mobile applications. Responses are localized, structured for presentation, and can be filtered to contain only what the app needs.
Connect API provides apex classes for accessing the same data available in Chatter REST API. Use Chatter in Apex to create custom Chatter experiences in Salesforce.
thanks
-
Ajay Prakash
MemberApril 30, 2016 at 2:25 pm in reply to: How to enable truncate custom object feature in Salesforce?Hey piyush
you should follow following link-
https://help.salesforce.com/HTViewHelpDoc?id=dev_object_trunc.htm&
thanks
-
Ajay Prakash
MemberApril 30, 2016 at 2:12 pm in reply to: How can we perform Encryption and Decryption in Salesforce?You may follow the following link this may help you-
Thanks
-
Ajay Prakash
MemberApril 29, 2016 at 12:01 pm in reply to: Custom email templates limit in SalesforceThere is no limit on the number of email templates. But there is limit on the size of email templates.
-
Ajay Prakash
MemberApril 29, 2016 at 11:51 am in reply to: Is it possible to create a PDF from a report in salesforce?you can create only excel and csv file from report.
-
Ajay Prakash
MemberApril 14, 2016 at 8:14 am in reply to: How to make custom report on visualforce page without using standard functionality?You should follow the following link
http://salesforce.stackexchange.com/questions/48265/report-build-using-the-vf-page
-
Ajay Prakash
MemberApril 14, 2016 at 7:39 am in reply to: How to develop a Clickable Calendar in Salesforce using Javascript FullCalendar?You can follow following link to solve your problem-
http://stackoverflow.com/questions/2524971/adding-a-click-event-to-fullcalendar
http://jsfiddle.net/SzDsR/1/
http://fullcalendar.io/docs/mouse/dayClick/
http://fullcalendar.io/docs/mouse/eventClick/ -
Ajay Prakash
MemberApril 1, 2016 at 6:58 am in reply to: How to insert Account from Inbound email Attachment having Thousands of record?Complete code is not showing here.If someone need then I can mail.
- This reply was modified 8 years, 7 months ago by Ajay Prakash.
-
Ajay Prakash
MemberApril 1, 2016 at 6:47 am in reply to: How to insert Account from Inbound email Attachment having Thousands of record?global class createAccountsFromMail implements Messaging.InboundEmailHandler{
global String MyFile{get;set;}
global String[] filelines = new String[]{};
global ListAccountList=new List (); global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, Messaging.InboundEnvelope envelope){
Messaging.InboundEmailResult result = new Messaging.InboundEmailresult();
try{
System.debug('HELLO There');
for(Messaging.Inboundemail.BinaryAttachment at : email.binaryAttachments){
System.debug('Mail contents');
MyFile=at.body.toString().substring(0,5000);
filelines=MyFile.Split('\n');
System.Debug('File Lines----'+filelines.size());
for(Integer i=1;i- This reply was modified 8 years, 7 months ago by Ajay Prakash.
- This reply was modified 8 years, 7 months ago by Ajay Prakash.