Tôi hiện đang sử dụng InvalidPluginExecutionException
để gửi tin nhắn cho người dùng, nhưng hóa ra là thông báo bằng tiếng Anh "Business Process Error"
ngoài đó hộp lỗi xuất hiện nút "download log file"
. Đây không phải là lỗi vì người dùng đang cố sao chép bản ghi, như có thể thấy trong mã. Có cách nào khác mà không phải sử dụng InvalidPluginExecutionException
để hiển thị cảnh báo không?Làm thế nào để gửi cảnh báo cho người dùng thông qua plugin mà không sử dụng InvalidPluginExecutionException?
QueryExpression query1 = new QueryExpression();
query1.ColumnSet = new ColumnSet(true);
query1.EntityName = "new_appraisers";
EntityCollection ec = service.RetrieveMultiple(query1);
if (ec.Entities.Count <= 0)
{
log.Tb_Log_Create("Appraiser created");
}
else
{
foreach (Entity app in ec.Entities)
{
if (app["fcg_appraiser"].ToString() == name)
{
log.Tb_Log_Create("appraiser allready exist");
throw new InvalidPluginExecutionException("The name allready exists");
}
if (app["new_login"].ToString() == login)
{
log.Tb_Log_Create("appraiser allready exist");
throw new InvalidPluginExecutionException("The login allready exists.");
}
}
}
Không ai trong số này có sẵn trong CRM 2011 (có lẽ là công trình HTML hacky, mặc dù) – Alex
Ừ, đúng rồi. Điểm tốt. – nozzleman
Tôi thích html smylie hack –