
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
As mensagens estão armazenadas na tabela: live_messages
Live Messages Stores messages. References sys_user table. Access at Collaborate > Feed Administration > Messages.
Live Profiles Stores user live feed profiles. References sys_user table. Access at Collaborate > Feed Administration > Profiles.
var objMessage= new GlideRecord("live_message");
objMessage.query();
objMessage.next();
gs.print(objMessage.profile);
var ObjProfile= new GlideRecord("live_profile");
ObjProfile.addQuery('sys_id',objMessage.profile);
ObjProfile.query();
ObjProfile.next();
gs.print(ObjProfile.document);
var objUser= new GlideRecord("sys_user");
objUser.addQuery('sys_id',ObjProfile.document);
objUser.query();
objUser.next();
gs.print(objUser.name);
var objUser= new GlideRecord("sys_user");
objUser.addQuery('user_name','tiago.macul');
objUser.query();
objUser.next();
gs.print(objUser.name);
var ObjProfile= new GlideRecord("live_profile");
ObjProfile.addQuery('document',objUser.sys_id);
ObjProfile.query();
ObjProfile.next();
gs.print(ObjProfile.document);
var objMessage= new GlideRecord("live_message");
objMessage.addQuery('profile', ObjProfile.sys_id);
objMessage.query();
objMessage.next();
gs.print(objMessage.message);
//sysId = sys_user.sys_id
function deleteMessage(sysId)
{
//Busca o perfil de acordo com o sys_id do usuário (sys_user)
var ObjProfile = new GlideRecord("live_profile");
ObjProfile.addQuery('document', sysId);
ObjProfile.query();
//Busca as mensagens de acordo com o profile, deleta todas as mensagens enviadas pelo usuário
var objMessage = new GlideRecord("live_message");
objMessage.addQuery('profile', ObjProfile.sys_id);
objMessage.deleteMultiple();
//Busca a participação em todas as conversas
var ObjGrpMember = new GlideRecord("live_group_member");
ObjGrpMember.addQuery('member', ObjProfile.sys_id);
ObjGrpMember.query();
//Busca as conversas com participação do usuário e deleta todas as mensagens onde houve participação dele
var objMessageGrp = new GlideRecord("live_message");
objMessageGrp.addQuery('group', ObjGrpMember.group);
objMessageGrp.deleteMultiple();
}
Tables installed with live feed
Autores: tiagomacul edersonfs
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.