小编Ste*_*eve的帖子

Xrm在Dynamics CRM 2011中未定义

当我创建.js代码时,我似乎无法使我的Xrm变量工作.是否需要包含一个库或我需要先运行的函数?我是否需要确保正确引用ClientGlobalContext.js.aspx?我处于'C++'的思维模式中,只是想知道我是否需要运行任何类型的'include'命令.

我的js文件看起来像这样,如果我删除'window.parent'.从第二个函数开始,如果我调用它,代码就会中断.

///<reference path="C:\Users\steve.lee\Downloads\XrmPage-vsdoc.js"/>

if (typeof (SDK) == "undefined") 
{ SDK = { __namespace: true }; }

SDK.XRM = {
    getCurrentControl: function () {
        var currentControl = Xrm.Page.ui.getCurrentControl();
        if (currentControl == null) {
            alert("No controls currently have focus.");
        }
        else {
            alert("The control for the '" + currentControl.getLabel() + "' attribute currently has focus.");
        }
    },

    getCurrentGUID: function () {

        if (window.parent.Xrm.Page.data.entity != null) {
            var GUIDvalue = window.parent.Xrm.Page.data.entity.getId();
            if (GUIDvalue != null) {
                return GUIDvalue;
            }
            else {
                return …
Run Code Online (Sandbox Code Playgroud)

dynamics-crm-2011

4
推荐指数
1
解决办法
7471
查看次数

GridView.LayoutParams不存在,Android代码中断

我正在关注Android的HelloWorld教程,但是当我进行GridView练习时(http://developer.android.com/resources/tutorials/views/hello-gridview.html)

我发现如果我注释掉这行:imageView.setLayoutParams(new GridView.LayoutParams(85,85));

一切正常.我做了一些研究,发现GridView.LayoutParams不存在.难道我做错了什么?教程是否破碎?

android android-layout

3
推荐指数
2
解决办法
2082
查看次数