I have 2 mandatory fields in Interaction Record creation screen and i have written the code in ORDER_SAVE~CHECK_BEFORE_SAVE badi to stop the document save, also i made these two fields mandatory in UI configurration. it is working when i press END button on IR creation screen.
Now problem is that when we lock the Account & Contact in IC, at that moment IR get created in background but those 2 fields remains Empty, but the moment i click on END button here it is triggering the ORDER_SAVE badi but it is not stopping the document save & IR document gets created, even it moves on another screen.
i am not getting if same code is executing in ORDE_SAVE badi then why it is not prohibting the document save and not showing the error message.
i have tried with
CALL FUNCTION 'CRM_MESSAGE_COLLECT'
CALL METHOD lr_global_messages->add_message
both is not working.
Can anyone please suggest.