display id in editor

display id in editor

montoyammontoyam Posts: 119Questions: 33Answers: 3

I added the ID field as read-only to the editor

{ "label": "SubmissionID:", "name": "Submissions.SubmissionID" , type:"readonly" },

but I am getting the error:
Cannot update identity column 'SubmissionID'.

Is it not possible to view the ID field in the editor?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 8,033Questions: 0Answers: 1,349

    That should work, I modified this example locally to contain:

                }, {
                    label: "id:",
                    name: "DT_RowId",
                    type: "readonly"
                }, {
    
    

    and that gave the read-only ID on the form as expected, with no errors on edit or create.

    Are you able to link to your page so we can take a look?

    Colin

  • montoyammontoyam Posts: 119Questions: 33Answers: 3
    edited March 25

    sorry, the page is on our intranet.

  • colincolin Posts: 8,033Questions: 0Answers: 1,349
    Answer ✓

    This thread has the same error, so it would be worth checking Allan's comments there.

    Colin

  • montoyammontoyam Posts: 119Questions: 33Answers: 3

    Yes, that was it exactly! Thank you.

    asp.net - in my controller:

                        .Field(new Field("Submissions.SubmissionID")
                            .Set(false)
                        )
    
Sign In or Register to comment.