Forum Replies Created

Viewing 1 - 25 of 91 posts
  • Ajit

    Member
    January 4, 2017 at 5:46 am

    Hi,

    We can fetch upto 6 MB of response size in a Rest callout, and for an Asynchronus call we can have a limit of 12 MB.

  • Ajit

    Member
    January 4, 2017 at 5:44 am
  • Ajit

    Member
    January 4, 2017 at 5:43 am

    Hi

    try this code below and let me know it worked or not :

    @RestResource(urlMapping='/Lead/*')
    global with sharing class RestLeadConvert {

    @HttpGet
    global static String doGet() {
    String ret = 'fail';
    RestRequest req = RestContext.request;
    RestResponse res = RestContext.response;
    String leadId = req.requestURI.substring(req.requestURI.lastIndexOf('/')+1);
    Database.LeadConvert lc = new Database.LeadConvert();
    lc.setLeadId(leadId);

    LeadStatus convertStatus = [SELECT Id, MasterLabel FROM LeadStatus WHERE IsConverted=true LIMIT 1];
    lc.setConvertedStatus(convertStatus.MasterLabel);
    Database.LeadConvertResult lcr ;
    try{
    lcr = Database.convertLead(lc);
    system.debug('*****lcr.isSuccess()'+lcr.isSuccess());
    ret = 'ok';
    }
    catch(exception ex){
    system.debug('***NOT CONVERTED**');
    }
    return ret;
    }
    }

  • Ajit

    Member
    January 4, 2017 at 5:38 am

    Hi,

    Its not located in your org, It is an existing standard class in lightining which contains the ltest SLDS(CSS), so we have two option either use the SLDS as a static resource or extend this class.

  • Ajit

    Member
    October 20, 2016 at 12:14 pm

    Hi

    counter i=0;

    for(wraper : listOfWrapper){

    counter++;

    if(counter!=1){

    //do you stuff;

    }

    }

    • This reply was modified 5 years, 3 months ago by  Ajit.
  • Ajit

    Member
    October 20, 2016 at 12:10 pm

    Hey Joe,

    If want to query records on multiple object in a single query then you have to use SOSL rather then SOQL query.

     

    eg :

    FIND {"Joe Smith" OR "Joe Smythe"}
    IN Name Fields
    RETURNING lead(name, phone), contact(name, phone)

    but you can not perform DML operation.

  • Ajit

    Member
    October 14, 2016 at 3:47 pm

    Hi Pranav,

    Try this code :

    Integer numberDays = Date.daysInMonth(2016, 2);
    integer counter=0;
    for(integer i=0; i<numberDays; i++){
    Date dt = date.newInstance(2016, 1, 1+i);
    String dayOfMonth=dt.format('EEEE');

    if(dayOfMonth != 'Saturday' && dayOfMonth != 'Sunday'){
    counter++;

    }
    }

  • Ajit

    Member
    October 7, 2016 at 9:32 am

    Hi Pranav,

    We cannot do this, there is a Idea on Idea Exchange:

    https://success.salesforce.com/ideaView?id=08730000000Bq50

  • Ajit

    Member
    October 7, 2016 at 9:29 am

    Hi Ratan,

    It worked for me but I found one way also by using Rest call out in my apex code

  • Ajit

    Member
    October 7, 2016 at 9:28 am

    Hi Ratan

    Thanks it worked for me

  • Ajit

    Member
    October 3, 2016 at 6:11 am
  • Ajit

    Member
    October 3, 2016 at 6:08 am

    Hi Jai,

    Thanks for your reply

  • Ajit

    Member
    September 30, 2016 at 1:39 pm

    Hi Mohit,

    It depends on the need, when you know that you can have duplicate values and you don not want all the values including the duplicate then Set should be used. And list can be used to  only store values.

     

  • Ajit

    Member
    September 29, 2016 at 2:40 pm

    HI Mohit,

    You have to add the values dynamically from the picklist and recordtype and can be stored in two separate list and can be merged together when the list have all the values.

    To get values from picklist dynamically follow the link:

     

    https://developer.salesforce.com/blogs/developer-relations/2008/12/using-the-metadata-api-to-retrieve-picklist-values.html

  • Ajit

    Member
    September 29, 2016 at 2:35 pm

    Hi Pranav

    For these I think you have to create a custom page to select and search products, and one a product is selected you have to create a pagereference button to redirect to the a custom edit page on the basis of selected product id.

  • Ajit

    Member
    September 29, 2016 at 2:19 pm

    Hi Paranav,

    In Debug logs we a lot of redundant logs, so filter the logs we have certain debug labels.

  • Ajit

    Member
    September 29, 2016 at 2:18 pm

    Hi Pranav,

    If you are still not able to get the log, you can create a custom object and you can store the system.debug value in it.

  • Ajit

    Member
    September 29, 2016 at 2:15 pm

    Hi  Mohit ,

    Can you please elaborate you question it is not clear to me

  • Ajit

    Member
    September 29, 2016 at 2:06 pm

    Hi Pranav,

    There is no difference between these two the output is same in both case.

  • Ajit

    Member
    September 29, 2016 at 2:02 pm

    Hi Pranav,

    We can make rollup summries on Lookup relation, but yes we can write a trigger to fulfill your problem

  • Ajit

    Member
    September 29, 2016 at 2:00 pm

    Hi Mohit,

    Your problem is not clear with me, rather you want the total number of related records or you want to rollup some field value of the related records.

  • Ajit

    Member
    September 29, 2016 at 1:57 pm

    Hi Pranav,

    RecordSetvar is used on vf page to display a list of records when using standard controller on the page

  • Ajit

    Member
    September 29, 2016 at 1:49 pm

    Hi Naveen,

    When we have to Update or Insert  bulkdata in salesforce or we have to make web services callouts then we use the batch apex.

    The main difference between apex and batch classes are as follows :

    1. Batch class have increased governor limits then apex classes.
    2. Batch have  three methods that are mandatory (Start, Execute and finish) but apex class has no boundation of methods.
    3. Batch classes can be scheduled.
  • Ajit

    Member
    August 12, 2016 at 10:02 am

    Hi,

    I do not want this i want kind of apex detail in lightining

  • Ajit

    Member
    August 11, 2016 at 10:09 am

    Hi Piyush,

    I am not getting your actual problem but i wanted to access the a component from its Id so i did this.

     

    var test = component.find("cmpId1").find("cmpid2");

Viewing 1 - 25 of 91 posts