When does the file set $$portfolio? Does it have a value? If you manually switch to a list layout showing SR records can you view any records?
when they hit the portfolio layout the variable is set. if they change records while on the same layout the variable is reset.
Yes, using the data viewer I can see that the variable is setting correctly. The solution works in a standalone scenario, just not on the server.
The user is unable to go to an SR layout without using the button that performs a GTRR. If I remove the config ($$portfolio=portfolio) from the security profile then the user will be taken to a list of related records when clicking the button but once they perform a find it is open to see records from other portfolios.
OK so let's get some more detail here.
How is the field portfolio defined?
What is the script and what is the script trigger being used?
Portfolio::portfolio - Text - Indexed, Can't Modify Auto, Always Validate, Require Value, Unique
SR::portfolio - Text - Indexed, Can't Modify Auto
When landing on the portfolio layout the OnRecordLoad ST runs the following script.
Set Variable [$$portfolio; Value:PORTFOLIO::portfolio]
So if the user changes records the variable updates.
To jump to the SR layout the user clicks a button that runs the following sctipt with the parameter "SR".
Perform Script [ “Allow User Abort” ]
Perform Script [ “Set Error Capture” ]
If [ Get ( ScriptParameter ) = "SR" ]
Go to Related Record [ From table: “SR”; Using layout: “SR_List” (SR) ] [ Show only related records ]
Else If [ Get ( ScriptParameter ) = "RMA" ]
Go to Related Record [ From table: “RMA”; Using layout: “RMA_Form” (RMA) ] [ Show only related records ]