1 - In this script, I’m using accents in messages but in client (Delphi) accents
are not shown.
function beforeProcessDeltaChange(delta, change, wasRefreshed, canRemove)
{
if (change.isDelete) {
service = "SERVICO= " + change.oldValues['id_servico'] + "-"+change.oldValues['servico'];
if (change.oldValues['id_servico'] == 1)
{
service = "SERVICO=" + change.oldValues['servico'];
msg = "Violação de regras no servidor: #SERVICO: Não pode ser excluido!"
.replace("#SERVICO", service);
fail(msg);}
}
}
2 - How do I handle server errors? I would like to show
messages to the user according to the error.
1 - In this script, I’m using accents in messages but in client (Delphi) accents are not shown.
Relativity writes messages in delta changes as AnsiString.
Logged as 79944.
as a temporary workaround - you can write meg in server events in UTF8 format.
2 - How do I handle server errors? I would like to show messages to the user according to the error.
Are you using TDAVCLReconcileProvider/TDAFMXReconcileProvider on client side?
Could you send me an example of how can I set up a “Form Reconcile” according to
with my needs, I looked in the examples folder of DA and I did not find anything on the subject.
I Need:
Translate from English to Portuguese,
in some cases I will not show anything, just configure
what to do according to error.
procedure TForm83.DARemoteDataAdapter1BeforeProcessFailures(Sender: TObject;
TDADataTableList; aFailedDeltas: TDADeltaChangeList;
var aFailureBehavior: TDAFailureBehavior);
var
mes: String;
i:integer;
begin
mes := '';
for i := 0 to aFailedDeltas.Count-1 do
mes := mes+ aFailedDeltas[i].Message+sLineBreak;
raise Exception.Create('Failures:'+sLineBreak+mes);
end;