Hi @Ankur Bawiskar 

no its not going inside if . I think its because table sys id in attachment table is empty. Pl guide