2015年12月10日 星期四

Reset CSS – 重置歸零 – 網頁排版在各瀏覽器一致化

Reset CSS – 重置歸零 – 網頁排版在各瀏覽器一致化
只要在寫 CSS 前掛上這一段「Reset CSS」的語法,就可以解決各大瀏覽器初始化的差異


<style>
/* v1.0 | 20080212 */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-size: 100%;
    vertical-align: baseline;
    background: transparent;
}
body {
    line-height: 1;
}
ol, ul {
    list-style: none;
}
blockquote, q {
    quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}

/* remember to define focus styles! */
:focus {
    outline: 0;
}

/* remember to highlight inserts somehow! */
ins {
    text-decoration: none;
}
del {
    text-decoration: line-through;
}

/* tables still need 'cellspacing="0"' in the markup */
table {
    border-collapse: collapse;
    border-spacing: 0;
}
</style>


DownLoad: http://meyerweb.com/eric/tools/css/reset/reset.css

Source: http://meyerweb.com/eric/tools/css/reset/

Reference: http://www.flycan.com/article/css/reset-css-562.html

ASP.NET 選擇性引數函式範例

ASP.NET 選擇性引數函式範例


cs
    /// 
    /// 選擇性引數函式範例
    /// 
    public partial class tsExampleMethod : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ExampleClass anExample = new ExampleClass();
            string a = anExample.ExampleMethod(1, "One", 1);
            string b = anExample.ExampleMethod(2, "Two");
            string c = anExample.ExampleMethod(3);

            Response.Write(a);
            Response.Write(b);
            Response.Write(c);
        }
    }


class ExampleClass
    {
        private string _name;

        // Because the parameter for the constructor, name, has a default 
        // value assigned to it, it is optional. 
        public ExampleClass(string name = "Default name")
        {
            _name = name;
        }

        // The first parameter, required, has no default value assigned 
        // to it. Therefore, it is not optional. Both optionalstr and  
        // optionalint have default values assigned to them. They are optional. 
        public string ExampleMethod(int required, string optionalstr = "default string",
            int optionalint = 10)
        {
            return string.Format("{0}: {1}, {2}, and {3}.", _name, required, optionalstr,
                optionalint);

        }
    }

2015年12月9日 星期三

Searching in SQL Multiple Keyword

SQL 多條件查詢

使用逗號間隔多關鍵字查詢及對多個欄位進行搜查,組合條件為"或"。
※逗號前後不可留空白,否則會查出全部的資料



SQL
DECLARE @strKeyword    VARCHAR(512);
SET @strKeyword = 'john,howard,lee';

SELECT * FROM v_HRM_Evaluation 
JOIN dbo.FN_SPLIT_TBL(@strKeyword,',') tblB 
ON name + batchnumber + jobtitles + 
CONVERT(varchar(30),joblevel) +  workingfunc + 
ogno + ogname + ouno + ouname + ename + status + 
CONVERT(varchar(30),cdt,120) LIKE '%'+tblB.Value+'%'  
WHERE 1=1 


FN_SPLIT_TBL
--註:字串切割,用在單一欄位多條件同時查詢,如:(Select * from Table Where name like '%張%' or name like '%陳%' or name like '%王%')
--引用範例(一):
--select tblA.* from t_HRM_Evaluation tblA join dbo.FN_SPLIT_TBL('張,陳,王',',') tblB on tblA.name like '%'+tblB.Value+'%'
--引用範例(二):
--SELECT dbo.[FN_SPLIT](Name.Value, 2, '=') as Name,
--dbo.[FN_SPLIT](Age.Value, 2, '=') as Age,
--dbo.[FN_SPLIT](Job.Value, 2, '=') as Job,
--dbo.[FN_SPLIT](Location.Value, 2, '=') as Location,
--dbo.[FN_SPLIT](Add_Date.Value, 2, '=') as Add_Date
--FROM HR data
--    CROSS APPLY FN_SPLIT_TBL(data.Details, '|') Name
--    CROSS APPLY FN_SPLIT_TBL(data.Details, '|') Age
--    CROSS APPLY FN_SPLIT_TBL(data.Details, '|') Job
--    CROSS APPLY FN_SPLIT_TBL(data.Details, '|') Location
--    CROSS APPLY FN_SPLIT_TBL(data.Details, '|') Add_Date
--WHERE Name.Pos = 1 AND Age.Pos = 2 AND Job.Pos = 3 AND Location.Pos = 4 AND Add_Date.Pos = 5

CREATE FUNCTION [dbo].[FN_SPLIT_TBL](@InExp varchar(8000), @Sep varchar(10)) --SELECT * FROM DBO.[FN_SPLIT_TBL]('TEST1,TEST2', ',')
RETURNS @Res    TABLE(
    Pos         int,
    Value       varchar(max))
AS
BEGIN
    WITH Pieces(pn, start, stop) AS (
        SELECT 1, 1, CHARINDEX(@Sep, @InExp)
        UNION ALL
        SELECT pn + 1, stop + 1, CHARINDEX(@sep, @InExp, stop + 1)
        FROM Pieces
        WHERE stop > 0
    )

    INSERT INTO @Res
    SELECT pn, SUBSTRING(@InExp, start, CASE WHEN stop > 0 THEN stop-start ELSE 512 END) AS s
    FROM Pieces OPTION (MAXRECURSION 0);

    RETURN;
END


FN_SPLIT
--註:無
--引用範例(一):
--SELECT 
--dbo.[FN_SPLIT](data.Name, 2, '=') as Name,
--dbo.[FN_SPLIT](data.Age, 2, '=') as Age,
--dbo.[FN_SPLIT](data.Job, 2, '=') as Job,
--dbo.[FN_SPLIT](data.Location, 2, '=') as Location,
--dbo.[FN_SPLIT](data.Add_Date, 2, '=') as Add_Date
--FROM (
--    SELECT 
--    dbo.[FN_SPLIT](Details, 1, '|') as Name,
--    dbo.[FN_SPLIT](Details, 2, '|') as Age,
--    dbo.[FN_SPLIT](Details, 3, '|') as Job,
--    dbo.[FN_SPLIT](Details, 4, '|') as Location,
--    dbo.[FN_SPLIT](Details, 5, '|') as Add_Date
--    FROM HR) data



CREATE FUNCTION [dbo].[FN_SPLIT] ( --SELECT DBO.FN_SPLIT('TEST1 , TEST2', 2, ',')
    @s varchar(512),
    @i int,
    @sep char(1) = ',')
RETURNS varchar(512)
AS
BEGIN
    DECLARE @Ret    VARCHAR(512);

    WITH Pieces(pn, start, stop) AS (
      SELECT 1, 1, CHARINDEX(@sep, @s)
      UNION ALL
      SELECT pn + 1, stop + 1, CHARINDEX(@sep, @s, stop + 1)
      FROM Pieces
      WHERE stop > 0
    )
    SELECT @Ret =
    RTRIM(SUBSTRING(@s, start, CASE WHEN stop > 0 THEN stop-start ELSE 512 END))
    FROM Pieces
    WHERE pn = @i

    RETURN @Ret;
END

Searching in ASP.Net GridView Multiple Parameters

Searching in ASP.Net GridView Multiple Parameters

cs
private void BindData()
{
    string conString = ConfigurationManager.ConnectionStrings["constr"].ConnectionString;
    string query = "select * from customers where (name like '%' + @name + '%' or @name = '') and (age = @age or @age= 0) and (mobile = @mobile or @mobile= '') and (city = @city or @city= '')";
    SqlCommand cmd = new SqlCommand(query);
    cmd.Parameters.AddWithValue("@name", txtName.Text.Trim());
    cmd.Parameters.AddWithValue("@age", txtAge.Text.Trim() == "" ? 0 txtAge.Text.Trim());
    cmd.Parameters.AddWithValue("@mobile", txtMobile.Text.Trim());
    cmd.Parameters.AddWithValue("@city", ddlCity.SelectedIndex > 0 ? ddlCity.SelectedValue : "");
    using (SqlConnection con = new SqlConnection(conString))
    {
        using (SqlDataAdapter sda = new SqlDataAdapter())
        {
            cmd.Connection = con; sda.SelectCommand = cmd;
            using (DataSet ds = new DataSet())
            {
                sda.Fill(ds);
                GridView1.DataSource = ds;
                GridView1.DataBind();
            }
        }
    }
}



ref url:

CRM2011 How to get Options Set Value in DataBase?

CRM2011 How to get Options Set Value in DataBase?



StringMap table
SELECT AttributeValue, Value
FROM StringMap
WHERE ObjectTypeCode = 1 -- entity type code 1 = account
AND AttributeName = 'statecode' --fieldname


Entity Type Code
SELECT EntityId, Name, ObjectTypeCode
FROM [MetadataSchema].[Entity]
ORDER BY Name

2015年12月8日 星期二

CRM2011 Get Entity/Attribute's Display Name from CRM database

CRM2011 Get Entity/Attribute's Display Name from CRM database
從資料庫取得CRM2011 Attribute Display Name







SELECT  EntityView.Name AS EntityName, LocalizedLabelView_1.Label AS EntityDisplayName,
       AttributeView.Name AS AttributeName, LocalizedLabelView_2.Label AS AttributeDisplayName
FROM    LocalizedLabelView AS LocalizedLabelView_2 INNER JOIN
       AttributeView ON LocalizedLabelView_2.ObjectId = AttributeView.AttributeId RIGHT OUTER JOIN
       EntityView INNER JOIN
       LocalizedLabelView AS LocalizedLabelView_1 ON EntityView.EntityId = LocalizedLabelView_1.ObjectId ON
       AttributeView.EntityId = EntityView.EntityId
WHERE   LocalizedLabelView_1.ObjectColumnName = 'LocalizedName'
 AND LocalizedLabelView_2.ObjectColumnName = 'DisplayName'
 AND LocalizedLabelView_1.LanguageId = '1033'
 AND LocalizedLabelView_2.LanguageId = '1033'
 AND EntityView.Name IN ('Account','Contact')
ORDER BY EntityName, AttributeName


reference from: http://jianwang.blogspot.tw/2009/03/get-entityattributes-display-name-from.html

2015年11月5日 星期四

CRM2011 使用Advanced Find取得Mail Regarding數量

CRM2011 使用Advanced Find取得Mail Regarding數量


指定下列兩個條件:
Activity Type Equals E-mail
Regarding Contains Data(like) Null



PS:
說明Regarding Contains Data(like) Null:
強制加入此條件不設定任何範圍,表示只要有Regarding Mail都會被找出來。如圖
以上Thanks

2015年11月2日 星期一

Ajax TabContainer

Ajax TabContainer



HTML:
<body>
    <form id="form1" runat="server">
    <div>

    <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </ajaxToolkit:ToolkitScriptManager>
    <ajaxToolkit:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" 
        Width="287px">
        <ajaxToolkit:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1">
            <ContentTemplate>
                Tab Content 1
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
            </ContentTemplate>
        </ajaxToolkit:TabPanel>
        <ajaxToolkit:TabPanel runat="server" HeaderText="TabPanel2" ID="TabPanel2">
            <ContentTemplate>
                Tab Content 2
                <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
            </ContentTemplate>
        </ajaxToolkit:TabPanel>
        <ajaxToolkit:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3">
            <ContentTemplate>
                Tab Content 3
                <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
                <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
                <asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
            </ContentTemplate>
        </ajaxToolkit:TabPanel>
    </ajaxToolkit:TabContainer>
    </div>
    </form>
</body>

2015年10月28日 星期三

JavaScript TextBox Number Range

JavaScript TextBox Number Range



JavaScript:
<script language="javascript" type="text/javascript">
        function textbox(obj, maxvalue, minvalue) {
            if (obj.value != "") {
                if (parseInt(obj.value) == obj.value && parseInt(obj.value) >= minvalue && parseInt(obj.value) <= maxvalue) {
                    //do nothing
                }
                else {
                    alert('Please enter ' + minvalue + ' - ' + maxvalue + '');
                    obj.value = "";
                }
            }
        }
</script>

HTML:
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="TextBox1" runat="server" TextMode="Number"></asp:TextBox>
        <asp:TextBox ID="TextBox2" runat="server" TextMode="Number"></asp:TextBox>
    </div>
    </form>
</body>

C#:
protected void Page_Load(object sender, EventArgs e)
        {
            //onblur
            TextBox1.Attributes.Add("onblur", "textbox(" + TextBox1.ClientID + ", 10, 0)");
            TextBox2.Attributes.Add("onblur", "textbox(" + TextBox1.ClientID + ", 5, 1)");

            //onkeydown
            //TextBox1.Attributes.Add("onkeydown", "textbox(" + TextBox1.ClientID + ", 10, 0)");
            //TextBox2.Attributes.Add("onkeydown", "textbox(" + TextBox1.ClientID + ", 5, 1)");
        }

2015年10月14日 星期三

UpdatePanel use Script

UpdatePanel use Script


C#:
ScriptManager.RegisterClientScriptBlock(this.Page, this.Page.GetType(), "alert", "alert('Member Registered Sucessfully');", true)

2015年7月28日 星期二

ASP.NET System.Threading.ThreadAbortException: 執行緒已經中止

ASP.NET System.Threading.ThreadAbortException: 執行緒已經中止


Error Msg:
System.Threading.ThreadAbortException: 執行緒已經中止。     於 System.Threading.Thread.AbortInternal()     於 System.Threading.Thread.Abort(Object stateInfo)     於 System.Web.HttpResponse.AbortCurrentThread()     於 WebHRM.login.btnLogin_Click(Object sender, EventArgs e)


解決方案:https://support.microsoft.com/zh-tw/kb/918181
<%@ Page Language="C#" Async="true"%>

HttpResponse.Redirect 方法 endResponse 參數不設為 false 時,就會發生這個問題。 根據預設值,endResponse 參數設定為 true。



轉貼連結:http://www.dotblogs.com.tw/boei/archive/2010/07/11/16485.aspx
將網頁轉出成word的時候,最後會來個Response.End()來結束它的輸出,但都會發生<System.Threading.ThreadAbortException> 執行緒已經中止,雖然不會造成系統上的什麼問題。
解決方法:
1.    繼續用Response.End(),外面用try – catch包住,但try – catch會比較消耗資源,所以不考慮。
2.    改用HttpContext.Current.ApplicationInstance.CompleteRequest(),可以跳過Application_EndRequest 事件的執行。
 
如果使用Response.Redirect 或 Server.Transfer 方法也發生一樣狀況的話,就可以使用Response.Redirect(String url, bool endResponse),endResponse就設為False,因為Response.Redirect內部會用到Response.End(),設為False就是要停用Response.End()方法。

2015年7月7日 星期二

How to set Option set value to null CRM 2011




JavaScript:
function OnLoadForm(){
    setTwoOptionNull("new_tender");
}
function setTwoOptionNull(twoOption) {
    var isCreateForm = Xrm.Page.ui.getFormType() == 1;
    var twoOptionField = Xrm.Page.getAttribute(twoOption);
    var twoOptionValue = twoOptionField.getValue();
    if (isCreateForm) {
        twoOptionField.setValue(null); // set the value to null on create
        twoOptionField.setSubmitMode("always"); // required to store the null value
        document.getElementById("rad_" + twoOption + "1").onclick = function () { 
            if (twoOptionValue == false) {
                twoOptionField.setValue(true);
                twoOptionField.setValue(false);
            }
        }
    }
}

2015年6月11日 星期四

ASP.NET Using foreach loop with DataList on Submit

ASP.NET Using foreach loop with DataList on Submit
在送出之前將 DataList 的 Items 使用迴圈取出

HTML:
<form id="form1" runat="server">
<asp:DataList ID="DataList1" runat="server" Width="99.9%" RepeatDirection="Vertical">
                    <ItemStyle BorderWidth="1" />
                    <ItemTemplate>
                        <asp:HiddenField ID="hifDlobjectype_code" runat="server" Value="A1234" />
                    </ItemTemplate>
                </asp:DataList>

<asp:Button ID="btnSubmit" runat="server" Text="送出" Width="100px" OnClick="btnSubmit_Click" />
</form>

C#:
protected void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                DataList dl = DataList1;

                foreach (DataListItem dli in dl.Items)
                {
                    string hifDlobjectype_code = ((HiddenField)dli.FindControl("hifDlobjectype_code")).Value;
                }
            }
            catch (Exception)
            {

                throw;
            }
        }

2015年6月10日 星期三

ASP.NET Timer

ASP.NET Timer

網頁每隔10秒自動重新整理網頁,搭配UpdatePanel使用


HTML:
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:Timer ID="Timer1" runat="server" Interval="10000" OnTick="Timer1_Tick"
        oninit="Timer1_Init">
    </asp:Timer>
    <div>
        <asp:Label ID="Label1" runat="server" Text="網頁開啟時間:"></asp:Label>
        <asp:Label ID="Label2" runat="server" Text=""></asp:Label>
        <p>
        </p>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" />
            </Triggers>
            <ContentTemplate>
                <asp:Label ID="Label3" runat="server" Text="每隔10秒重新整理:"></asp:Label>
                <asp:Label ID="Label4" runat="server" Text=""></asp:Label>
            </ContentTemplate>
        </asp:UpdatePanel>
        <p>
        </p>
    </div>
    </form>
</body>

C#:
protected void Page_Load(object sender, EventArgs e)
{
    Label2.Text = DateTime.Now.ToString();
    Label4.Text = DateTime.Now.ToString();
}

protected void Timer1_Init(object sender, EventArgs e)
{
    Timer1.Interval = 10000; //每10秒執行一次
}

protected void Timer1_Tick(object sender, EventArgs e)
{
    Label4.Text = "UpdatePanel1 refreshed at " + DateTime.Now.ToString();
}

2015年6月3日 星期三

ASP.NET Access Master Page Control

Access Master Page Control



Get Master1-TextBox1
C#:
MasterPage master1 = Master.Master;
TextBox textbox1 = master1.FindControl("TextBox1") as TextBox;

Get Master2-TextBox2
C#:
ContentPlaceHolder mpContentPlaceHolder = (ContentPlaceHolder)master1.FindControl("ContentPlaceHolder1");
if (mpContentPlaceHolder != null)
{
    TextBox textbox2 = mpContentPlaceHolder.FindControl("TextBox2") as TextBox;
}

2015年2月12日 星期四

CRM 2011 Set the value of a field in JavaScript

CRM 2011 Set the value of a field in JavaScript

JavaScript:
function OnLoad()
{
   Xrm.Page.getAttribute("FieldSchemaName").setValue("Value");
}

CRM 2011 Get the value from a field in JavaScript

CRM 2011 Get the value from a field in JavaScript

JavaScript:
function OnLoad()
{
   var crmFieldValue = Xrm.Page.getAttribute("FieldSchemaName").getValue();
}

CRM 2011 Close the form in JavaScript

CRM 2011 Close the form in JavaScript

JavaScript:
function OnSave()
{
   Xrm.Page.ui.close();
}


/*** Other Sample ***/

function SaveAndClose()
{
    Xrm.Page.data.entity.save();
    if (parent.opener != undefined)
    {
        window.parent.close();
    }
    else
        Xrm.Page.ui.close();

}

CRM 2011 Get logged in User Id in JavaScript

CRM 2011 Get logged in User Id in JavaScript

JavaScript:
function OnLoad()
{
   var userId = Xrm.Page.context.getUserId();
}

CRM 2011 Get Organization Name in JavaScript

CRM 2011 Get Organization Name in JavaScript

JavaScript:
function OnLoad()
{
   var orgName = Xrm.Page.context.getOrgUniqueName();
}

CRM 2011 Hidden Tab in JavaScript

CRM 2011 Hidden Tab  in JavaScript

JavaScript:
function hiddenTab ()
{
    var statecode;
    var statecodeValue;  
    var visible = false;

    statecode = Xrm.Page.data.entity.attributes.get("statecode");  

    if (statecode != null && statecode.getValue() != null)
    {      
             statecodeValue = statecode.getValue();      
             if(statecodeValue != "1")          
             visible = true;  
    }

    Xrm.Page.ui.tabs.get('tab_3').setVisible(visible);
}

CRM 2011 Get the entityId in JavaScript, Get Current record ID

CRM 2011 Get the EntityId in JavaScript, Get Current record ID

JavaScript:
function OnLoad()
{
    var entityId = Xrm.Page.data.entity.getId();
}

CRM 2011 Get the Entity Name in JavaScript

CRM 2011 Get the Entity Name in JavaScript

JavaScript:
function OnLoad()
{
    var entityName = Xrm.Page.data.entity.getEntityName();
}

CRM 2011 Get Server url in JavaScript

CRM 2011 Get Server url in JavaScript

JavaScript:
function OnLoad()
{
   var serverUrl = Xrm.Page.context.getServerUrl();
}

CRM 2011 Save Code in JavaScript

CRM 2011 Save Code in JavaScript

JavaScript:
Xrm.Page.data.entity.save(); // for saving a record
Xrm.Page.data.entity.save("saveandclose"); // for save and close
Xrm.Page.data.entity.save("saveandnew"); // for save and new

CRM 2011 中止OnSave時儲存到實體資料庫

CRM 2011 中止OnSave時儲存到實體資料庫
CRM 2011 stop onsave

JavaScript:
function OnSave(executionObj)
{
       executionObj.getEventArgs().preventDefault();
       return false;
}

CRM 2011 取得表單Status Value

CRM 2011 取得表單Status Value
CRM 2011 Get Form Status Value

JavaScript:
function OnLoad()
{
 alert(Xrm.Page.data.entity.attributes.get("statuscode").getValue());

        if (Xrm.Page.data.entity.attributes.get("statuscode").getValue() == 1)
       {
           // Code
       }
}


Entity
Status (statecode)
Associated Status Reason (statuscode)
Account (account)
0 Active
1 Active
1 Inactive
2 Inactive
Activity (activitypointer)
0 Open
1 Open
1 Completed
2 Completed
2 Canceled
3 Canceled
3 Scheduled
4 Scheduled
Appointment (appointment)
0 Open
1 Free
2 Tentative
1 Completed
3 Completed
2 Canceled
4 Canceled
3 Scheduled
5 Busy
6 Out of Office
Article (kbarticle)
1 Draft
1 Draft
2 Unapproved
2 Unapproved
3 Published
3 Published
Campaign (campaign)
0 Active
0 Proposed
1 Ready To Launch
2 Launched
3 Completed
4 Canceled
5 Suspended
Campaign Activity (campaignactivity)
0 Open
0 In Progress
1 Proposed
4 Pending
5 System Aborted
6 Completed
1 Closed
2 Closed
2 Canceled
3 Canceled
Campaign Response (campaignresponse)
0 Open
1 Open
1 Closed
2 Closed
2 Canceled
3 Canceled
Case (incident)
0 Active
1 In Progress
2 On Hold
3 Waiting for Details
4 Researching
1 Resolved
5 Problem Solved
2 Canceled
6 Canceled
Case Resolution (incidentresolution, notcustomizable)
0 Open
1 Open
1 Completed
2 Closed
2 Canceled
3 Canceled
Contact (contact)
0 Active
1 Active
1 Inactive
2 Inactive
Contract (contract)
0 Draft
1 Draft
1 Invoiced
2 Invoiced
2 Active
3 Active
3 On Hold
4 On Hold
4 Canceled
5 Canceled
5 Expired
6 Expired
Contract Line (contractdetail)
0 Existing
1 New
1 Renewed
2 Renewed
2 Canceled
3 Canceled
3 Expired
4 Expired
Currency (transactioncurrency)
0 Active
0 Active
1 Inactive
1 Inactive
Discount (discounttype)
0 Active
100001 Active
1 Inactive
100002 Inactive
E-mail (email)
0 Open
1 Draft
8 Failed
1 Completed
2 Completed
3 Sent
4 Received
6 Pending Send
7 Sending
2 Canceled
5 Canceled
Fax (fax)
0 Open
1 Open
1 Completed
2 Completed
3 Sent
4 Received
2 Canceled
5 Canceled
Invoice (invoice)
0 Active
1 New
2 Partially Shipped
4 Billed
5 Booked (applies to services)
6 Installed (applies to services)
1 Closed (deprecated)
3 Canceled (deprecated)
7 Paid in Full (deprecated
2 Paid
100001 Complete
100002 Parial
3 Canceled
100003 Canceled
Lead (lead)
0 Open
1 New
2 Contacted
1 Qualified
3 Qualified
2 Disqualified
4 Lost
5 Cannot Contact
6 No Longer Interested
7 Canceled
Letter (letter)
0 Open
1 Open
2 Draft
1 Completed
3 Received
4 Sent
2 Canceled
5 Canceled
Marketing List (list)
0 Active
0 Active
1 Inactive
1 Inactive
Opportunity (opportunity)
0 Open
1 In Progress
2 On Hold
1 Won
3 Won
2 Lost
4 Canceled
5 Out-Sold
Order (salesorder)
0 Active
1 New
2 Pending
1 Submitted
3 In Progress
2 Canceled
4 No Money
3 Fulfilled
100001 Complete
100002 Partial
4 Invoiced
10003 Invoiced
Phone Call (phonecall)
0 Open
1 Open
1 Completed
2 Made
4 Received
2 Canceled
3 Canceled
Price List (pricelevel)
0 Active
100001 Active
1 Inactive
10002 Inactive
Product (product)
0 Active
1 Active
1 Inactive
2 Inactive
Quote (quote)
0 Draft
1 In Progress
1 Active
2 In Progress
3 Open
2 Won
4 Won
5 Out-Sold
3 Closed
5 Lost
6 Canceled
7 Revised
Service Activity (serviceappointment)
0 Open
1 Requested
2 Tentative
1 Closed
8 Completed
2 Canceled
9 Canceled
10 No Show
3 Scheduled
3 Pending
4 Reserved
6 In Progress
7 Arrived
Task (task)
0 Open
2 Not Started
3 In Progress
4 Waiting on someone else
7 Deferred
1 Completed
5 Completed
2 Canceled
6 Canceled