cancel
Showing results for 
Search instead for 
Did you mean: 

Mandatory fields in Project Management Window

former_member325743
Participant
0 Kudos

Hi everyone, my boss ask me to make some fields as mandatories in the Project Management window.

I made some mandatory fields in another windows like invoices, payment and business partners with 'transaction notification', using the well known code

IF (@object_type = '1') AND (@transaction_type IN ('A','U')).......

But I can´t find the object type for the Project window, and I don´t know if there´s another way to do this.

So, someone has made this type of lock in a Project window´s field?

Thanks and best regards!

Accepted Solutions (1)

Accepted Solutions (1)

KennedyT21
Active Contributor
0 Kudos

Hi Anderson..

The object id for the project management "OPMG" is'234000021'


Cheers!

Kennedy

former_member325743
Participant
0 Kudos

I´m trying this one, I´l let you know if it worked.

Thanks!

former_member325743
Participant
0 Kudos

Yup, that´s the object but my code is not working. Someone could help me with this? this is my code

IF (@object_type = '234000021') AND (@transaction_type IN ('A','U'))
declare @proy nvarchar(100)
declare @contact nvarchar (100)
set @proy=(Select top 1 isnull(I.fiproject,'') From OPMG I
    Where I.CARDCODE=@list_of_cols_val_tab_del )
set @contact = (select isnull(t0.contact,'') from OPMG t0 where t0.AbsEntry=@list_of_cols_val_tab_del and t0.CONTACT is null)
BEGIN
If  exists (Select top 1 isnull(I.fiproject,1) From OPMG I
    Where I.CARDCODE=@list_of_cols_val_tab_del )
set @error = 111
set @error_message = 'project missing'
--if @contact = ''
--set @error = 112
--set @error_message = ' contact missing'
End 

it´s not blocking anything, not the project nor the contact. I tried with different codes, this one is just an example to see what I´m trying to block

former_member185682
Active Contributor

Hi Anderson,

The variable @list_of_cols_val_tab_del returns the value of the AbsEntry of OPMG. So, on your where clauses try to use the following:

I.AbsEntry = @list_of_cols_val_tab_del

Hope it helps.

Kind Regards,

Diego Lother

former_member325743
Participant
0 Kudos

Yup. I changed that few minutes ago but I really appreciate your help!

Answers (3)

Answers (3)

former_member185682
Active Contributor
0 Kudos

Hi Anderson,

If you refer this screen:

Use the object type 63.

Hope it helps.

Kind Regards,

Diego Lother

former_member325743
Participant
0 Kudos

Hi Diego, I meant this one

former_member185682
Active Contributor
0 Kudos

Hi Anderson,

I believe this screen was added on the 9.2 version of SAP Business One. I have the version 9.1 in my machine, so, I don't have this screen.

Let us know if the Kennedy suggestion worked.

Kind Regards,

Diego Lother

kothandaraman_nagarajan
Active Contributor
0 Kudos

How did you get 711 object code? I can't find such code SDK help file

former_member325743
Participant
0 Kudos

Found it on C:\Program Files (x86)\SAP\SAP Business One SDK\Help\SDK_EN

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Please check object types under C:\Program Files (x86)\sap\SAP Business One SDK\Help-REFDI If not stated here, then no object type for project management.

Regards,

Nagarajan

former_member325743
Participant
0 Kudos

I did it already and found the '711 Define Projects' but I don´t know if that´s the one for Project Management. I wrote a code with that number but didn´t work so I don´t know if it´s not the right one or my code didn´t work.