Skip to Content
author's profile photo Former Member
Former Member

Modify SP_TransactionNotification for Master Data

Dear experts,

How can we restrict to add/update master data without entering the value of some of master data UDFs in SP_TransactionNotification. as i am unable to get the Object code.

regards

awais

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 07, 2010 at 08:53 AM

    Hi Majeed,

    i m using to Block BP if in tax information (Tin no.) is Blank.

    here is Sp :-

    if @transaction_type in (N'A',N'U') and @object_type = N'2'

    begin

    if (SELECT T1.U_BPEmail FROM OCRD T0 INNER JOIN CRD7 T1 ON T0.CardCode = T1.CardCode where T0.cardcode =

    @list_of_cols_val_tab_del and U_BPEmail )is null

    begin

    SET @error = 17

    SET @error_message = N'PLEASE ENTER U_BPEmail. '

    Plz change as per your requirment.

    Thanks,

    Jrajput

    Edited by: J2663312 on Jul 7, 2010 2:23 PM

    Edited by: J2663312 on Jul 7, 2010 2:42 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 07, 2010 at 08:59 AM

    for item master object type(code ) is 4.

    Regards

    Deepak Tyagi

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 07, 2010 at 09:10 AM

    Hi

    This is an example to fill the product type in item master

    Begin

    IF (@OBJECT_TYPE ='4' AND (@TRANSACTION_TYPE ='A' or @TRANSACTION_TYPE ='U'))

    BEGIN

    IF EXISTS(SELECT SellItem FROM OITM WHERE ITEMCODE = @LIST_OF_COLS_VAL_TAB_DEL AND U_PRODUCT IS NULL)

    BEGIN

    SELECT @error=100001, @error_message='Please Select Product in UDF Field.'

    END

    END

    select @error, @error_message

    End

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.