+++++++++++++++++++++++
function updateAUser(p_user){//user object
p_user.name = id_name.getValue();
p_user.language = id_user_language.getSelectedValue();
var json = JSON.parse(p_user.extension.${P_mode});
json.mobile=id_phone.getValue();
for (i = 0; i < id_student.getRowsCount(); i++) {
json.student[i].firstname=id_student.id_firstname[i].getValue();
json.student[i].lastname=id_student.id_lastname[i].getValue();
json.student[i].grade=id_student.id_grade[i].getSelectedValue();
}
p_user.extension.${P_mode}= json;
p_user.update({
onSuccess : function(){
alert('user '+p_user.id+' updated!');
}
});
};
updateAUser(user);
+++++++++++++++++++++++++++++++
the user was already loaded during init of WI.
I want to save the metadata changes to the current user. The result was ok, but the changes are not saved.
Did i miss something?
Regrads Michael
--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/08b8f1e8-11c8-4bb6-87c8-36d71e6627f9%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.
the return is 200 ok
I could change something like the name, but the metadata chenges are not updtated. Could you provide a javascript ciode snippet ?
Kind regards
function updateAUser(p_user){//user object
p_user.name = id_name.getValue();
p_user.language = id_user_language.getSelectedValue();
var json = JSON.parse(p_user.extension.${P_mode});
json.mobile=id_phone.getValue();
for (i = 0; i < id_student.getRowsCount(); i++) {
json.student[i].firstname=id_student.id_firstname[i].getValue();
json.student[i].lastname=id_student.id_lastname[i].getValue();
json.student[i].grade=id_student.id_grade[i].getSelectedValue();
}
p_user.extension.${P_mode}= JSON.stringify(json); //!!!!!!
p_user.update({
onSuccess : function(){
alert('user '+p_user.id+' updated!');
}
});
};
updateAUser(user);
Your hint about the XML will lead me to the question, did i need objects or strings.. now the problem was solved.
Thx