oozy
oozy

Reputation: 23

Xrm.Utility.openEntityForm(entityType, null, parameters)

When I use "mywindow" like var is give my 'boll' answer

How can I make full screen of from entity?

var mywindow = Xrm.Utility.openEntityForm(entityType, null, parameters);
    mywindow .moveTo(0, 0);
    mywindow .resizeTo(screen.availWidth, screen.availHeight);

Upvotes: 1

Views: 3948

Answers (1)

James Wood
James Wood

Reputation: 17552

Xrm.Utility.openEntityForm returns a bool not a window, the bool indicates if the call to openEntityForm was successful.

As described in the Xrm.Utility Reference.

Return Value: Boolean. True if the operation is successful, otherwise false.

If you are looking at this bit (which is similar to your code above) of the same MSDN article I believe that the documentation is incorrect. Given the function returns a bool, I don't see how this is possible.

Open a new contact record, move it to the top left corner of the screen, and set the size of the window

var newWindow = Xrm.Utility.openEntityForm("contact");
newWindow.moveTo(0,0);
newWindow.resizeTo(800,600);

You could:

  1. On your first window use Xrm.Utility.openEntityForm(entityType, null, parameters);
  2. On your second window (that you just opened using openEntityForm) add the following onLoad event.

.

window.moveTo(0,0);
window.resizeTo(screen.availWidth, screen.availHeight);

Upvotes: 2

Related Questions