To allow update of current record, and not insert a duplicate record.

Oct 11, 2013 at 11:32 AM
When updating a record, the "self.profile().ProfileId" is not identified as an integer, and passes a SaveProfileInformation and not a UpdateProfileInformation.

I changed the code in self.saveProfile = function () {
from
url: urlContact + (self.profile().ProfileId > 0 ? '/UpdateProfileInformation?id=' + self.profile().ProfileId : '/SaveProfileInformation'),
to
url: urlContact + (profileId > 0 ? '/UpdateProfileInformation?id=' + profileId : '/SaveProfileInformation'),

You set the profileId with "var profileId = url.substring(url.lastIndexOf('/') + 1);"

Great project, Thanks
Jan 7, 2014 at 3:16 AM
Hi
I had to add the following to get this to work for me. I am unsure why the one you show did not.

url: urlContact + (self.profile().ProfileId._latestValue > 0 ? '/UpdateProfileInformation?id=' + self.profile().ProfileId._latestValue : '/SaveProfileInformation'),

Thanks