I have a privileges everywhere, but where i deploy a project with webParts, Visual studio, show me following error :     Error 1   Error occurred in deployment step 'Recycle IIS Application Pool': Object reference not set to an instance of an object.   How to solve this proble. Thank you previously!
123206
I get this error in the deployment step of a share-point farm based project. Most of the suggested solutions on the net are a simple Visual Studio re-start, however, a simple VS restart won't fix this.   Any ideas on what might be causing this?
52560
I am getting "Error System.QueryException: List has no rows for assignment to SObject".   Line 1: Account ac = [select id from Account where name='testaccount' limit 1] Line 2: if(ac != null) {           //do something         }   I got the above error in line 2 if there is no record.   Any help?
53667
How can we avoid the Globally Deployment of a WSP using Visual Studio 2010?
110175
I am receiving an error stated above on line 26**(listAccount1)**, can anyone guide me on how to solve it?  public class FRB_UpdateExceptionsforBatch {    public static void FRB_Exceptions(){    string FRBRecordTypeID = utility.getFRBProfileNameLabel();       List&lt;Account&gt; lstAccount = new List&lt;Account&gt;();         List&lt;Account&gt; lstAccount1 = new List&lt;Account&gt;();         List&lt;Account&gt; lstAccount2 = new List&lt;Account&gt;();         List&lt;Account&gt; lstAccount3 = new List&lt;Account&gt;();    lstAccount = [Select id,FRB_Firm_Check__c,Number_of_Exception__c,Number_of_exceptions_under_4_6_bucket__c,Number_of_exceptions_under_7_10_bucket__c,Number_of_exceptions_under_11_19_bucket__c,(select id,Account_Standing__c from Process_Adherence_Monitoring__r  where Status__C != 'Closed' AND  recordtypeId =: FRBRecordTypeID AND Account_Standing__c = '0-3 Days (Green - New Exception)' ) FROM Account WHERE FRB_Firm_Check__c = TRUE];     if(lstAccount.size()&gt;0){           for( Account acc : lstAccount )           {               List&lt;Process_Adherence_Monitoring__c&gt; lstCont = acc.Process_Adherence_Monitoring__r;                acc.Number_of_Exception__c = lstCont.size();               acc.FRB_Firm_Check__c = true;           }            update lstAccount;     }         //To update 4-6 bucket      lstAccount1 = [select Id, Name,FRB_Firm_Check__c, Number_of_exceptions_under_4_6_bucket__c,(select id,Account_Standing__c from Process_Adherence_Monitoring__r  where Status__C != 'Closed' AND  recordtypeId =: FRBRecordTypeID AND Account_Standing__c = '4-6 Days (Yellow - Outside Correction Timeframe)' ) from Account where FRB_Firm_Check__c = TRUE];        if(lstAccount1.size()&gt;0){           for( Account acc : lstAccount1 )           {               List&lt;Process_Adherence_Monitoring__c&gt; lstCont1 = acc.Process_Adherence_Monitoring__r;                              acc.Number_of_exceptions_under_4_6_bucket__c= lstCont1.size();               acc.FRB_Firm_Check__c = true;           }            update lstAccount1 ;       }         //To update 6-11 bucket         lstAccount2 =  [select Id, Name,FRB_Firm_Check__c, Number_of_exceptions_under_7_10_bucket__c,(select id,Account_Standing__c from Process_Adherence_Monitoring__r  where Status__C != 'Closed' AND  recordtypeId =: FRBRecordTypeID AND Account_Standing__c = '7-10 Days (Orange - Approaching Critical Timeframe)' ) from Account where FRB_Firm_Check__c = TRUE];        if(lstAccount2.size()&gt;0){           for( Account acc : lstAccount2 )           {               List&lt;Process_Adherence_Monitoring__c&gt; lstCont2 = acc.Process_Adherence_Monitoring__r;                acc.Number_of_exceptions_under_7_10_bucket__c= lstCont2.size();               acc.FRB_Firm_Check__c = true;           }           update lstAccount2 ;       }        //To update 11 bucket            lstAccount3 =  [select Id, Name,FRB_Firm_Check__c, Number_of_exceptions_under_11_19_bucket__c,(select id,Account_Standing__c from Process_Adherence_Monitoring__r  where Status__C != 'Closed' AND  recordtypeId =: FRBRecordTypeID AND Account_Standing__c = '11-19 Days (Red - Immediate Correction Required)' ) from Account where FRB_Firm_Check__c = TRUE];        if(lstAccount3.size()&gt;0){           for( Account acc : lstAccount3 )           {               List&lt;Process_Adherence_Monitoring__c&gt; lstCont3 = acc.Process_Adherence_Monitoring__r;                acc.Number_of_exceptions_under_11_19_bucket__c= lstCont3.size();               acc.FRB_Firm_Check__c = true;           }                              update lstAccount3 ;       }      }   }
101111
We've had a community deployment and my brain is fried and I just whipped up a quick class that is throwing the below error. What have I done wrong here?     Error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, MSI_UserTrigger:   execution of AfterInsert caused by: System.StringException: Invalid   id: () : [] () : []: ()   What I am trying to accomplish is:   When a new user is created and is active, if they are linked to a ContactId and part of a specific profile (by name), add their ContactId to a Set&lt;ID> Then loop through contacts where the Id is in the set, and update the Community_User__c field to TRUE      Trigger:   trigger MSI_UserTrigger on User (after insert) {       if(Trigger.isAfter){          if(Trigger.isInsert){              MSIUserTriggerHandler.executeAfterInsert(Trigger.new);          }      } }      Class:   public with sharing class MSIUserTriggerHandler {     private static final String COMMUNITY_PROFILE = 'Community Knowledge User';     private MSIUserTriggerHandler() {}      public static void executeAfterInsert(List&lt;User&gt; newList){         setCreatedCommunityUsers(newList);     }      private static void setCreatedCommunityUsers(List&lt;User&gt; newList){         List&lt;User&gt; usersWithContacts = new List&lt;User&gt;();         List&lt;Contact&gt; contactsToUpdate = new List&lt;Contact&gt;();         Set&lt;ID&gt; contactIds = new Set&lt;ID&gt;();          for(User u: newList){             if(u.ContactId == null &amp;&amp; u.ContactId == ''){                 continue;             }             if((u.ContactId != null &amp;&amp; u.ContactId != '') &amp;&amp; u.Profile.Name == COMMUNITY_PROFILE &amp;&amp; u.isActive == true){                 contactIds.add(u.ContactId);             }         }          for(Contact c : [Select Id,Name,Community_User_Created__c from Contact where Id in :contactIds]){             if(!c.Community_User_Created__c){                 c.Community_User_Created__c = true;                 contactsToUpdate.add(c);             }         }         update contactsToUpdate;     } }   Am I not adding the ID correctly to the Set&lt;ID>, or am I querying wrong in my for(Contacts) loop?
118291
I’m trying to deploy custom objects, custom fields, page layouts, compact layouts, Lightning pages and Global value set (global picklist) , when uploading changeset it is giving me API version error as out production platform version 46.0 and SB version is 47.0 , I’m not sure how to bring the version down to 46.0 (There are no Apex triggers/classes in the changeset). Any help would be really appreciated.
74758
I want to deploy my solution to a single web application. I used the following script:  Add-SPSolution -c:/mywebpart.wsp  Install-SPSolution mywebpart.wsp -WebApplication "SharePoint Debugging" -GacDeployment   But the solution is now available in the 'Site Collection Features' list of all web applications.  I know I can deactivate the feature on the web applications where I don't use it, but I don't want it to be deployed to those web applications. How can I deploy the solution so my web part is only available in a certain web application. The idea is that I want to be using the same web parts in the different web applications, but they have minor changes for each different web application. So I want to deploy version 1.1 to web application A and deploy version 1.2 to web application B
439
Consider:  namespace WindowsApplication1 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          private void button1_Click(object sender, EventArgs e)         {             //int[] val = { 0, 0};             int val;             if (textBox1.Text == "")             {                 MessageBox.Show("Input any no");             }             else             {                 val = Convert.ToInt32(textBox1.Text);                 Thread ot1 = new Thread(new ParameterizedThreadStart(SumData));                 ot1.Start(val);             }         }          private static void ReadData(object state)         {             System.Windows.Forms.Application.Run();         }          void setTextboxText(int result)         {             if (this.InvokeRequired)             {                 this.Invoke(new IntDelegate(SetTextboxTextSafe), new object[] { result });             }             else             {                 SetTextboxTextSafe(result);             }         }          void SetTextboxTextSafe(int result)         {             label1.Text = result.ToString();         }          private static void SumData(object state)         {             int result;             //int[] icount = (int[])state;             int icount = (int)state;              for (int i = icount; i &gt; 0; i--)             {                 result += i;                 System.Threading.Thread.Sleep(1000);             }             setTextboxText(result);         }          delegate void IntDelegate(int result);          private void button2_Click(object sender, EventArgs e)         {             Application.Exit();         }     } }   Why is this error occurring?     An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.setTextboxText(int)
72335
I renamed my project from MyProjectName to MyNewProjectName.  I did a complete find/replace on the solution and changed the test project aswell.  In Default.aspx.cs I get an InvalidOpterationException with   "The controller name 'Home' is ambiguous between the following types: MyNewProjectName.Controllers.HomeController MyProjectName.Controllers.HomeController."  How do i fix that?  Thanks
104149
When an exception is thrown in an Asp.Net web page, an error message is displayed with the complete stack trace.    Example below:       Stack Trace:     IndexOutOfRangeException: Index was outside the bounds of the array.    MyNameSpace.SPAPP.ViewDetailsCodeBehind.LoadView()  +5112   MyNameSpace.SPAPP.ViewDetailsCodeBehind.Page_Load(Object sender, EventArgs e) +67   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +13   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +43   System.Web.UI.Control.OnLoad(EventArgs e) +98   ... ...   The problem is that the Line number displayed does not correspond to the line in my code that originated the exception. In the example above, the stack shows line number 5111, yet my code behind .cs file only has 250 lines!  The aspx page is stored in a SharePoint site and the Assembly with the code behind has been deployed to GAC. Also, I've compiled in Debug mode. Given the settings above, how can I find out what line in my code caused the Exception?    Clarification as pointed out by :     In Release mode the number in front of the exception is NOT the line of code. Instead it's an offset to the native compiled code, which doesn't have any meaning to humans. More about this here:       In debug mode the PDB file will automatically map the native code offset to your .cs line in code and the number displayed WILL be the corresponding line in code.
101821
while making a call from php i am getting the error      Attempt to de-reference a null object Class.Demo.Insert:   What is problem in my webservice?  global class Ctest{     global class RequestClass{         webservice String accName;     }      webservice static void   cInsert(RequestClass req){         Account a1 = new Account();         a1.Name = req.accName;         insert a1;     } }   And Our Php Code Is  require_once('salesforceAPI/soapclient/SforceEnterpriseClient.php'); require_once('salesforceAPI/soapclient/SforceHeaderOptions.php');  $sfdc = new SforceEnterpriseClient(); $SoapClient = $sfdc-&gt;createConnection('enterprise.wsdl.xml');  $loginResult = false;  $loginResult = $sfdc-&gt;login(USER, PASSWORD . SECURITY_KEY);  $parsedURL = parse_url($sfdc-&gt;getLocation()); define("_SFDC_SERVER_", substr($parsedURL['host'], 0, strpos($parsedURL['host'], '.'))); define("_WS_NAME_", 'salesforceAPI/Ctest'); define("_WS_WSDL_", _WS_NAME_ . '.xml'); define("_WS_ENDPOINT_", 'https://' . _SFDC_SERVER_ . '.salesforce.com/services/wsdl/class/' . _WS_NAME_); define("_WS_NAMESPACE_", 'http://soap.sforce.com/schemas/class/' . _WS_NAME_);  $client = new SoapClient(_WS_WSDL_); $sforce_header = new SoapHeader(_WS_NAMESPACE_, "SessionHeader", array("sessionId" =&gt; $sfdc-&gt;getSessionId())); $client-&gt;__setSoapHeaders(array($sforce_header));  $method = $client-&gt;__getFunctions();  $wsParams = array('accName' =&gt; 'XXXXXXX');  $client-&gt;cInsert($wsParams)
78148
Im trying to rename a site collection by changing the url by using this PowerShell   $site = get-spsite -identity http://xxx:9000/sites/SCOne $site.Rename("http://xxx:9000/sites/SCOneNew")   I got this message     Exception calling "Rename" with "1" argument(s): "Cannot rename a site collection     with recycled items. Empty the site recycle bin of site collectio   The recycle bin is empty now but I still can't rename and I get the same message.   I have tried this PowerShell to get count of items in recycle bin    $site = get-spsite http://xxx:9000/sites/SCOne Write-Host $site.RecycleBin.Count.ToString();   but it says     you cannot call a method on a null-valued expression
63934
I need a list of SharePoint objects which need to be disposed.  This is for code analysis purpose. I have got a code review today and want a quick list of the objects to look out for in the code.  UPDATE Here is what to dispose and what not to dispose, if there is anything more to add then kindly advise:-  Dispose the SPWeb obtained by iterating over the Site.AllWebs collection  SPC110201: Dispose created SPSite objects  SPC110203: Dispose SPWeb objects created with SPSite.OpenWeb  SPC110204: Dispose SPSite objects created with SPSite.SelfServiceCreateSite  SPC110205: Dispose SPWeb created by SPLimitedWebPartManager  SPC110211: Dispose SPSite created by SPSiteCollection.Add  SPC110212: Dispose SPSite created by SPSiteCollection[] index operator  SPC110213: Dispose SPWeb created by SPWebCollection.Add  SPC110214: Dispose SPWeb created by SPWebCollection[] index operator  SPC110231: Do not dispose SPListEventProperties.Web  SPC110232: Do not dispose SPWebEventProperties.Web  SPC110233: Do not dispose SPItemEventProperties.Web  SPC110234: Do not dispose SPItemEventProperties.ListItem.Web  SPC110235: Do not dispose SPItemEventProperties.Web.Site  SPC110236: Do not dispose SPItemEventProperties.ListItem.Web.Site  SPC110237: Do not dispose SPFeatureReceiverProperties.Feature.Parent  SPC110241: Do not dispose SPSite.RootWeb  SPC110242: Do not dispose SPWeb.ParentWeb  SPC110243: Do not dispose SPList.ParentWeb  SPC110244: Do not dispose SPSite returned by SPControl.GetContextSite  SPC110245: Do not dispose SPWeb returned by SPControl.GetContextWeb  SPC110246: Do not dispose SPSite returned by SPContext.Current.Site  SPC110247: Do not dispose SPWeb returned by SPContext.Current.Web  SPC110261: Close PublishingWeb created by PublishingWeb.GetPublishingWebs[] index operator  SPC110262: Close PublishingWeb created by PublishingWeb.GetVariation  SPC110263: Close PublishingWeb created by PublishingWebCollection.Add  SPC110281: Dispose SPSite created with UserProfiles.PersonalSite  Reference:
118175
Not able to find Sharing object for custom object Apttus_Proposal__Proposal__Share; giving me error while   List&lt;Apttus__APTS_Agreement__share&gt; st = new List&lt;Apttus__APTS_Agreement__c&gt;();
47201
I have two sites that were originally migrated from SPS2003.  It worked well in SharePoint 2007 and even on SharePoint 2010,  however when we migrated it to SharePoint 2013,  the home page throws following errors on the ULS Log.     5/24/2013 09:57:46.62  w3wp.exe (0x0D50)   0x1D24  SharePoint Foundation   Files   ak8dj   High   UserAgent not available, file operations may not be optimized.    at Microsoft.SharePoint.SPFileStreamManager.CreateCobaltStreamContainer(SPFileStreamStore spfs, ILockBytes ilb, Boolean copyOnFirstWrite, Boolean disposeIlb)     at Microsoft.SharePoint.SPFileStreamManager.SetInputLockBytes(SPFileInfo&amp; fileInfo, SqlSession session, PrefetchResult prefetchResult)        05/24/2013 09:57:46.62 w3wp.exe (0x0D50)   0x1D24  SharePoint Foundation   Cobalt  ajoii   Medium   Mapping Store error to Cobalt error. [Store Error: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.CoordinatedStreamBuffer.SPCoordinatedStreamBufferFactory.CreateFromDocParams(SqlSession session, Guid guidSiteId, Int32 cbContent, Nullable1 parentId, Guid docId, Nullable1 level, SPChunkedArray`1 rgbContent, Byte[] rgbRbsId, Int64 bsn, Byte partition, Int32 pageSize, Boolean bStartFilling)        05/24/2013 09:57:46.62 w3wp.exe (0x0D50)   0x1D24  SharePoint Foundation   Cobalt  aintx   High    Failed in CobaltStream.LockBytes: ErrorException --- Error: Unknown (Win32=0x80004003) --- Error message: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.CoordinatedStreamBuffer.SPCoordinatedStreamBufferFactory.CreateFromDocParams(SqlSession session, Guid guidSiteId, Int32 cbContent, Nullable1 parentId, Guid docId, Nullable1 level, SPChunkedArray`1 rgbContent, Byte[] rgbRbsId, Int64 bsn, Byte partition, Int32 pageSize, Boolean bStartFilling)     at         05/24/2013 09:57:46.64 w3wp.exe (0x0D50)   0x1D24  SharePoint Foundation   Files   ak8dj   High    UserAgent not available, file operations may not be optimized.    at Microsoft.SharePoint.SPFileStreamManager.CreateCobaltStreamContainer(SPFileStreamStore spfs, ILockBytes ilb, Boolean copyOnFirstWrite, Boolean disposeIlb)     at Microsoft.SharePoint.SPFileStreamManager.SetInputLockBytes(SPFileInfo&amp; fileInfo, SqlSession session, PrefetchResult prefetchResult)     at         05/24/2013 09:57:46.64 w3wp.exe (0x0D50)   0x1D24  SharePoint Foundation   Database    ab1a9   High    Failed to get document content data. System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.CoordinatedStreamBuffer.SPCoordinatedStreamBufferFactory.CreateFromDocParams(SqlSession session, Guid guidSiteId, Int32 cbContent, Nullable1 parentId, Guid docId, Nullable1 level, SPChunkedArray`1 rgbContent, Byte[] rgbRbsId, Int64 bsn, Byte partition, Int32 pageSize, Boolean bStartFilling)     at   I could not find any materials related to this on the internet,  I am not even sure if it has to do something with SPS2003 compatibility.  Any help pointers?
47466
I cannot install Eclipse, even if I wanted to.  It is not approved software for my org.  How can test classes be deleted from production, using deployments? There no 'active' checkbox when I am editing the classes in sandbox mode, so I can't just deactivate the test class, and i cant deploy a deleted class to prod...  how the heck is this done?  I dont want to use ANT or special software.  SF must have a native way to achieve this.  And if not...  then I am very disappointed in humanity.
933
This started happening today for absolutely no reason. Worked perfectly last week. I didn't touch the machine.  I have an issue described  and need to downgrade in order to be able to upgrade. Currently I'm not able to enter the shell as it exits with error #4   need to upgrade database admin with pdfile version 4.22, new version: 4.5  If I run it with --upgrade I get:  ERROR: error: exception cloning object in admin.system.users system.users entry must have either a 'pwd' field or a 'userSource' field, but not both obj:{ _id: "nod$ exception in initAndListen: 2 system.users entry must have either a 'pwd' field or a 'userSource' field, but not both, terminating   I'm trying sudo apt-get install mongodb-10gen=2.2.10but it doesn't work.  Can anyone direct me to a command I can use to install version 2.2.10?