Blocking "Copy To" function
Hello,
I want to block to creation of goods return request base on ar invoices. The events of SBO are so confused, that it is not possible to block it.
I have create an optimizer rule, which will be raised on comboselect. Then I tried to check, what is the selected value from the copy to button. If the “Bevor Event” = true, I cant get the combobutton object. If the “bevor Event” is set to false, the new good return request Window is allready open.
Is there a possibility to block it?

-
Moin,
schau mal hier:
Ich glaube das geht in die richtige Richtung. Im Optimizer würde ich vorab schon ItemPressed nehmen
Grüße Lothar
0 -
Hallo Lothar,
über den PopUpIndicator funktioniert es.
Danke für den Hinweis.
Grüße
Marco
0 -
Moin Marco,
prima das es geklappt hat.
Magst du deine Lösung einmal sharen.
gruß Lothar
0 -
Hallo Lothar,
hier ist der Code:
try
{
if ( pVal.PopUpIndicator.ToString() == "0")
{
StatusBar.WriteError("Kopeiren in eine Retourenanfrage ist nicht erlaubt.");
return false;
}
}
catch (Exception ex)
{
string errorMessage = string.Format("Error in {0} Rule '{1}': {2}", pVal.RuleInfo.RuleType, pVal.RuleInfo.RuleName, ex.Message);
MessageBox.Show(errorMessage, "OK");
StatusBar.WriteError(errorMessage);
Debug.WriteMessage(errorMessage, Debug.DebugLevel.Exception);
}return true;
MfG
Marco
0 -
Hi Marco,
vielen Dank. Ich bekomme es leider nicht hin.
Wie hast du den Optimizer in der Config eingestellt.
Gruß Lothar
0 -
Hallo Lothar,
hier ein Screenshot:
MfG
Marco
0 -
Ah, da war mein Fehler. Ich hatte ItemPressed als Event Typ
0
Please sign in to leave a comment.
Comments
7 comments