• Timmy Ahluwalia
  • NEWBIE
  • 85 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 29
    Questions
  • 39
    Replies
Hello,
The chat is on the web site an the slds will fail there.
In the Embedded SnapIns Prechat form i want to hide the FirstName and the lastName. The code is pasted below, the firstname will hide but the picklist field will not show the options.
Please advice how to fix this.
Thanks

 var componentInfoArray = [];
            if(field.type === "inputSplitName"){
           componentInfoArray.push("input");
         //       attributes.input="hidden";
                 attributes.type ="hidden";
            }
     else if 
   
             (field.type === "inputSelect" && field.picklistOptions) {
              componentInfoArray.push("select");
                  attributes.options = "picklistOptions";
                attributes.input = "select";
         } else {
            componentInfoArray.push("input");
          }
 
Hi,
I want to download the transcript from the chat window in the PDF format Need help, if someone can provide the code.
Thanks
 
Hi,
I am building component where i am displaying the events of the particular date which users enter the lightning search component.
I am unable to display all the events seems like some time conversion problem.
I have tried to convert the date to GMT and then using the date to quiry the events but still i am missing the events and also the all day events.
Pleae advice.
Thanks.
Hi,
On Event object there are two fileds StartDateTime and EndDateTime,
on the aura component (not on the controller) how can i check that enddatetime of the event is greater than the startdatetime by 2 days.
then i want ot display Multiday event.
Thanks
Hi,
i have one custom datatable on the home page it has a button which calls the other component, which is adding notes, once i cancel or save the recordsit redirect to the main home page, now when we go to the next line of datatable and click the button it calls the notes component but the one from the previous datatable line.
i have debuge and checked the main component is picking   up the fresh row and the event id and then navigating service is redirecting to the other component but it still shows the prvious line event notes.

in the adding notes i am using recorddata to load the data, it seems as the tne prevous line adding notes is still open in the background and when we go to the next line it still shows the previous line notes.

Please suggest.
Thanks
HI,
I am trying to write the soql on event to fetch the custom field on USER object its failing. Please advise with some example.
Thanks
Hi,
on my Account lightning page there is a field 'Code', how can i hover over this field and get the information of the company name.
Thanks
Hi,
I want to create a lightning component which will get list of users and ability to sign on into there account.
This tool will be used by the support staff.
Hi,
I want to create a lightning component which will get list of users and ability to sign on into there account.
This tool will be used by the support staff.
Please advice.
Thanks
Hi,
my custom object has a lookup with USer object-- createdBY
i am trying to fetch the data from custom object as
createdby.name but the field is not fetching, please help with this.
Thanks
Hi,
i am generating a list of Id in one method and i want to use that list in the other method to fetch data.
My program was working but all of sudden i am getting message as Attempt to de-reference a null object.
I found that the list is not asseccible in other methods.
Hi,
I am getting this error, i have check all the configrations of  challange
12:53:52:269 CALLOUT_RESPONSE [38]|System.HttpResponse[Status=Bad Request, StatusCode=400]
public class ProjectCalloutService {
    @InvocableMethod
    //Complete the implementation for business and callout logic
    public static void postOpportunityToPMS(list<Id> OpportunityId){
        list<opportunity> oppselected = [select Id, Name, Account.Name, CloseDate, Amount from opportunity where Id= :opportunityId ];
        system.debug('6 '+oppselected);
        system.enqueueJob(new QueueablePMSCall(oppselected));
    }
    
    public class QueueablePMSCall implements system.Queueable, Database.AllowsCallouts{
        List<opportunity> oppselected;
        public QueueablePMSCall(list<Opportunity>oppselected){
           this.oppselected = oppselected;
            system.debug('16 '+oppselected);
        }
        public void execute(QueueableContext context){
             
            String s2 = jsonoppselected(oppselected);
      //      system.debug(s2);
          InvokeCall(s2);
        }
    }
     
        public static Httpresponse InvokeCall(string s2){
        //    system.debug(s2);
            ServiceTokens__c serviceToken = ServiceTokens__c.getvalues('ProjectServiceToken');
         
            system.debug(serviceToken);
            Http http = new Http();
            HttpRequest request = new HttpRequest();
          //  request.setEndpoint('https://sb-integration-pms.herokuapp.com/projects');
            request.setEndpoint('callout:ProjectService');
            request.setMethod('POST');
            request.setHeader('Content-Type', 'application/json');
            request.setHeader('token', 'serviceToken');
            request.setBody(s2);
            
            HttpResponse response = http.send(request);
      
       //     system.debug(response.getStatusCode() + response.getStatus());
            if(response.getStatusCode()!=201){
                system.debug(response.getStatusCode() + response.getStatus());
            }else if(response.getStatusCode()==400){
                system.debug(response.getBody());
            }
            return response;
        }
      
        public static string jsonoppselected(list<opportunity> oppselected){
          system.debug(oppselected);
            JSONGenerator gen = JSON.createGenerator(true);
            gen.writeStartArray();
            for(Opportunity o : oppselected){
                gen.writeStartObject();
                gen.writeIdField('opportunityId', o.Id);
                gen.writeStringField('opportunityName', o.Name);
                 gen.writeStringField('accountName', o.Account.Name);
                gen.writeDateField('closeDate', o.CloseDate);
                gen.writeNumberField('amount', o.Amount);
               
                gen.writeEndObject();
            }
            gen.writeEndArray();
            system.debug(gen.getAsString());
            return gen.getAsString();
        }

    }
 
Hi,
There are lot of report folders I want to change the access of all the report folder to "Manage",  and couple of folders i want to add public groups which have full acess to all the folders.
May be by Meta data or programatically, please advise.
Thanks
Hi,
We have one bulkified trigger on custom object.
i want to use that same trigger to update all the records in the system, how can i execute the trigger which will update 1000 records in the system.
Thanks. 
HI,
I am trying to fetch the values from the map and then updating the field value on Account.
Having trouble, please help.
Thanks
    public MapAccount(){
       
        Map<Id, List<Contact>> mapcont = new Map<Id, List<Contact>>();
list<Account> acc= [select id,name from Account limit 5];
  
       set<ID> SetAccount = new set<ID>();
        for(Account k: acc){
            SetAccount.add(k.Id);
            mapcont.put(k.id, new list<contact>());
        }
        system.debug(mapcont);
        for(contact c:[select Accountid, firstname,lastname from contact where accountId IN :SetAccount])
            if(mapcont.containskey(c.accountid)){
                list<contact> con1 = mapcont.get(c.accountid); 
                con1.add(c);
                mapcont.put(c.id, con1);
            }
            system.debug(mapcont); 
            list<aCCOUNT> upacc = new list<Account>();
        for(account a1: acc){
            if(mapcont.containskey(a1.id)){
                account accnew = new account();
                //want to fetch the firstname from the mapcont and update account, 
                //i am unable to get the firstname from the map
                accnew.New_contact_Name__c = mapcont.get(a1.ID).firstname;

            }
        }
         }
    }
How can i get the child record in the record view form as i have a Record view form which is disp;aying data from the Account object and i want to display the contact on it.
Thanks
My query:
 SELECT Fund__r.Related_Mandate__r.Name,Fund__r.Related_Mandate__r.French_Mandate_Name__c, SUM(Purchases__c) purchases, SUM(Redemptions__c) redemptions, 
                                       SUM(Switches_In__c) switchesIn, SUM(Switches_Out__c) switchesOut, SUM(Assets__c) assets 
                                       FROM Yearly_Metrics__c WHERE Rep_Code__c IN :repCodes AND Date__c=THIS_YEAR 
                                       GROUP BY Fund__r.Related_Mandate__r.Name,Fund__r.Related_Mandate__r.French_Mandate_Name__c ORDER BY SUM(Assets__c) DESC ]
Having trouble displaying the filed Fund__r.Related_Mandate__r.French_Mandate_Name__c on VF page
for  Fund__r.Related_Mandate__r.Name i used (!m.Name)
 
Hi,
The code is pasted below i am getting Invalid Qury Locator. Please advise.
Thanks
for (Branch__c b : (List<Branch__c>) batch) {
            groups.put(b.Id, new Group(
                Name = 'Branch: ' + b.Name,
                Type = 'Regular',
                DoesIncludeBosses = false,
                DeveloperName = b.Id
              
    
            ));
                system.debug(batch);// Branch Id
            for (AADB_Associate__c a : b.AADB_Associates__r) {
                if (users.containsKey(a.Associate_ID__c)) {
                     system.debug(a.Associate_ID__c);
                    validGroupMembers.add(b.Id + '|' + users.get(a.Associate_ID__c));
                      system.debug(b.Id + '|' + users.get(a.Associate_ID__c));
                }
                  system.debug(a);
            }
          
        }
Hi,
Created a datatable to update the multiple records but this is not supported on the Mobile. 

So I  am iterating a record edit form and want to change the status of selected records to active.
How can i get this done.
Thanks
Hi,
I am updating the datatable rows in lightning by selecting the selectedRows() .
when I am reloading the datatable the check box, SELECTION is still checked.
How do I get the selection to be false.
Thanks 
Hi,
I am building component where i am displaying the events of the particular date which users enter the lightning search component.
I am unable to display all the events seems like some time conversion problem.
I have tried to convert the date to GMT and then using the date to quiry the events but still i am missing the events and also the all day events.
Pleae advice.
Thanks.
Hi,
On Event object there are two fileds StartDateTime and EndDateTime,
on the aura component (not on the controller) how can i check that enddatetime of the event is greater than the startdatetime by 2 days.
then i want ot display Multiday event.
Thanks
HI,
I am trying to write the soql on event to fetch the custom field on USER object its failing. Please advise with some example.
Thanks
Hi,
i am generating a list of Id in one method and i want to use that list in the other method to fetch data.
My program was working but all of sudden i am getting message as Attempt to de-reference a null object.
I found that the list is not asseccible in other methods.
Hi,
There are lot of report folders I want to change the access of all the report folder to "Manage",  and couple of folders i want to add public groups which have full acess to all the folders.
May be by Meta data or programatically, please advise.
Thanks
Hi,
We have one bulkified trigger on custom object.
i want to use that same trigger to update all the records in the system, how can i execute the trigger which will update 1000 records in the system.
Thanks. 
HI,
I am trying to fetch the values from the map and then updating the field value on Account.
Having trouble, please help.
Thanks
    public MapAccount(){
       
        Map<Id, List<Contact>> mapcont = new Map<Id, List<Contact>>();
list<Account> acc= [select id,name from Account limit 5];
  
       set<ID> SetAccount = new set<ID>();
        for(Account k: acc){
            SetAccount.add(k.Id);
            mapcont.put(k.id, new list<contact>());
        }
        system.debug(mapcont);
        for(contact c:[select Accountid, firstname,lastname from contact where accountId IN :SetAccount])
            if(mapcont.containskey(c.accountid)){
                list<contact> con1 = mapcont.get(c.accountid); 
                con1.add(c);
                mapcont.put(c.id, con1);
            }
            system.debug(mapcont); 
            list<aCCOUNT> upacc = new list<Account>();
        for(account a1: acc){
            if(mapcont.containskey(a1.id)){
                account accnew = new account();
                //want to fetch the firstname from the mapcont and update account, 
                //i am unable to get the firstname from the map
                accnew.New_contact_Name__c = mapcont.get(a1.ID).firstname;

            }
        }
         }
    }
Hi,
The code is pasted below i am getting Invalid Qury Locator. Please advise.
Thanks
for (Branch__c b : (List<Branch__c>) batch) {
            groups.put(b.Id, new Group(
                Name = 'Branch: ' + b.Name,
                Type = 'Regular',
                DoesIncludeBosses = false,
                DeveloperName = b.Id
              
    
            ));
                system.debug(batch);// Branch Id
            for (AADB_Associate__c a : b.AADB_Associates__r) {
                if (users.containsKey(a.Associate_ID__c)) {
                     system.debug(a.Associate_ID__c);
                    validGroupMembers.add(b.Id + '|' + users.get(a.Associate_ID__c));
                      system.debug(b.Id + '|' + users.get(a.Associate_ID__c));
                }
                  system.debug(a);
            }
          
        }
Hi,
Created a datatable to update the multiple records but this is not supported on the Mobile. 

So I  am iterating a record edit form and want to change the status of selected records to active.
How can i get this done.
Thanks
Hi,
I am updating the datatable rows in lightning by selecting the selectedRows() .
when I am reloading the datatable the check box, SELECTION is still checked.
How do I get the selection to be false.
Thanks