locked
if lookup field is visible then it shouldn't pass empty RRS feed

  • Question

  • hi everyone,

    i have a custom entitiy on phonecall form in crm 2011

    i want to check if lookup field is visible then it shouldn't pass empty. user should choose a lookup item before save.

    is it possible? thx for answers.


    Crm Software Specialist


    Monday, December 31, 2012 7:57 AM

Answers

  • Hi,

    I hope you are hiding lookup field using JS. You can make field business required when lookup field is visible

     Xrm.Page.getAttribute("fieldname").setRequiredLevel("required");

    Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !
    Vikram !

    • Marked as answer by Ahmet Çankaya Monday, December 31, 2012 8:19 AM
    Monday, December 31, 2012 8:09 AM

All replies

  • Hello,

    Simple solution will be use control method to check visibility of the lookup and then set it required .

    or you can also write your custom js to check visibility and value in onsave method.


    Contact Me
    Follow me on Twitter
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

    Monday, December 31, 2012 8:08 AM
    Moderator
  • Hi,

    I hope you are hiding lookup field using JS. You can make field business required when lookup field is visible

     Xrm.Page.getAttribute("fieldname").setRequiredLevel("required");

    Hope this helps. If you get answer of your question, please mark the response as an answer and vote as helpful !
    Vikram !

    • Marked as answer by Ahmet Çankaya Monday, December 31, 2012 8:19 AM
    Monday, December 31, 2012 8:09 AM