a!localVariables( local!userDtl: rule!GAI_GetUserDetailByUserDetailId(id: ri!userDtlId), local!userAddr: rule!GAI_getUserAddress(userDtlId: ri!userDtlId), local!address: rule!GAI_getAddress( addressId: tointeger( local!userAddr['recordType!{95223579-776a-485d-b38c-eeaedbe5930a}GAI User Address.fields.{42a88eac-f478-4bf9-a8da-e8c5e666ed11}fkAddressId'] ) ), local!userRoles: a!refreshVariable( value: rule!GAI_getUserRole( userDetailId: ri!userDtlId, isActive: true() ), refreshAfter: "RECORD_ACTION", refreshAlways: true() ), a!formLayout( contents: { rule!SCO_CommonHelpText( helpText: "User has been deactivated in the system", isError: true(), showWhen: not( rule!SCO_isUserActive( local!userDtl['recordType!{1a68a647-eb88-4f12-be8e-e3d5fc6495eb}GAI User Detail.fields.{d07378d8-ee37-479d-a6e4-06adfb5bdd15}username'] ) ) ), a!columnsLayout( columns: { a!columnLayout( width: "NARROW", contents: { rule!GAI_CommonRecordActionField( recordAction: 'recordType!{1a68a647-eb88-4f12-be8e-e3d5fc6495eb}GAI User Detail.actions.{3fb24cc7-938f-47d5-b566-1d826e8e205f}updateUserDetail', actionNotRelatedToWorkflow: true(), identifier: { isUpdate: true(), userDtlId: ri!userDtlId }, showWhen: true() ) } ), a!columnLayout( width: "NARROW_PLUS", contents: { rule!GAI_CommonRecordActionField( recordAction: 'recordType!{1a68a647-eb88-4f12-be8e-e3d5fc6495eb}GAI User Detail.actions.{ebd775e8-8205-4708-9ff9-f62f1bb3fc3e}deactivateUser', actionNotRelatedToWorkflow: true(), identifier: { userDtlId: ri!userDtlId }, showWhen: true() ) } ), a!columnLayout( width: "NARROW_PLUS", contents: { rule!GAI_CommonRecordActionField( recordAction: 'recordType!{1a68a647-eb88-4f12-be8e-e3d5fc6495eb}GAI User Detail.actions.{666c057e-b750-49fd-b1cb-c039dc80ec7e}reactivateUser', actionNotRelatedToWorkflow: true(), identifier: { userDtlId: ri!userDtlId }, showWhen: true() ) } ) } ),
Hii,
Activate user Record action is visible but Deactivate user Record action is not visible in interface how can i resolve this ?
Discussion posts and replies are publicly visible
The related action will not display if the identifier is null or invalid. in your case its not the issue as you configured same identifier in both and you can see one.
Check the security of related action once.
Hi Anna,
i have displaying record action based on this rule
this should return true but returning false only
Yes, it is there in DB
I thing you pasted wrong screen shot(deactivatedUserVisibility), if user active then you will able to see Deactivate User action which is there in your main post. if user Deactivated then you should see the Activate user action. check there may be some other visibility rule might used.
As per the visibility rule you shared, I guess that the mentioned user might be deactivated in your environment, which could be the reason for the false output. Kindly check it once from the User tab or from the Admin Console.
Correct Only , above screenshot is for active user, i want to deactivate but rule is returning false instead of true. so i am not not able to see reactivate action
use this to check user is active or not
user(touser(username),"status")
Hi Anna ,
we don't have status ,in user fn
getting error
check your local!usrNm value ... this is wrong
use this local!usrNm:local!userDtl.username
if user doesn't exist in system it can be issue for ID NOT FOUND ?