DISABLE "HOUR" JOURNAL FIELDS

Hi, In PSA------> Hour journal ---->lines i want to disable all the fields except “HOUR” field…only for the journals which have been autogenerated please help -Rajee

So it means you are automatically creating the Hours Journal and you want to disable all other fields except Hour when some one opens the journal created automatically. But the system don’t know which journal is created automatically.

You need to tell it to the system. which can be done in many ways.

one way is add a NoYesId to the ProjJournalTable and give the value as Yes when you automatically create a journal

then in the ProjJournalTransEmpl form override the active method of the datasource - projJournalTrans.

if(projJournalTable::Find(projJournalTrans.JournalId).yourField)

projJournalTrans_ds.object(fieldnum(ProjJournalTrans,TransDate)).enable(false);

add all the fields you want to disable

Hope you understood…

Hi Kranthi, I value your idea,but i found another method to do this but stuck up in half way. the method which i followed is in ProjJournalTrans(table) we have a field called “TransIdRef” which is generated only for the auto created journals,so i have considered that field and in ProjJournalTransEmpl(form)---->ProjJournalTrans(table)----->active method i have written the code for disabling the fields. but when i disable all the fields get disabled,but as for my requirement i want “Hour” field to be editable… how can i achive this??? -Rajee

you need to disable the individual fields in the Grid.

But Kranthi, yes i have written code for disabling each field but stilll… when i disable the “PSAeditActivityPurpose” field…the field gets disabled only in the overview tab,…but not in the general tab in the form… and how can i disable the all dimensions in the dimension in the dimension tab… please correct me… -Rajee

Yes, I found out myself…just need to enable the “auto decleration= true” for the activity description and the dimension… thanks Kranthi for your help. -Rajee

OK you have solved it - Good…

I thought you are automatically creating these journals by code so i have suggested you to create a new field and update it.

Thanks Kranthi.