Saturday, 26 December 2015

Windows 10 updates makes trouble in opening the virtual box

Hi There,


Recently i had an issue with my Windows 10 OS, As my computer updated automatically and then  my virtual box(Oracle) stopped working.

Virtualbox is not opening at all.

So the solution to this issue is just simply restore the windows(OS) to previous state.

Then the problem  will be solved, i am able to open to my VirtuaLBox.

I hope if anyone facing this issue will get resolved with this option.


Cheers:-) 

RealTime Scenario

1. > Create 4 contact record. (A,B,C,D)
2. > 3(B,C,D) Contact record will be child of 1(A-Parent)
3. > When ever A-Parent information will be changed should be refelected to their respective child also. -plugin/Jscript
4. > Selection of parent lookup -- Data wil be fetch through Jscript OData.
Description
-----------
Optionset value -> Parent/Child

[ If parent is selected from parent/child field then parent field and parent section fields parentemail and parentphonenumber will be disabled]
[ if child is selected from parent/child field then parent field should be required field and the parent section fields parentemail and parentphonenumber should be
auto populated from parent record].



Create new entity Donation
create fields
-------------
parent/child = optionset = parent, child(business required field)
parent = lookup to itself
emailaddress = text field
phonenumber = phonenumber
gender = optionset= male/female
companyname = text field
designation = text field
city = text field
country = lookup to country entity//(in the country entity only add country field)


CREATE NEW SECTION CALLED PARENT SECTION LABEL(TWO COLUMN)
Fields
-----
parentemail = text field
parentphonenumber = text field

======================================================================
Javascript  is as follows:

function FormOnLoad() {
    /*For Type
    0 -Undefined
    c  1- Create
    u 2-Update
    r 3-ReadOnly
    d 4 -Disabled
    */
    var type = Xrm.Page.ui.getFormType();
    Xrm.Page.getControl("new_parentemail").setDisabled(true);
    Xrm.Page.getControl("new_parentphonenumber").setDisabled(true);
    if (type == 1) {//Create Mode
        //TODO : by default optionset value will be parent and parent lookup should be disabled.
        var optionSet = Xrm.Page.data.entity.attributes.get("new_parentchildoptionset");
        optionSet.setValue(100000000);
        Xrm.Page.getControl("new_parent").setDisabled(true);


    } else {
        var parentChildOptionSet = Xrm.Page.data.entity.attributes.get("new_parentchildoptionset");
        if (parentChildOptionSet != null) {
            var optionsetvalue = parentChildOptionSet.getValue();
            // this for parent
            if (optionsetvalue == 100000000) {
                Xrm.Page.getAttribute("new_parent").setRequiredLevel("none");
                Xrm.Page.getControl("new_parent").setDisabled(true);
             
            } else if (optionsetvalue == 100000001) {
                Xrm.Page.getControl("new_parent").setDisabled(false);
                //Setting the required filed
                Xrm.Page.getAttribute("new_parent").setRequiredLevel("required");
            }
        }
    }

}
function OnChange_ParentChildOptionSet() {
   
    var optionsetvalues = Xrm.Page.data.entity.attributes.get("new_parentchildoptionset");
    var optionsetvalue = optionsetvalues.getValue();
    // this for parent
    if (optionsetvalue == 100000000) {
        Xrm.Page.getAttribute("new_parent").setRequiredLevel("none");

        Xrm.Page.getControl("new_parent").setDisabled(true);

    } else if (optionsetvalue == 100000001) {//Child
        Xrm.Page.getControl("new_parent").setDisabled(false);
        Xrm.Page.getAttribute("new_parent").setRequiredLevel("required");
    }


}
function OnChange_ParentLookup() {
    var parentlookup = Xrm.Page.getAttribute("new_parent").getValue();
    if (parentlookup != null) {
        var lookupId = parentlookup[0].id;
        var CrmServerUrl;
        if (typeof GetGlobalContext != "undefined") {
            CrmServerUrl = GetGlobalContext().getClientUrl();
        } else {
            if (typeof Xrm != "undefined") {
                CrmServerUrl = Xrm.Page.context.getClientUrl();
            } else {
                alert("Context is not available.");
            }
        }
        if (CrmServerUrl.match(/\/$/)) {
            CrmServerUrl = CrmServerUrl.substring(0, Crm.length - 1);
        }

        //REST SERVICE WITH ODATA.
        var oDataPath = CrmServerUrl + "/XRMServices/2011/OrganizationData.svc";
        var fetchData = new XMLHttpRequest();
        var Odata = oDataPath + "/new_donationSet?$select=new_phonenumber,EmailAddress&$filter=new_donationId eq (guid'" + lookupId + "')";
        fetchData.open("GET", Odata, false);
        fetchData.setRequestHeader("Accept", "application/json");
        fetchData.setRequestHeader("Content-Type", "application/json; charset=utf-8");
        fetchData.onreadystatechange = function () { retrieveParentDetails(this); };
        fetchData.send();

    }
}
retrieveParentDetails = function (fetchData) {
    if (fetchData.readyState == 4) {
     
        var fetchD = this.parent.JSON.parse(fetchData.responseText).d;
       
        if (fetchD.results.length > 0) {
            var phoneNumber = fetchD.results[0].new_phonenumber;
            var email = fetchD.results[0].EmailAddress;
            Xrm.Page.getAttribute("new_parentphonenumber").setValue(phoneNumber);
            Xrm.Page.getAttribute("new_parentemail").setValue(email);
        }
    }
}




Thursday, 24 December 2015

How to Deal With: Failure configuring Windows updates.

Hi All,

Please find the nice link for the issue i have faced today on Lenova windows 8.

Failure to update reverting the changes loops..


Here is nice post:

http://beyondapples.blogspot.co.uk/2014/07/how-to-deal-with-failure-configuring.html


Happy CRMing