In my application i add contacts to contacts list by ContentProviderOperation.  In Galaxy 3 and 4 it's worked perfect. In Galaxy 2 i crash when i try to edit contact from the contacts list itself.  I google and read that this issue happen to some android developers in this case, but i don't find solution to this exception.  This my exception:  12-19 10:26:51.685: E/AndroidRuntime(6439): java.lang.NullPointerException 12-19 10:26:51.685: E/AndroidRuntime(6439):     at com.android.contacts.editor.ContactEditorFragment.bindEditors(ContactEditorFragment.java) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at com.android.contacts.editor.ContactEditorFragment.bindEditorsForExistingContact(ContactEditorFragment.java) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at com.android.contacts.editor.ContactEditorFragment.setData(ContactEditorFragment.java) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at com.android.contacts.editor.ContactEditorFragment$6.onLoadFinished(ContactEditorFragment.java) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at com.android.contacts.editor.ContactEditorFragment$6.onLoadFinished(ContactEditorFragment.java) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at android.app.LoaderManagerImpl$LoaderInfo.callOnLoadFinished(LoaderManager.java:438) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at android.app.LoaderManagerImpl$LoaderInfo.onLoadComplete(LoaderManager.java:406) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at android.content.Loader.deliverResult(Loader.java:125) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at com.android.contacts.ContactLoader$LoadContactTask.onPostExecute(ContactLoader.java) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at com.android.contacts.ContactLoader$LoadContactTask.onPostExecute(ContactLoader.java) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at android.os.AsyncTask.finish(AsyncTask.java:602) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at android.os.AsyncTask.access$600(AsyncTask.java:156) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:615) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at android.os.Handler.dispatchMessage(Handler.java:99) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at android.os.Looper.loop(Looper.java:137) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at android.app.ActivityThread.main(ActivityThread.java:4507) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at java.lang.reflect.Method.invokeNative(Native Method) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at java.lang.reflect.Method.invoke(Method.java:511) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557) 12-19 10:26:51.685: E/AndroidRuntime(6439):     at dalvik.system.NativeStart.main(Native Method)
129
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
121895
I have a trigger and a class that seem to be causing an insert fail in Dataloader.  I am trying to insert 200 records to see if an error is generated before moving these to production. I'm just inserting the mandatory fields such as Name, Owner, Market, Customer_Success_Manager__c, and Business Unit.   Each time I get an error:     UpdateCSMTeam:execution of AfterInsertcaused by: System.DmlException:   Insert failed. First exception on row 0 with id01MJ0000009gXthMAE;   first error: INVALID_FIELD_FOR_INSERT_UPDATE, cannot specify Id in an   insert call: [Id]Class.UpdateCSM.updateTeamMem . I've listed the class   and trigger below.   APEX CLASS  public class UpdateCSM {             public static void updateTeamMember(List&lt;Account&gt; accounts) {                     List&lt;AccountShare&gt; ashareLIST = new List&lt;AccountShare&gt;();                     List&lt;AccountTeamMember&gt; ATM = new List&lt;AccountTeamMember&gt;();                    Set&lt;String&gt; rmMember = new Set&lt;String&gt;();                     Map&lt;ID, ID&gt; acctToBRepMap = new Map&lt;ID, ID&gt;();                      for(Account a:accounts){                              AccountShare caSharingRule = new AccountShare();                                caSharingRule.AccountId = a.Id;                                caSharingRule.OpportunityAccessLevel = 'Edit';                                caSharingRule.CaseAccessLevel = 'Edit';                                caSharingRule.AccountAccessLevel = 'Edit';                                caSharingRule.UserOrGroupId = a.Customer_Success_Manager__c;                                ashareLIST.add(caSharingRule);                                    if(a.Customer_Success_Manager__c!= null){                                   AccountTeamMember Teammemberad=new AccountTeamMember();                 Teammemberad.AccountId=a.id;                 Teammemberad.UserId=a.Customer_Success_Manager__c;                 Teammemberad.TeamMemberRole = 'Customer Success Manager';                                   ATM.add(Teammemberad);                             if(!ATM.isEmpty()){                                    insert ATM;                                              insert ashareLIST;                                                         if(a.Customer_Success_Manager__c==null){                                            list&lt;AccountTeamMember&gt; ratm = [SELECT UserId                                                                             FROM AccountTeamMember                                                                             WHERE (TeamMemberRole = 'Customer Success Manager')                                                          AND AccountId =:a.id];                                             if(ratm.size()&gt;0)                                                 delete ratm;                                        }                                    }                                 }                            }                         }                    } ...   APEX TRIGGER  trigger UpdateCSMTeam on Account (After update, After insert){         UpdateCSM.updateTeamMember(trigger.new); }
41738
I have a Samsung Galaxy S3 with Verizon. I've recently rooted it and installed Cyanogenmod 10.1.  Of ocurse, when you buy the phone brand new, it comes with all the built-in apps from the manufacturer. With the Samsung Galaxy S3, I prefer their original dialer/contacts/messaging apps vs. the ones that comes with Cyanogenmod.  Is there anyway to get back the original dialer/contacts/messaging apps and replace the ones on Cyanogenmod? Is there anyway to change custom ROMs to your liking? Is there a apk of the original dialer/contacts/messaging S3 apps?  I'm new to the world of custom ROMs and rooting Android, so please, if you could, be specific and detailed as, most likely, I won't know where your coming from.  Thanks!
97199
I am going through the documentation found here SF Lightning Guide, and during the portion where they create the Contact List view on page 36 they cover the click event using the built in force namespace action: navigateToURL. No matter what I try - $A is null. I have debug enabled, and can see that the line immediately before that call is working fine, and receives the ID of the record for the component, but $A is always coming back null.  I have tried e.force, e.., e.c., etc and cant imagine that this is normal. Everything else has been pretty smooth - but then this came along and I have spent several hours looking for anyone experiencing the same thing. This is a last resort before I scrap both this component and the one above it and start again from scratch.  Error being thrown is:      Uncaught error in markup://ui:click : Cannot read property 'setParams'   of null   I am using the exact code from the document at this time. Any ideas to try appreciated.  The code below is being called when a user clicks on a ui:outputText.  The sObjectEvent variable is always null.   I am wondering why it is always null - I assume the force namespace is always available.   gotoRecord : function(component, event, helper) { // Fire the event to navigate to the contact record     var sObjectEvent = $A.get("e.force:navigateToSObject");     sObjectEvent.setParams({         "recordId": component.get("v.contact.Id"),         "slideDevName": 'related'     })     sObjectEvent.fire(); }   EDIT:   Not able to comment yet - Tried adding &lt;aura:dependency resource="markup://force:navigateToSObject" type="EVENT"/&gt; to the component and now the error is gone, but nothing happens when you click the text either.    Developer Console is showing that the Event is now being picked up, and that the Params are set properly - $fired$ is true, and the params contains recordId properly now.  I will play with moving some controls around and switching it from a ui:outputText to something else.  Thank you for the responses.
7576
I have a lookup to a custom object called Project on my Opportunity object. I am trying to write a trigger that updates an Active, Awarded, and Title on the Project object whenever the Active, Awarded, or Title field is updated on Opportunity based some on more logic that isn't in my code below. This is my first trigger and needing a little help due to a NullPointerException where I try to set Project__r.Active__c = true. Any thoughts?      trigger ProjectFieldsTrigger on Opportunity (before insert, before update) {       //List&lt;Opportunity&gt; opp = [SELECT Name, Active__c, Funded__c, Title__c, Project__r.Name, Project__r.Active__c, Project__r.Awarded__c      //  FROM Opportunity WHERE Id IN :Trigger.New];      for(Opportunity o: Trigger.New){          if(o.Project__c != null){              if(o.Active__c == 'Y'){                 o.Project__r.Active__c = true;             }      }  }
22246
@AuraEnabled(cacheable=true) public static String  deleteContacts(List&lt;String&gt; contactIds) {     List&lt;Contact&gt; returnList = new List&lt;Contact&gt; ();     String query = ' SELECT Id,Name, LastName,Department,MobilePhone, Email FROM Contact WHERE id IN : contactIds ';     for (Contact thisContact:  Database.Query(query)) {          returnList.add(thisContact);     }     try {       delete returnList;       return'deleted successfully';     }     catch(Exception ex){        return 'Problem occoured';     }  }  JS Method deleteSelected(){     deleteContacts({         contactIds :this.selectedIds     })      .then(result =&gt; {         this.dispatchEvent(             new ShowToastEvent({                 title: 'Success',                 message: result,                 variant: 'success',             }),         );         return refreshApex(this.getContactList, { searchKeyWord: '$searchKeyWord' });     })     .catch(error =&gt; {         this.error = error;     });
108773
My mom's Xiaomi phone started displaying the error message:  The Google application has suffered an error again. Please send a report to Xiaomi.  The code under the &quot;see more&quot; button is extensive, but the gist of it is that the &quot;EXCLUSIVE background task UPDATE_HOTWORD_MODELS crashed&quot;. The error message pops up every 2 seconds. What should I do to help my mom return her phone to a usable condition? Restarts do not help; I purged the settings of Google apps, that did not help either.
112290
This code throws a NullReferenceException when it calls ExecuteScalar:  selectedPassengerID = 0;  //SqlCommand command = GenericDataAccess.CreateCommand();   // 2nd test string connectionString = ""; SqlConnection conn;  connectionString = ConfigurationManager.     ConnectionStrings["ConnST-MHM"].ConnectionString; conn = new SqlConnection(connectionString); SqlCommand command = new SqlCommand(); command.CommandType = CommandType.StoredProcedure ; command.Connection = conn; command.CommandText = "SearchForPassenger";  SqlParameter param;  param = command.CreateParameter(); param.ParameterName = "@name"; param.Value = pName; // Session[""]; param.DbType = DbType.String; command.Parameters.Add(param);  param = command.CreateParameter(); param.ParameterName = "@flightDate"; param.Value = date;  param.DbType = DbType.String; command.Parameters.Add(param);  param = command.CreateParameter(); param.ParameterName = "@ticketNo"; param.Value = ticketNumber;  param.DbType = DbType.Int32; command.Parameters.Add(param);  int item;  command.Connection.Open(); item = (int)command.ExecuteScalar();
4404
Im getting above error when i was trying to run my test class. In my test class i will create an Account, Contact. And this contact id will be used in my original code to create Community user.  I noticed following help article from SFDC. But couldn't figure out how to achieve.   Here they asked to create User on the Test class and Runas this user. But in my case, the community user will be created in the code. Please share any thoughts.  Here is the detailed exception,     System.DmlException: Insert failed. First exception on row 0; first   error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, caused by:   System.DmlException: Insert failed. First exception on row 11; first   error: UNKNOWN_EXCEPTION, portal account owner must have a role: []
56738
In Field Service Lightning I have a Trigger on ServiceReport which sends an email with attachment coming from ContentVersion.   This is the Test class I have written.  @isTest  private class testCreateServiceReport{       static testMethod void validateWO() {       WorkOrder wo = new WorkOrder();       wo.subject = 'Testing';       insert wo;       ServiceAppointment sa = new ServiceAppointment();       sa.ParentRecordId = wo.Id;       sa.EarliestStartTime = DateTime.now();       sa.DueDate = DateTime.now();       insert sa;       List&lt;ServiceReportLayout&gt; srl = [Select Id FROM ServiceReportLayout];       ServiceReport sr = new ServiceReport();       sr.ParentId = sa.Id;       sr.Template = srl[0].Id; //Need to check if there is a way to avoid srl[0] notation       insert sr; //If I comment this the text result is pass. When I enable it I get too see the below mentioned error.  }  }   This is the error Methods defined as TestMethod do not support Web service callouts I know that we need to write Test Classes for code that involves web service callouts using setMock() but I dont understand in what way inserting ServiceReport is related to making a callout.  Any help on this will be really helpful.
103112
When and why would somebody do the following:  doSomething( (MyClass) null );   Have you ever done this? Could you please share your experience?
72742
My question is related to .  So I have a person added to my , with phone number and e-mail. Person's e-mail is on gmail.com.  Every Gmail account is not just e-mail, but also is Google Hangouts account. So this person could be reached via hangouts.  Out from the box, when adding person to Google contacts, you don't really add him or her to your Hangouts contact list (I have 500+ at-gmail-contacts in my google contacts, but only 10-20 of them are in hangouts contacts). But when you start hangouts chat with this person (from Gmail web-page, or from Android Hangouts app, etc.), person's contact get added to hangouts contacts.  Then, you could use hangouts via "classical" XMPP, using your favourite client app (I use Kopete). When connecting to Google via XMPP with your Gmail login and password, your Jabber client get contact list, which is the same as your Hangouts contact list. So, it contains every person you ever chat via Hangouts.  My question is: how to delete person from Hangouts (or from XMPP, in certain case) contact list, not deleting it from ?  The only option I  is to "block" this contact in Hangouts, but I don't want to: blocking is useful, when you want to get rid of annoying companion or spammer, but sometimes you want just to clean-up your contact list form persons which are not active for the long time, but you don't really mean you don't want them to write you in the future.
86522
I created a Journey Builder Interaction and turned it on to TEST mode.  The Event Source for the interaction is a sendable Data Extension which is updated (via the API) every time someone new signs up through our website.  Contacts who do not already exist in 'All Subscribers' fail to enter the Journey Builder Interaction, and this is the error thrown:  Failed - ExactTarget.InteractionStudio.Activities.AllowMultipleDecision.ContactKey: Error binding data bound member.   Question #1: Does a contact have to exist in All Subscribers to be accepted into an interaction?  Question #2: How can I add contacts to All Subscribers when they first flow through Journey Builder?
24091
This is a bit of a more unusual bug to report:    The screenshot above is unedited - the black box is rendered by the Stack Exchange application.  Phone:  running Android 4.0.4 (ICS)
119160
This Trigger is on lead (Before Insert, Before Update) and it errors (System.NullPointerException: Attempt to de-reference a null object). I'm getting this error when i'm posting "Web to Lead". However i do have the right ORG iD and Record type id included on the xml file:   &lt;input type=hidden name="oid" value="xxxxxxxxxxxxx"&gt; &lt;input type=hidden name="recordType" id="recordType" value="zzzzzzzzzzzzzzzzzz"&gt;    trigger IAAILeadTrigger on Lead (before insert, before update){ //BEGIN: S-444340 T-561808 - Process only IAA Remarketing Recordtype data     Map&lt;ID,Schema.RecordTypeInfo&gt; rt_Map = Lead.sObjectType.getDescribe().getRecordTypeInfosById();      //Looks up the branches based on the Lead PostalCode     if(trigger.isBefore){          for(Lead ld : trigger.new){                      if (rt_map.get(ld.recordTypeID).getName().containsIgnoreCase('IAA Remarketing') )                if( trigger.isInsert ||                    (trigger.isUpdate &amp;&amp; ld.Branch__c == null) ||                   (trigger.isUpdate &amp;&amp; ld.PostalCode != trigger.oldMap.get(ld.id).PostalCode)               ){                   leads.add(ld);               }           }           }                 //Only check the leads that are in the lead list and NOT the full trigger.new list         if(!leads.isEmpty()){             LeadController.GetLeadBranches(leads);           }     }  }
25839
Error Message:     Developer script exception from Nicomatic : quotepotential :   quotepotential: execution of AfterUpdate caused by:   System.DmlException: Update failed. First exception on row 0 with id   a0Q90000005PoxtEAC; first error: UNABLE_TO_LOCK_ROW, unable to obtain   exclusive access to this record: [] Trigger.quotepotential: line 14,   column 1      Apex script unhandled trigger exception by user/organization:   00590000001A6jh/00D90000000bovq      quotepotential: execution of AfterUpdate      caused by: System.DmlException: Update failed. First exception on row   0 with id a0Q90000005PoxtEAC; first error: UNABLE_TO_LOCK_ROW, unable   to obtain exclusive access to this record: []      Trigger.quotepotential: line 14, column 1   these mails are getting to my mail..........  trigger quotepotential on Quote_Line_Item__c (after insert,after update) {     Set&lt;Id&gt; quoteIds = new Set&lt;Id&gt;();     List&lt;Quote__c&gt; quotes = new List&lt;Quote__c&gt;();     for (Quote_Line_Item__c record: Trigger.new) {         if (record.Quote1__c != null){             quoteIds.add(record.Quote1__c);         }     }     for(AggregateResult ar:[                 SELECT                      Quote1__c,                      SUM(Max_Batch__c)sumMax                  FROM Quote_Line_Item__c                  WHERE Quote1__c=:quoteIds                  GROUP BY Quote1__c                 ]) {          quotes.add(new Quote__c(              Id=(Id) ar.get('Quote1__c'),              Potential__c = (Decimal) ar.get('sumMax')              ));     }     if (quotes.isempty() == false) {         update quotes;     } }
23705
Settings -> Applications -> All tells me that "Contacts Storage" uses 2.5MB which must be my contact data.  Since I had to revert to 4.03 after a faulty update to 4.1 my contacts seem inaccessible although the data seems to be there.  Could you please tell me where to find the associated data(base) for Contacts Storage? My phone is rooted. And no, my contact data is not on GMail and I honestly don't know why...