Page 1 of 1

How to restrict a supplier to a user

Posted: Wed May 06, 2009 7:02 am
by attiq
Hey All

i want to restrict a supplier to a user??? the user will create invoices and will pay the invoices of a single supplier??

Posted: Wed May 06, 2009 8:00 am
by oteixeira
Hello.

You can use Forms Personalization to achieve this. When the user chooses a supplier which is not in the condition you can warn the user and clear the record until he picks the correct supplier.

Octavio.

Posted: Mon May 11, 2009 6:22 am
by attiq
Hey Octavio

I tried to do it but didnt workout can u please guide me through i've never done any personalization :)

Posted: Mon May 11, 2009 6:49 am
by oteixeira
Hello.

Ok. I?ll explain you how to restrict a specific user to only be able to enter invoices to a specific supplier. I?m starting from the following assumptions:
-You want to restrict ONE user to ONE supplier.
-When entering the invoice, you are filling the field Supplier Name and then, the field Supplier Site.
If these conditions do not exist, the personalization might not work.
Let?s do it:

From the menu, choose Help/Diagnostics/Custom Code/Personalize.
Seq = 1
Description = When entering invoices, the user <your user name> can only choose one supplier

Condition
Trigger Event= WHEN-NEW-ITEM-INSTANCE
Trigger Object= INV_SUM_FOLDER.VENDOR_SITE_CODE
Condition = :INV_SUM_FOLDER.VENDOR_NUMBER <> <the supplier number you want to restrict>

Level
User=<The user name you want to restrict>

Actions
Seq=1
Type=Message
Description= Warn user
Message type=Warn
Message Text= You cannot use that supplier, please choose the correct one.

Seq=2
Type=Builtin
Description=Clear the current record
Builtin Type=DO_KEY
Argument= CLEAR_RECORD

Try this using your own user name in a test instance and see if it works.
Octavio

Posted: Wed May 13, 2009 8:04 am
by attiq
Hi Octavio
i followed ur instructions but when im going to validate that personalization it gives this error

The Codition :INV_SUM_FOLDER.VENDOR_NUMBER <1> could not be evaluated because of error ORA-00933: SQL command not properly ended

Posted: Wed May 13, 2009 9:23 am
by attiq
hey Its Done :)
Thanks Alot

made a stupid mistake
:INV_SUM_FOLDER.VENDOR_NUMBER <>1
:)

Thanks again

Posted: Wed May 13, 2009 10:37 am
by admin
Thanks to oteixeira for valuable input.