Genesys CTI User Forum > Genesys-related Development
PSDK Update Object
carpio:
Hello,
I try to update a person but get the message that the object is already saved.
Actualy I want to move the person to a different folder.
Code:
var folder = func.folder_query("disabled", 3);
var person = func.person_query(textBox_username.Text);
person.SingleOrDefault().FolderId = folder.DBID;<-- here I get the error message tha tobject can#t be saved
person.SingleOrDefault().Refresh(); <-- Here I tried also save
Am I doing something wrong?
carpio:
I have noticed, when I update the email field then it’s working.
just the move to another folder is giving me the error.
hsujdik:
[code]
person.SingleOrDefault().FolderId = folder.DBID;<-- here I get the error message tha tobject can#t be saved
[/code]
Maybe the user doesn't have permission on this folder. Can you check that? Also, what is the content of [b]folder.DBID[/b]? Check if it is not comming null...
[code]
person.SingleOrDefault().Refresh();
[/code]
This doesn't save the object. The correct method should be [b].Save()[/b]
carpio:
Im Running this code in a Development Environment with the default user. Permission on folder is correct.
The folder.dbid is not null so that should also be fine.
And person.save() is also not working S the exception is thrown before the save.
cavagnaro:
Which exception? The message should tell you exactly what is wrong
Enviado de meu E6633 usando Tapatalk
Navigation
[0] Message Index
[#] Next page
Go to full version