Is it possible to update hidden form fields after they have been added to the database?

Vote:
 

The code that I'm using gives an error -  {"Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."}

I've tried -

var ddsSubmission = new DdsPermanentStorage();

* code here to get the correct field, remove it, and re-add it to the submission object with the updated values.

ddsSubmission.UpdateToStorage(formGuid, formsIden, submission);

as well as -

ddsSubmission.SaveToStorage(formsIden,submission) 

but in both cases I get the same error.

This error appears to be related to the Guid that's part of formsIden but I use formsIden to get the friendlynames and it works.

#189519
Mar 20, 2018 14:24
Vote:
 

Hmm, I tried the following code but see no problem

        public override Guid SaveToStorage(FormIdentity formIden, Submission submission)
        {
            var dds = new DdsPermanentStorage();
            var submissionId = dds.SaveToStorage(formIden, submission);
            submission.Data["__field_183"] = "test@test.test"; // __field_183 is the id of my hidden visitor profiling field
            dds.UpdateToStorage(submissionId, formIden, submission);
            return submissionId;
        }
#189602
Mar 21, 2018 10:23
Vote:
 

Thanks Phu. I changed my code to use var submissionId = ddsSubmission.SaveToStorage(formsIden, submission); but it still gives the error  {"Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)."}.

I'm wondering if there is a permission or property in the web.config related to this method that I haven't set.

#189630
Mar 21, 2018 15:00
Vote:
 

I tried this with another Episerver site I'm working with and I'm getting the same error. Anyone else have this problem?

#189667
Edited, Mar 22, 2018 13:26
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.