Skip to Content
0

Mandatory fields in Project Management Window

Apr 05, 2017 at 05:28 PM

174

avatar image

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!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
Kennedy T Apr 06, 2017 at 08:01 AM
0

Hi Anderson..

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


Cheers!

Kennedy

Show 4 Share
10 |10000 characters needed characters left characters exceeded

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

Thanks!

0

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

0

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

1

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

0
Nagarajan K Apr 05, 2017 at 09:16 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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.

0
Nagarajan K Apr 05, 2017 at 10:00 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

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

0
DIEGO LOTHER Apr 06, 2017 at 01:08 AM
0

Hi Anderson,

If you refer this screen:

Use the object type 63.

Hope it helps.

Kind Regards,

Diego Lother


img1.png (91.9 kB)
Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Diego, I meant this one

captura.jpg (144.2 kB)
0

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

0