web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Owner field 'Look for' set default to team

(0) ShareShare
ReportReport
Posted on by 1,077

Hi All,

I have two fields Case Type and Owner.  

Now my requirement is, on selection of case type value i.e.,'Help Desk', the owner field 'Look For' view auto set with Team and value auto set with 'Cloud Support' 

We have added team as 'Cloud Support' with 3 members. By default 'look for' value is user.

How can i achieve this task.

Thanks in advance.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    33,628 on at

    Hi,

    if you are using V9.0 refer below article else there is not supported code below v9.0

    butenko.pro/.../microsoft-dynamics-365-v9-0-lookupobjects-closer-look

  • Suresh Sorde Profile Picture
    1,077 on at

    Thanks for reply Wei,

    Can you please tell unsupported code. Since we are using old version 2016. Not upgraded with v9.

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    33,628 on at

    Hi,

    I personallywont recommend you to do this, as the script will break in any times or in future updates.But if you insist, you can take a look at below post.

    [View:https://community.dynamics.com/crm/f/117/t/186304]

  • Suresh Sorde Profile Picture
    1,077 on at

    Thanks again Wei,

    I will try this solution and let you know status.

    Thanks

  • abm abm Profile Picture
    31 Most Valuable Professional on at

    Hi,

    Do you want to auto set to owner of the record team 'Cloud Support' if case type is 'Help Desk'?  Please let me know.

    Thanks

  • Suresh Sorde Profile Picture
    1,077 on at

    Thanks mydeveexperience,

    yes, that's what i want.

    Thanks

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    33,628 on at

    Hi,

    you can use Javascript to set the owner to team

    community.dynamics.com/.../how-to-get-and-set-a-lookup-field-using-javascript-in-dynamics-365

    replace the recordid, recordname and entityname into correct value.

    Xrm.Page

  • Verified answer
    Alex Fun Wei Jie Profile Picture
    33,628 on at

    Hi,

    I missed your second part , set the owner.

    You can use below code to do it, you have to modify a bit.

    function setOwner()
    {
    var optionset = Xrm.Page.getAttribute("new_optionset").getValue(); // your condition field

    if ( optionset == 100000001) // condition field value
    {
    var lookupValue = new Array();

    lookupValue[0] = new Object();

    lookupValue[0].id = "92EC3861-8D59-E811-815C-080027878DE4"; //team id

    lookupValue[0].name = "Custom Team"; //team name

    lookupValue[0].entityType = "team";  

    Xrm.Page.getAttribute("ownerid").setValue(lookupValue);
    }

    else

    {

      // what you going to do

    }
    }

  • Suresh Sorde Profile Picture
    1,077 on at

    HI Wei,

    I follow your last post reference. Its giving me Error -Object doesn't support property or method 'setLookupTypes'.

    Not able to change Look For of lookup.

    Thanks

  • Alex Fun Wei Jie Profile Picture
    33,628 on at

    Hi,

    as mentioned earlier, that is unsupported code, meaning it has possibilities to break if newest version. Nerveless,

    I had wrote you a solution for you, take a look on above post.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
AS-17030037-0 Profile Picture

AS-17030037-0 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans