web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Object reference not s...
Power Pages
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:
I have the same question (0)
  • Fubar Profile Picture
    8,459 Super User 2025 Season 2 on at

    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)

  • inanoffice23 Profile Picture
    299 Moderator on at

    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? 

  • Varun Singh Profile Picture
    8 on at

    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.
     
  • aofosu Profile Picture
    105 on at
    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.
  • CU29072318-0 Profile Picture
    2 on at
    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. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Pages

#1
Suriyanarayanan V Profile Picture

Suriyanarayanan V 37

#2
Fubar Profile Picture

Fubar 30 Super User 2025 Season 2

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 26 Most Valuable Professional

Last 30 days Overall leaderboard