Skip to Content
0

FMS to populate Warehouse as per UDF otherwise link to Default WH set on User Defaults

Jan 20, 2017 at 08:04 PM

41

avatar image

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
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers