Dear Experts,
My client wants to have the Warehouse Code populate automatically on a Return when a line UDF return reason is marked as Damaged. If it is marked as any other return reason, it needs to default to the WH linked to the User Default linked to that User's setup.
I got the following FMS, but am not sure on the variable....
SELECT "Warehouse" = CASE WHEN $[RDN1.U_RT] = '1' THEN '02' WHEN $[RDN1.U_RT] <> '1' THEN (SELECT T2.[Warehouse] FROM ORDN T0 INNER JOIN OUSR T1 ON T0.[UserSign] = T1.[USERID] INNER JOIN OUDG T2 ON T1.[DfltsGroup] = T2.[Code] WHERE T0.[UserSign] = $[ORDN.Usersign]) END
Add comment