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

Business Partner Code

Hi

I want to check during Add or Update of Business Partner if user has selected group "Customer" B.P Code first character should be "C" . If user has selected group "Vendor" B.P Code first character should be "V" , if user has selected group "Leads" B.P Code first character should be "L" . How it can be done using Stored Procedure Notification.

Thanks

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 May 26, 2013 at 04:39 PM

    Sunny,

    The numbering of documents for Customer and Supplier does not meet your need?

    Administration --> System Initialization --> Document Numbering

    Regards,

    Marcelo Silva Santos


    pastedImage_0.png (12.2 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 27, 2013 at 12:13 AM

    Hi Sunny Brar,

    Try this:

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

    BEGIN

    declare @t char(1)

    set @t=(Select p.CardType from OCRD p

    where p.cardcode=@list_of_cols_val_tab_del)

    if @list_of_cols_val_tab_del !=

    (Select case @t

    When 'S' then 'V'

    When 'C' then 'C'

    When 'L' then 'L' end

    +isnull(substring(str(100000+max(right(p.CardCode,5))+1,6),2,5),

    '00001')

    From OCRD p

    Where p.CardCode like '%[0-9][0-9][0-9][0-9][0-9]'

    and p.CardType=@t

    and p.cardcode!=@list_of_cols_val_tab_del)

    Select @error =1,

    @error_message = 'Partner code invalid !'

    END

    Hope helpful.

    Thanks & Regards,

    Nagarajan

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 27, 2013 at 07:16 AM

    Hi sunny,

    Goto

    Administration --> System Initialization --> Document Numbering

    then you have the following window

    press ctrl+double click on business partner vendor/customer.

    Here right click on first row select add row then define your series.

    if you want 'V' is your vendor starting letter then put 'v' at prefix.



    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.