Can someone please help me understand what is wrong with below TDL code to make PAN mandatory when Creating or Altering a Party Master under Primary Group 'Sundry Debtors'? For some reason it still follows the default behaviour of allowing Blank(empty) PAN field for Sundry Debtors. Code: [#Field: LED ITNo] Validate : $$ClearLEDPanStatus2:$$Value [Function: ClearLEDPanStatus2] Parameter : pInputPAN : String 0100 : DO IF : ($$IsEmpty:##pInputPAN AND NOT ($_PrimaryGroup IN ($$GroupSundryDebtors))) OR ##pInputPAN In ("PANAPPLIED", "PANNOTAVBL", "PANINVALID", "PANNOTREQD") : RETURN : Yes 0110 : Set Target 0120 : Set Value : PAN Status : "" 0130 : Set Value : Deductee Reference : "" 1000 : Return : Yes In the 'LED ITNo' field's validation, I simply replaced the original Function ClearLEDPanStatus with a New Function ClearLEDPanStatus2 where I only made a change in the first OR Condition of the original line: Code: 0100 : DO IF : ($$IsEmpty:##pInputPAN) OR ##pInputPAN In ("PANAPPLIED", "PANNOTAVBL", "PANINVALID", "PANNOTREQD") : RETURN : Yes
Sir, thank you for the reply, I tried it, but it didn't work. I also tried Delete & Add with Validation instead of Validate. Before I come back here, I tried to figure out myself what else could be wrong, but still had no luck. Code: [#Field: LED ITNo] Delete : Validate Add: Validate : $$ClearLEDPanStatus2:$$Value [Function: ClearLEDPanStatus2] Parameter : pInputPAN : String 0100 : DO IF : ($$IsEmpty:##pInputPAN AND NOT ($_PrimaryGroup IN ($$GroupSundryDebtors))) OR ##pInputPAN In ("PANAPPLIED", "PANNOTAVBL", "PANINVALID", "PANNOTREQD") : RETURN : Yes 0110 : Set Target 0120 : Set Value : PAN Status : "" 0130 : Set Value : Deductee Reference : "" 1000 : Return : Yes