on 05-25-2011 3:39 PM
Hi,
I have the below formatted search, which works, to get a gl account from a service call linked to a sales order via a UDF (U_CallID).
select case when ISNULL($[RDR1.BASEENTRY],0) > 0
THEN $[$38.159]
when isnull($[ORDR.U_CalliD],'') = '' then $[$38.159.0]
else
(SELECT U_FormatCode
FROM OSCL (nolock)
WHERE (OSCL.callID = $[ORDR.U_CalliD]))
end as GLAcct
I now need to modify this to only apply the last else statement for when OSCL.CallType in (10,13,15) or OSCL.Customer = 'IDept01'
If the OSCL.Calltype <> 10, 13 ,15 then = $[$38.159.0] needs to apply.
Your assistance will be much appreciated.
Jacques
Hi Jacques,
I am not quite sure what is your exact request. Check this first:
select case when ISNULL($[RDR1.BASEENTRY],0) > 0
THEN $[$38.159.0]
when isnull($[ORDR.U_CalliD],'') = '' then $[$38.159.0]
else
(SELECT T0.U_FormatCode
FROM OSCL T0 (nolock)
WHERE T0.callID = $[ORDR.U_CalliD] AND (T0.CallType in (10,13,15) OR T0.Customer = 'IDept01'))
end as GLAcct
Thanks,
Gordon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gordon I have tried this without success.
Some background:
We are applying a GL Account (U_FormatCode from the linked service call. This used to apply for all sales orders linked to a service call via the U_Callid. The logic did however change now that it should only be applied for the three call types mentioned earlier (10,13,15) when the U_CallId is <> Null. For all other call types the GL account setup on the Item Master should be applied.
I believe another when statement might have to be added state that if the call types linked to the service call is <> 10, 13,15 then $[$38.159.0] but an not sure how to do this.
I hope this makes more sense...?
Jacques
User | Count |
---|---|
101 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.