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)

Issue with Flyout Buttons

(0) ShareShare
ReportReport
Posted on by 245

Hi All,

I have created the Flyout button but when i clicked on the button no action is happening,

step 1: Created Flyout button (A)

step 2:Added Menu section in Flyout button

step 3:Placed a new button say (B) in menu section and created a command where i added my js file and function to it.

Step 4:Selected command which i created in Button B then published

function SalesCordinatorAssign(){

debugger;
var id =Xrm.Page.data.entity.getId();
var entityName = Xrm.Page.data.entity.getEntityName();
if (Xrm.Page.getAttribute("owner").getValue() != null) {
var lookupValue = new Array();
lookupValue[0] = new Object();
lookupValue[0].id = "032A183F-3FB3-E811-A951-000D3AB421B7";
lookupValue[0].name ="Anitha Venkatachalapathy";
lookupValue[0].entityType = "system user"
Xrm.Page.getAttribute(“FieldName”).setValue(lookupValue);
alert("Assigned to Sales Coordinator");
}

I guess the issue is with js code.On click of button B the owner field should be changed as above.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hi Divya,

    Entity types (  systemuser) should  be without space.

    lookupValue[0].entityType = "systemuser"

  • Verified answer
    NODAL Profile Picture
    860 on at

    Hi Divya,

    Check if schema name for Owner is correct.

    I guess it should be "ownerid"

    In this line "Xrm.Page.getAttribute("owner").getValue() != null"

    Regards,

    Nodal

  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi Divya,

    Try using the JS code below.

    function SalesCordinatorAssign() {
        debugger;
        var id = Xrm.Page.data.entity.getId();
        var entityName = Xrm.Page.data.entity.getEntityName();
        if (Xrm.Page.getAttribute("ownerid").getValue() != null) {
            var lookupValue = new Array();
            lookupValue[0] = new Object();
            lookupValue[0].id = "032A183F-3FB3-E811-A951-000D3AB421B7";
            lookupValue[0].name = "Anitha Venkatachalapathy";
            lookupValue[0].entityType = "systemuser";
            Xrm.Page.getAttribute("FieldLogicalName").setValue(lookupValue);
            alert("Assigned to Sales Coordinator");
        }
    }

    Hope this helps.

  • Suggested answer
    DivyaBharathi Profile Picture
    245 on at

    Thanks you for pointing me this.Now its working fine

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans