Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
If you are working on peoplecode you may face the below error “Expression of type string is not an object reference”
If you attempt to set a field value through PeopleCode and the field name is “NAME,” use the shortcut Rowset (Row). Record.Field.Value approach will result in an error. The error message “Expression of type String is not an object reference. (2,48),” is generated when attempting to validate or save the PeopleCode.
root cause of this issue
This occurs because PeopleCode becomes confused with the existence of the Name property in the Field class. To resolve this, you can use the GetField function to access the Field object and set its value, as shown below:
&rec.NAME.Value => error ;
or
&rec.Label.Value => error ;
or
&rec.value.Value => error ;
correct way is
&rec.getfield(field.NAME).Value = code accepted
&rec.getfield(field.Label).Value = code accepted
&rec.getfield(field.value).Value = code accepted
You may encounter a similar issue when trying to set the value of other fields, such as LABEL or VALUE, as they are also properties of the Field class.
The user may not have PTPT1000 permission list . You can add and check it.
. Open the custom permission list, that is assigned to a user’s role, under Peopletools > Security > Permissions and Roles > Permission list
2. On the Pages tab, add the PTGP_MENU
3. Click Edit link beside PTGP_MENU and give Full Access to all Components
4. Click OK and Save
5. Clear browser cache and try to replicate the issue.
Also make sure there are no missing pages in NUI_FRAMEWORK that are specific to Navigation collections.