on 05-27-2016 7:57 AM
Hi experts i Created the following SP
--/*Block Batch Making when Batch Attribute 1 is Null*/
IF @transaction_type IN ('U') AND @Object_type = '10000044'
BEGIN
IF EXISTS (SELECT T0.AbsEntry FROM OBTN T0
WHERE T0.MnfSerial is null
and T0.AbsEntry = @list_of_cols_val_tab_del)
BEGIN
SELECT @Error = 525, @error_message = 'Select Job No in Batch Attribute 1'
END
END
my goal is to block batch making when use did not select any value in Batch Attribute 1 field but this SP is not working
Can any one guide me what am i missing here?
Regards
Jamil Siddiqui
Hi
this SP only runs when you open the batch master data form, but it does not run when you select batch in a document and select the batch for saving the data.
You have two options:
- create an alarm to show all batch with this field is null and update.
- create an addon when you select the batches in a document (marketing or production) checks that field has value.
Kind regards
Agustín Marcos Cividanes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try below SP
IF @transaction_type in ('A','U') AND (@OBJECT_TYPE='10000044')
BEGIN
If exists (SELECT t0.AbsEntry FROM OBTN T0 WHERE (T0.MnfSerial = '' or T0.MnfSerial is null) AND
t0.AbsEntry = @list_of_cols_val_tab_del)
Begin
SET @error = 1
SET @error_message = 'Check Attribute'
End
End
Thanks,
Harshal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanx for your reply Harshal Makwana its working now but it works on when i try to add the receipt from production doc not at time of when i create batch and update it. it batch making window
Thanx & Regards
Jamil
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.