AnsweredAssumed Answered

Need Help in Paramterized Query.

Question asked by TIDI on Jul 21, 2012
Latest reply on Jul 24, 2012 by TIDI
Hello All,

I have created a Paramterized Dependent Lookup for Resource Manager in Custom Object.

Attributes are:-
Resource Name :- Using system Resource Active lookup.
Resource Manager:- Using parametrized Query

Steps:-
1. Create an instance of object with Res1 and RM1 and save it.
2. Change the resource manager of Res1 to RM2 through resource profile.
3. Create another instance with Res1 and RM2 .
4. Now in first instance the resource manager field shows blank as resource manager is changed but the resource id of previous manager is stored in database.

Do you have any idea how to retain the value of previous manager?

I am using below NSQL query for resource manager.

SELECT DISTINCT @SELECT:SRM_RES1.ID:ID@,
@SELECT:SEC_USERS.LAST_NAME ||', '|| SEC_USERS.FIRST_NAME:FULLNAME@,
@SELECT:SRM_RES1.UNIQUE_NAME:UNIQUE_NAME@,
@SELECT:SEC_USERS.LAST_NAME:LAST_NAME@,
@SELECT:SEC_USERS.FIRST_NAME:FIRST_NAME@
FROM SRM_RESOURCES SRM_RES,
CMN_SEC_USERS SEC_USERS,
SRM_RESOURCES SRM_RES1
WHERE SRM_RES.MANAGER_ID = SEC_USERS.ID
AND SRM_RES1.USER_ID=SEC_USERS.ID
AND (@WHERE:PARAM:USER_DEF:STRING:MGRID@ IS NULL OR
@WHERE:PARAM:USER_DEF:STRING:MGRID@ = SRM_RES.ID)
AND @FILTER@
@BROWSE-ONLY:AND SRM_RES1.IS_ACTIVE=1:BROWSE-ONLY@

Thanks in Advance!!

Regards
Tidi

Outcomes