Hi
Can we create Sales Quotation / Sales Order if business type is Lead . If i want that user should not be able to create Sales Quotation / Sales Order if businnes partner type is Lead. What can be done . if through stored procedure what it will be
Thanks
Request clarification before answering.
Hi
Try this for sales order.......
if @object_type = '17' and @transaction_type in (N'A', N'U')
begin
-- in variable @list_of_cols_val_tab_del is cardcode of BP
if exists (Select t1.cardtype from ocrd t1 inner join ordr t0 on t1.cardcode = t0.cardcode where t0.docentry=@list_of_cols_val_tab_del and t1.cardtype = 'L')
begin
select @error =1
select @error_message = 'Lead not allowed'
end
end
same you can customize for quotation
regards
Deepak Tyagi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manish,
Try this for Quotation:
IF @Transaction_type = 'A' AND @Object_type='23'
BEGIN
IF EXISTS
(
SELECT T0.CardType FROM OCRD T0
INNER JOIN OQUT T1 ON T0.cardCode=T1.CardCode
WHERE T0.DocEntry = @list_of_cols_val_tab_del
AND (T0.CardType = 'L')
)
BEGIN
SELECT @Error = 1,
@Error_message = 'Bussiness Partner is Lead type, You can not add Document !'
END
END
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 14 | |
| 13 | |
| 7 | |
| 7 | |
| 5 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.