Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
Unanswered

Object reference not set to an instance of an object.

(1) ShareShare
ReportReport
Posted on by 2

Help!!
Everything was working before. Until I tried the Multistep form again. 
I tried creating a new portal but when I create a new multistepform same error appears.

[NullReferenceException: Object reference not set to an instance of an object.]
 Adxstudio.Xrm.Web.UI.WebControls.<>c__DisplayClass206_0.<SetAttributeValuesOnSave>b__0(Entity en) in C:\__w\1\s\Framework\Adxstudio.Xrm\Web\UI\WebControls\WebForm.cs:5161
 System.Linq.WhereListIterator`1.MoveNext() +80
 System.Linq.Enumerable.Any(IEnumerable`1 source) +96
 Adxstudio.Xrm.Web.UI.WebControls.WebForm.SetAttributeValuesOnSave(OrganizationServiceContext context, Entity step, Object e, List`1 webformRelatedEntities) in C:\__w\1\s\Framework\Adxstudio.Xrm\Web\UI\WebControls\WebForm.cs:5164
 Adxstudio.Xrm.Web.UI.WebControls.WebForm.OnItemInserting(Object sender, CrmEntityFormViewInsertingEventArgs e) in C:\__w\1\s\Framework\Adxstudio.Xrm\Web\UI\WebControls\WebForm.cs:2842
 Microsoft.Xrm.Portal.Web.UI.WebControls.CrmEntityFormView.OnItemInserting(CrmEntityFormViewInsertingEventArgs args) in C:\__w\1\s\Framework\Microsoft.Xrm.Portal\Web\UI\WebControls\CrmEntityFormView.cs:269
 Adxstudio.Xrm.Web.UI.WebControls.CrmEntityFormView.HandleInsert(CommandEventArgs args) in C:\__w\1\s\Framework\Adxstudio.Xrm\Web\UI\WebControls\CrmEntityFormView.cs:1942
 Adxstudio.Xrm.Web.UI.WebControls.WebForm.OnItemCommand(CommandEventArgs args) in C:\__w\1\s\Framework\Adxstudio.Xrm\Web\UI\WebControls\WebForm.cs:670
 Adxstudio.Xrm.Web.UI.WebControls.WebForm.OnBubbleEvent(Object source, EventArgs args) in C:\__w\1\s\Framework\Adxstudio.Xrm\Web\UI\WebControls\WebForm.cs:683
 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +49
 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5444
Categories:
  • CU29072318-0 Profile Picture
    2 on at
    Object reference not set to an instance of an object.
    Hi @aofosu, 
     
    I was saving Contact lookup as login contact id in metadata, which I have now removed to see is it a meta data issue. But still same issue. FYI to check security issue I have allocated this user admin role, but still same issue. 
  • aofosu Profile Picture
    103 on at
    Object reference not set to an instance of an object.
    I experienced this when I was trying to Associate Current Portal User on Insert on a step form that was in insert mode as first step:
     
    Solution: I used a metadata to set the value on save.
  • Varun Singh Profile Picture
    8 on at
    Object reference not set to an instance of an object.

    Hi @tin007 , @inanoffice23, @Fubar,

     
    Are you able to get the solution for this? I am also getting same kind of error on Multistep form On Save. Not able to get what is the issue. Looks like I am trying to set contact guid in meta data as login person , but some issue there. I have given admin role to contact but still same error.
     
  • inanoffice23 Profile Picture
    260 Super User 2025 Season 1 on at
    Re: Object reference not set to an instance of an object.

    I am having this error too, did you manage to fix it @tin007 

     

    I have upgraded the other packages and still the same error

     

    I am indeed having a look up column to the main table (associated table reference was used too), which had an auto number and it works fine in another website

     

    We created a new site to have the 'enhanced' data model, but lots of bugs are appearing and the website takes a long time to load

     

    It created its own Portal Management

     

    I added the website to the Portal Management where the other 3 sites were placed, but it looks like there are 2 Portal Managements for the site

     

    The 'separate' portal management also has triplicated Web files and many other settings, is there an easy way to merge both Portal Managements or do I have to raise a ticket with Microsoft? 

  • Fubar Profile Picture
    7,960 Super User 2025 Season 1 on at
    Re: Object reference not set to an instance of an object.

    Most likely you have a Lookup field that is being populated with a value that is not valid (most likely via JavaScript/JQuery, or form Metadata)

    If it is a bug, double check that you have the latest Power Pages Core installed (from the Admin portal, in the environment in question , Resources->Power Pages and then check for updates)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >