Yes, thanks to %matadata API.
Use following code at behind a push button (Field Change) and you'll see the code as a message pop up. ( Please enter record, field and event name in below code.)
import %metadata:PeopleCodeProgram:PeopleCodeProgram;
import %metadata:PeopleCodeProgram:PeopleCodeProgram_Manager;
import %metadata:Key;
Local %metadata:PeopleCodeProgram:PeopleCodeProgram_Manager &mgr = create %metadata:PeopleCodeProgram:PeopleCodeProgram_Manager();
Local %metadata:Key &key = create %metadata:Key(Key:Class_Record,
Local %metadata:PeopleCodeProgram:PeopleCodeProgram &Prog = &mgr.GetDefn(&key);
If &Prog <> Null then
Local string &sProgramText = &Prog.GetProgram();
winmessage(&sProgramText ,0);
else
Winmessage("No PeopleCode Event Defined",0);
end-if;
Hi,
ReplyDeleteAfter placing record, field and peoplecode in above code, it is giving syntax error.
Local %metadata:Key &key = create %metadata:Key(key:Class_Record, Record.OMS_RECORD_WRK, Key:Class_Field, Field.BUTTON, Key:Class_Method, Method.FieldChange);
I have placed only one line which i have modified.
Please help...
Also could you please give me more information about %metadata (where I can see the code).
Thanks
Madhusudhan.
Hi,
ReplyDeleteBelow is the way..
Local %metadata:Key &key = create %metadata:Key(key:Class_Record, "OMS_RECORD_WRK", Key:Class_Field, "BUTTON", Key:Class_Method, "FieldChange");
Hi,
DeleteCan you please guide us how to create record definiition using %metadata.