cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi,

Please tell me the object code for activity (OCLG).

Regards,

Datta Kharat

0 Likes
View Entire Topic
Former Member
0 Likes

Hi,

What is your B1 version and PL? What are you trying to do with this object?

Thanks,

Gordon

Former Member
0 Likes

Hi Gordon,

I have created one UDF on activity and I want to make the field mandatory.

So i am creating sp_notification for that with object code.

Regards,

Datta Kharat

former_member541807
Active Contributor
0 Likes

HI datta,

ther is 2 ways to make a UDF Mandatory

1. when you create the UDF, in the User Defined Field Management window, in Field Data Window there is an checkbox option Mandatory Field, you just need to check this tick box. also you can update your UDF to make it mandatory.

2. using SPTransactionNotification, and regarding your question Object Code

103 - Activity types

217 - Activity Status

regards,

Fidel

Former Member
0 Likes

Hi Dutta ,

I agree with Avelino !

You can make the Field Mandatory at the time of Creation of the UDF.

Thanks

--Ashish

Former Member
0 Likes

Hi Datta Kharat,

when we create the UDF, in the User Defined Field Management window there is an checkbox option Mandatory Field is available but UDF not to make it mandatory with this help.

So, put your SP here so i can help you.

Thanks,

Srujal Patel

Former Member
0 Likes

hi Suraj,

The below is my SP notification.

IF ((@transaction_type in( N'A',N'U')) AND @Object_type = N'33')

Begin

IF EXISTS (SELECT * FROM OCLG T0

WHERE T0.DocEntry = @list_of_cols_val_tab_del

AND (T0.[U_Creator]IS NULL or T0.[U_Creator]=''))

SELECT @error = 1007, @error_message = 'Please Select Creator Name'

END

Regards,

Datta Kharat

Former Member
0 Likes

Hi Datta Kharat,

If @object_type = '33'  and ((@transaction_type in( N'A',N'U')))
begin
	if exists(select 'A' from oclg T0 
            where   isnull(T0.U_Creator,'') = ''
              and T0.ClgCode = @list_of_cols_val_tab_del)
	begin
		set @error = 1 
		set @error_message = 'Please Select Creator Name' 
	end 
end

Object Code 33 is perfect and Docentry is not in Activity in place of ClgCode is unique.

Thanks,

Srujal Patel