When you attempt to change the value for parameterized lookup attribute on the first line it is working but any consecutive updates for lines 2 onwards throwing error "Could not update value".
Steps to Reproduce:
Below setup is required before attempting to reproduce the issue.
1. Create Static Lookup
Lookup Name – Plan Type
Lookup ID - Z_PLAN_TYPE
Values –
Lookup Value ID Description
Budget Plan z_bp BUDGET PLAN
FY Estimates z_fy_dtl_cp COST PLAN
FY+1 - Estimates z_fy1_dtl_cp COST PLAN
2. Create Lookup Name - Cost Plan Type
Lookup ID - Z_CP_TYPE
Query –
SELECT
@SELECT:cmnlv.lookup_code:Code@,
@SELECT:cmnlv.name:Name@,
@SELECT:cmnlv.LAST_UPDATED_DATE:LAST_UPDATED_DATE@,
@SELECT:'en':LANGUAGE_CODE@,
@SELECT:1:LANGUAGE_ID@
FROM cmn_lookups_v cmnlv
WHERE @FILTER@
and lookup_type = 'Z_PLAN_TYPE'
and language_code = 'en'
and description = 'COST PLAN'
3. On Cost Plan Detail object create attribute "Cost Plan Type"
Attribute Name - Cost Plan Type
ID - z_cp_type_dtl
Data Type – Lookup
Lookup Type - Cost Plan Type
API Attribute ID - z_cp_type_dtl
4. Create Static lookup.
Lookup Name - Role Level
Lookup ID - Z_ROLE_LEVEL
Values –
Lookup Value ID
Level 1 z_level_1
Level 2 z_level_2
5. Create "Role level" field on Resource Object
Role level
Attribute Name - Role Level
ID - z_role_level
Data Type – Lookup
Lookup Type - Role Level
API Attribute ID - z_role_level
6. Create lookup
Lookup Name - Role Level 1 (Cost Plan)
Lookup ID - Z_ROLE_LEVEL_1
Query –
SELECT distinct
@SELECT:Role_Level_1.resource_id:resource_id@,
@SELECT:Role_Level_1.full_name:full_name@,
@SELECT:Role_Level_1.LAST_UPDATED_DATE:LAST_UPDATED_DATE@,
@SELECT:Role_Level_1.LANGUAGE_CODE:LANGUAGE_CODE@,
@SELECT:Role_Level_1.LANGUAGE_ID:LANGUAGE_ID@
FROM
(
SELECT
r.id ,
r.unique_name resource_id ,
r.full_name full_name ,
r.LAST_UPDATED_DATE LAST_UPDATED_DATE ,
'en' LANGUAGE_CODE ,
1 LANGUAGE_ID ,
'z_fy_dtl_cp' cp_type,
r.is_active
FROM srm_resources r
inner join prj_resources p on r.id =p.prid
inner join odf_ca_resource ocr on r.id = ocr.id
WHERE p.prisrole = 1
and ocr.z_role_level = 'z_level_1'
UNION
SELECT
r.id ,
r.unique_name resource_id ,
r.full_name full_name ,
r.LAST_UPDATED_DATE LAST_UPDATED_DATE ,
'en' LANGUAGE_CODE ,
1 LANGUAGE_ID ,
'z_fy1_dtl_cp' cp_type,
r.is_active
FROM srm_resources r
inner join prj_resources p on r.id =p.prid
inner join odf_ca_resource ocr on r.id = ocr.id
WHERE p.prisrole = 1
and ocr.z_role_level = 'z_level_1'
) Role_Level_1
Where (Role_Level_1.cp_type = @where:param:user_def:string:cp_type@ OR @where:param:user_def:string:cp_type@ IS NULL)
@BROWSE-ONLY:AND Role_Level_1.is_active=1:BROWSE-ONLY@
AND @FILTER@
7. Create Role Level 1 attribute on the Cost Plan Detail object
Attribute Name - Role Level 1
ID - z_role_level_1
Data Type – Lookup
Lookup Type - Role Level 1 (Cost Plan)
API Attribute ID - z_RoleLevel1
Lookup Parameter Mapping – cp_type to z_cp_type_dtl
8. Create below 3 attributes on the resource object
Name = Parent Role 1 ID = z_fy1_parent_role Lookup = Role Browse (SCH_BROWSE_ROLE)
Name = Parent Role ID = z_fy_parent_role Lookup = Role Browse (SCH_BROWSE_ROLE)
Name = Parent Role Job ID=z_job_fmly_prnt_role Lookup = Role Browse (SCH_BROWSE_ROLE)
9. Create Lookup Name - Role Level 2 (Cost Plan)
Lookup ID - Z_ROLE_LEVEL_2_CP
Query –
SELECT distinct
@SELECT:Role_test.unique_name:resource_id@,
@SELECT:Role_test.full_name:full_name@,
@SELECT:Role_test.LAST_UPDATED_DATE:LAST_UPDATED_DATE@,
@SELECT:'en':LANGUAGE_CODE@,
@SELECT:1:LANGUAGE_ID@
from
(Select r.unique_name,
r.full_name,
r.LAST_UPDATED_DATE,
parentrole.unique_name parent_role,
r.is_active is_active
FROM srm_resources r
inner join prj_resources p on r.id = p.prid
inner join odf_ca_resource ocr on r.id = ocr.id
inner join srm_resources parentrole on parentrole.id=ocr.z_fy1_parent_role
WHERE
p.prisrole = 1
and ocr.z_role_level = 'z_level_2'
UNION
Select r.unique_name,
r.full_name,
r.LAST_UPDATED_DATE,
parentrole.unique_name parent_role,
r.is_active is_active
FROM srm_resources r
inner join prj_resources p on r.id = p.prid
inner join odf_ca_resource ocr on r.id = ocr.id
inner join srm_resources parentrole on parentrole.id=ocr.z_fy_parent_role
WHERE
p.prisrole = 1
and ocr.z_role_level = 'z_level_2'
UNION
Select r.unique_name,
r.full_name,
r.LAST_UPDATED_DATE,
parentrole.unique_name parent_role,
r.is_active is_active
FROM srm_resources r
inner join prj_resources p on r.id = p.prid
inner join odf_ca_resource ocr on r.id = ocr.id
inner join srm_resources parentrole on parentrole.id=ocr.z_job_fmly_prnt_role
WHERE
p.prisrole = 1
and ocr.z_role_level = 'z_level_2'
)Role_test
where (Role_test.parent_role=@where:param:user_def:string:cp_detail_id@ OR @where:param:user_def:string:cp_detail_id@ IS NULL)
@BROWSE-ONLY:AND Role_test.is_active=1:BROWSE-ONLY@
AND @FILTER@
9. Create "Role Level 2" attribute on Cost Plan Detail object
Attribute Name - Role Level 2
ID - z_role_level_2
Data Type – Lookup
Lookup Type - Role Level 2 (Cost Plan)
API Attribute ID - z_RoleLevel2
Lookup Parameter Mapping – cp_detail_id to z_role_level_1
10. Navigate to Classic->Home->Resources to stage the data you will need.
11. Create few roles and you can also use some of the out of the box roles.
12. Set some roles to Level1 and Level1 using the attribute called Role Level.
13. Set Parent Role to some values for any Roles for which Role Level attribute was set to "Level 2"
14. Navigate to MUX->Projects and open any financially enabled project.
15. Click on Financials module and create Cost Plan.
16. Click on Cost Plan to go into details and create few detail records.
17. Add Cost Plan Type, Role Level1 and Role Level2 attributes to the grid.
18. Attempt to set the value fpr Cost Plan Type for first detail line abd then do same for line 2 and below you will get an error "Could not update value"
Expected Results: It should allow to set the value.
Actual Results: It does not allow to set the value.
Please note that this this behavior not allowing to reproduce another issue that happens in the previous version where it is not clearing values for second lookup for any detail lines other then the first line.
DE182032
Fixed in 16.4.2