Saturday, 20 August 2016
Monday, 8 August 2016
Odata Queries For Practices In MScrm
/MSCRM2013/xrmservices/2011/OrganizationData.svc/new_courseSet?$select=new_Amount,new_available,new_courseId,new_durations,new_Fee,new_name,new_Paymentdate,new_Test&$filter=new_courseId eq guid'5666666666666'
/MSCRM2013/xrmservices/2011/OrganizationData.svc/new_courseSet?$select=new_Amount,new_available,new_courseId,new_durations,new_Fee,new_name,new_Paymentdate,new_Test&$filter=new_Test/Id eq guid'7887777'-----lookupe
OrganizationData.svc/new_courseSet?$select=new_Amount,new_available,new_courseId,new_durations,new_Fee,new_name,new_Paymentdate,new_Test&$filter=new_durations/Value eq 100000001----optionset
http:///MSCRM2013/xrmservices/2011/OrganizationData.svc/new_courseSet?$select=new_Amount,new_available,new_courseId,new_durations,new_Fee,new_name,new_Paymentdate,new_Test&$filter=new_available eq true twooptionsetvalus
/xrmservices/2011/OrganizationData.svc/new_courseSet?$select=new_Amount,new_available,new_courseId,new_durations,new_Fee,new_name,new_Paymentdate,new_Test&$filter=new_name eq 'rrrrrr'
/MSCRM2013/xrmservices/2011/OrganizationData.svc/new_courseSet?$select=new_Amount,new_available,new_courseId,new_durations,new_Fee,new_name,new_Paymentdate,new_Test&$filter=new_Amount/Value eq 6789----money
/MSCRM2013/xrmservices/2011/OrganizationData.svc/new_courseSet?$select=new_Amount,new_available,new_courseId,new_durations,new_Fee,new_name,new_Paymentdate,new_Test&$filter=new_Paymentdate eq datetime'2016-04-05T12:00:00'----date and
/MSCRM2013/xrmservices/2011/OrganizationData.svc/new_courseSet?$filter=new_Fee eq 6789
Sunday, 7 August 2016
SDK.Rest Examples Practices
SDK.Rest Examples Practices
______________________________________________________________________________
if (typeof (MscrmAplications) == "undefined") {
MscrmAplications = { _namespace: true };
}
MscrmAplications.Studentonload =
{
CreateRecord: function () {
debugger;
var student = {};
student.new_name = "DemoExample";// string
student.new_courseName = "MSCRMTechnologies";// string values
student.new_CourseDuration = { Value: 100000001 }; // optionset values
student.new_Gender = false;//Two OptionSetvalues
student.new_Fee = { Value: "60000" }; // currency field
var dt = new Date(2015, 9, 8);
student.new_startdate = dt; // date and time field
student.new_TotalSudents = 200;// whole numbers
student.new_Amount = "6.2";// floating point
student.new_Hieght = "9.9"; //decimal
student.new_Student = { Id: "F3397DD5-1458-E611-80F1-C4346BDD3121", LogicalName: "new_students", Name: "StudentC" };//lookupvalues
SDK.REST.createRecord(student, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage);
},
UpdateRecords: function () {
debugger;
if (Xrm.Page.data.entity.getId() != null) {
var RecordId = Xrm.Page.data.entity.getId()
if (Xrm.Page.getAttribute("new_demos").getValue() != null) {
var Opts = Xrm.Page.getAttribute("new_demos").getValue()
if (Opts == 100000000) {
var student = {};
student.new_name = "DemoExample";// string
student.new_courseName = "MSCRMTechnologies";// string values
student.new_CourseDuration = { Value: 100000002 }; // optionset values
student.new_Gender = false;//Two OptionSetvalues
student.new_Fee = { Value: "60000" }; // currency field
var dt = new Date(2015, 9, 8);
student.new_startdate = dt; // date and time field
student.new_TotalSudents = 900;// whole numbers
student.new_Amount = "1.1";// floating point
student.new_Hieght = "8.9"; //decimal
student.new_Student = { Id: "364010EF-1458-E611-80F1-C4346BDD3121", LogicalName: "new_students", Name: "StudentB" };//lookupvalues
SDK.REST.updateRecord(RecordId, student, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage);
}
else if (Opts == 100000002) {
debugger;
SDK.REST.deleteRecord(RecordId, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage)
}
else if (Opts == 100000003) {
debugger;
}
}
}
},
sucessful: function () {
alert("sucessfuly excuted");
},
errormessage: function () {
alert("Error Occured here");
},
_namespace: true
};
______________________________________________________________________________
if (typeof (MscrmAplications) == "undefined") {
MscrmAplications = { _namespace: true };
}
MscrmAplications.Studentonload =
{
CreateRecord: function () {
debugger;
var student = {};
student.new_name = "DemoExample";// string
student.new_courseName = "MSCRMTechnologies";// string values
student.new_CourseDuration = { Value: 100000001 }; // optionset values
student.new_Gender = false;//Two OptionSetvalues
student.new_Fee = { Value: "60000" }; // currency field
var dt = new Date(2015, 9, 8);
student.new_startdate = dt; // date and time field
student.new_TotalSudents = 200;// whole numbers
student.new_Amount = "6.2";// floating point
student.new_Hieght = "9.9"; //decimal
student.new_Student = { Id: "F3397DD5-1458-E611-80F1-C4346BDD3121", LogicalName: "new_students", Name: "StudentC" };//lookupvalues
SDK.REST.createRecord(student, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage);
},
UpdateRecords: function () {
debugger;
if (Xrm.Page.data.entity.getId() != null) {
var RecordId = Xrm.Page.data.entity.getId()
if (Xrm.Page.getAttribute("new_demos").getValue() != null) {
var Opts = Xrm.Page.getAttribute("new_demos").getValue()
if (Opts == 100000000) {
var student = {};
student.new_name = "DemoExample";// string
student.new_courseName = "MSCRMTechnologies";// string values
student.new_CourseDuration = { Value: 100000002 }; // optionset values
student.new_Gender = false;//Two OptionSetvalues
student.new_Fee = { Value: "60000" }; // currency field
var dt = new Date(2015, 9, 8);
student.new_startdate = dt; // date and time field
student.new_TotalSudents = 900;// whole numbers
student.new_Amount = "1.1";// floating point
student.new_Hieght = "8.9"; //decimal
student.new_Student = { Id: "364010EF-1458-E611-80F1-C4346BDD3121", LogicalName: "new_students", Name: "StudentB" };//lookupvalues
SDK.REST.updateRecord(RecordId, student, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage);
}
else if (Opts == 100000002) {
debugger;
SDK.REST.deleteRecord(RecordId, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage)
}
else if (Opts == 100000003) {
debugger;
}
}
}
},
sucessful: function () {
alert("sucessfuly excuted");
},
errormessage: function () {
alert("Error Occured here");
},
_namespace: true
};
create record using Javascript using SDK.Rest examples
///=================================================================================
// creation records using mscrm2016 application
// created by Ravi Jaala on august 5th 2016
//===============================================================
if (typeof (MscrmAplications) == "undefined") {
MscrmAplications = { _namespace: true };
}
MscrmAplications.Studentonload =
{
CreateRecord: function () {
debugger;
var student = {};
student.new_name = "DemoExample";// string
student.new_courseName = "MSCRMTechnologies";// string values
student.new_CourseDuration = { Value: 100000001 }; // optionset values
student.new_Gender = false;//Two OptionSetvalues
student.new_Fee = { Value: "60000" }; // currency field
var dt = new Date(2015, 9, 8);
student.new_startdate = dt; // date and time field
student.new_TotalSudents = 200;// whole numbers
student.new_Amount = "6.2";// floating point
student.new_Hieght = "9.9"; //decimal
student.new_Student = { Id: "F3397DD5-1458-E611-80F1-C4346BDD3121", LogicalName: "new_students", Name: "StudentC" };//lookupvalues
SDK.REST.createRecord(student, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage);
},
UpdateRecords: function () {
debugger;
if (Xrm.Page.data.entity.getId() != null) {
var RecordId = Xrm.Page.data.entity.getId()
if (Xrm.Page.getAttribute("new_demos").getValue() != null) {
var Opts = Xrm.Page.getAttribute("new_demos").getValue()
if (Opts == 100000000) {
var student = {};
student.new_name = "DemoExample";// string
student.new_courseName = "MSCRMTechnologies";// string values
student.new_CourseDuration = { Value: 100000002 }; // optionset values
student.new_Gender = false;//Two OptionSetvalues
student.new_Fee = { Value: "60000" }; // currency field
var dt = new Date(2015, 9, 8);
student.new_startdate = dt; // date and time field
student.new_TotalSudents = 900;// whole numbers
student.new_Amount = "1.1";// floating point
student.new_Hieght = "8.9"; //decimal
student.new_Student = { Id: "364010EF-1458-E611-80F1-C4346BDD3121", LogicalName: "new_students", Name: "StudentB" };//lookupvalues
SDK.REST.updateRecord(RecordId, student, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage);
}
else if (Opts == 100000002) {
debugger;
SDK.REST.deleteRecord(RecordId, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage)
}
else if (Opts == 100000003) {
debugger;
}
}
}
},
RetrievRecords: function () {
debugger;
if (Xrm.Page.data.entity.getId() != null) {
var RecordId = Xrm.Page.data.entity.getId()
if (Xrm.Page.getAttribute("new_course").getValue() != null) {
var lookup = Xrm.Page.getAttribute("new_course").getValue();
var Id = lookup[0].id;
SDK.REST.retrieveRecord(Id, "new_course", null, null, MscrmAplications.Studentonload.sucessfulrestrieve, MscrmAplications.Studentonload.errormessage)
}
}
},
sucessful: function () {
alert("sucessfuly excuted");
},
errormessage: function () {
alert("Error Occured here");
},
sucessfulrestrieve: function (results) {
debugger;
alert(results.new_name + "" + results.new_Fee.Value + "" + results.new_courseName);
},
_namespace: true
};
// creation records using mscrm2016 application
// created by Ravi Jaala on august 5th 2016
//===============================================================
if (typeof (MscrmAplications) == "undefined") {
MscrmAplications = { _namespace: true };
}
MscrmAplications.Studentonload =
{
CreateRecord: function () {
debugger;
var student = {};
student.new_name = "DemoExample";// string
student.new_courseName = "MSCRMTechnologies";// string values
student.new_CourseDuration = { Value: 100000001 }; // optionset values
student.new_Gender = false;//Two OptionSetvalues
student.new_Fee = { Value: "60000" }; // currency field
var dt = new Date(2015, 9, 8);
student.new_startdate = dt; // date and time field
student.new_TotalSudents = 200;// whole numbers
student.new_Amount = "6.2";// floating point
student.new_Hieght = "9.9"; //decimal
student.new_Student = { Id: "F3397DD5-1458-E611-80F1-C4346BDD3121", LogicalName: "new_students", Name: "StudentC" };//lookupvalues
SDK.REST.createRecord(student, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage);
},
UpdateRecords: function () {
debugger;
if (Xrm.Page.data.entity.getId() != null) {
var RecordId = Xrm.Page.data.entity.getId()
if (Xrm.Page.getAttribute("new_demos").getValue() != null) {
var Opts = Xrm.Page.getAttribute("new_demos").getValue()
if (Opts == 100000000) {
var student = {};
student.new_name = "DemoExample";// string
student.new_courseName = "MSCRMTechnologies";// string values
student.new_CourseDuration = { Value: 100000002 }; // optionset values
student.new_Gender = false;//Two OptionSetvalues
student.new_Fee = { Value: "60000" }; // currency field
var dt = new Date(2015, 9, 8);
student.new_startdate = dt; // date and time field
student.new_TotalSudents = 900;// whole numbers
student.new_Amount = "1.1";// floating point
student.new_Hieght = "8.9"; //decimal
student.new_Student = { Id: "364010EF-1458-E611-80F1-C4346BDD3121", LogicalName: "new_students", Name: "StudentB" };//lookupvalues
SDK.REST.updateRecord(RecordId, student, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage);
}
else if (Opts == 100000002) {
debugger;
SDK.REST.deleteRecord(RecordId, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage)
}
else if (Opts == 100000003) {
debugger;
}
}
}
},
RetrievRecords: function () {
debugger;
if (Xrm.Page.data.entity.getId() != null) {
var RecordId = Xrm.Page.data.entity.getId()
if (Xrm.Page.getAttribute("new_course").getValue() != null) {
var lookup = Xrm.Page.getAttribute("new_course").getValue();
var Id = lookup[0].id;
SDK.REST.retrieveRecord(Id, "new_course", null, null, MscrmAplications.Studentonload.sucessfulrestrieve, MscrmAplications.Studentonload.errormessage)
}
}
},
sucessful: function () {
alert("sucessfuly excuted");
},
errormessage: function () {
alert("Error Occured here");
},
sucessfulrestrieve: function (results) {
debugger;
alert(results.new_name + "" + results.new_Fee.Value + "" + results.new_courseName);
},
_namespace: true
};
create record using Javascript using SDK.Rest examples
//=================================================================================
// creation records using mscrm2016 application
// created by Ravi Jaala on august 5th 2016
//===============================================================
if (typeof (MscrmAplications) == "undefined") {
MscrmAplications = { _namespace: true };
}
MscrmAplications.Studentonload =
{
CreateRecord: function () {
debugger;
var student = {};
student.new_name = "DemoExample";// string
student.new_courseName = "MSCRMTechnologies";// string values
student.new_CourseDuration = { Value: 100000001 }; // optionset values
student.new_Gender = false;//Two OptionSetvalues
student.new_Fee = { Value: "60000" }; // currency field
var dt = new Date(2015, 9, 8);
student.new_startdate = dt; // date and time field
student.new_TotalSudents = 200;// whole numbers
student.new_Amount = "6.2";// floating point
student.new_Hieght = "9.9"; //decimal
student.new_Student = { Id: "F3397DD5-1458-E611-80F1-C4346BDD3121", LogicalName: "new_students", Name: "StudentC" };//lookupvalues
SDK.REST.createRecord(student, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage);
},
sucessful: function () {
alert("sucessfuly excuted");
},
errormessage: function () {
alert("Error Occured here");
},
_namespace: true
};
// creation records using mscrm2016 application
// created by Ravi Jaala on august 5th 2016
//===============================================================
if (typeof (MscrmAplications) == "undefined") {
MscrmAplications = { _namespace: true };
}
MscrmAplications.Studentonload =
{
CreateRecord: function () {
debugger;
var student = {};
student.new_name = "DemoExample";// string
student.new_courseName = "MSCRMTechnologies";// string values
student.new_CourseDuration = { Value: 100000001 }; // optionset values
student.new_Gender = false;//Two OptionSetvalues
student.new_Fee = { Value: "60000" }; // currency field
var dt = new Date(2015, 9, 8);
student.new_startdate = dt; // date and time field
student.new_TotalSudents = 200;// whole numbers
student.new_Amount = "6.2";// floating point
student.new_Hieght = "9.9"; //decimal
student.new_Student = { Id: "F3397DD5-1458-E611-80F1-C4346BDD3121", LogicalName: "new_students", Name: "StudentC" };//lookupvalues
SDK.REST.createRecord(student, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage);
},
sucessful: function () {
alert("sucessfuly excuted");
},
errormessage: function () {
alert("Error Occured here");
},
_namespace: true
};
create record using Javascript using SDK.Rest examples
//=================================================================================
// creation records using mscrm2016 application
// created by Ravi Jaala on august 5th 2016
//===============================================================
if (typeof (MscrmAplications) == "undefined") {
MscrmAplications = { _namespace: true };
}
MscrmAplications.Studentonload =
{
CreateRecord: function () {
debugger;
var student = {};
student.new_name = "DemoExample";// string
student.new_courseName = "MSCRMTechnologies";// string values
student.new_CourseDuration = { Value: 100000001 }; // optionset values
student.new_Gender = false;//Two OptionSetvalues
student.new_Fee = { Value: "60000" }; // currency field
var dt = new Date(2015, 9, 8);
student.new_startdate = dt; // date and time field
student.new_TotalSudents = 200;// whole numbers
student.new_Amount = "6.2";// floating point
student.new_Hieght = "9.9"; //decimal
student.new_Student = { Id: "F3397DD5-1458-E611-80F1-C4346BDD3121", LogicalName: "new_students", Name: "StudentC" };//lookupvalues
SDK.REST.createRecord(student, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage);
},
sucessful: function () {
alert("sucessfuly excuted");
},
errormessage: function () {
alert("Error Occured here");
},
_namespace: true
};
// creation records using mscrm2016 application
// created by Ravi Jaala on august 5th 2016
//===============================================================
if (typeof (MscrmAplications) == "undefined") {
MscrmAplications = { _namespace: true };
}
MscrmAplications.Studentonload =
{
CreateRecord: function () {
debugger;
var student = {};
student.new_name = "DemoExample";// string
student.new_courseName = "MSCRMTechnologies";// string values
student.new_CourseDuration = { Value: 100000001 }; // optionset values
student.new_Gender = false;//Two OptionSetvalues
student.new_Fee = { Value: "60000" }; // currency field
var dt = new Date(2015, 9, 8);
student.new_startdate = dt; // date and time field
student.new_TotalSudents = 200;// whole numbers
student.new_Amount = "6.2";// floating point
student.new_Hieght = "9.9"; //decimal
student.new_Student = { Id: "F3397DD5-1458-E611-80F1-C4346BDD3121", LogicalName: "new_students", Name: "StudentC" };//lookupvalues
SDK.REST.createRecord(student, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage);
},
sucessful: function () {
alert("sucessfuly excuted");
},
errormessage: function () {
alert("Error Occured here");
},
_namespace: true
};
create record using Javascript using SDK.Rest examples
//=================================================================================
// creation records using mscrm2016 application
// created by Ravi Jaala on august 5th 2016
//===============================================================
if (typeof (MscrmAplications) == "undefined") {
MscrmAplications = { _namespace: true };
}
MscrmAplications.Studentonload =
{
CreateRecord: function () {
debugger;
var student = {};
student.new_name = "DemoExample";// string
student.new_courseName = "MSCRMTechnologies";// string values
student.new_CourseDuration = { Value: 100000001 }; // optionset values
student.new_Gender = false;//Two OptionSetvalues
student.new_Fee = { Value: "60000" }; // currency field
var dt = new Date(2015, 9, 8);
student.new_startdate = dt; // date and time field
student.new_TotalSudents = 200;// whole numbers
student.new_Amount = "6.2";// floating point
student.new_Hieght = "9.9"; //decimal
student.new_Student = { Id: "F3397DD5-1458-E611-80F1-C4346BDD3121", LogicalName: "new_students", Name: "StudentC" };//lookupvalues
SDK.REST.createRecord(student, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage);
},
sucessful: function () {
alert("sucessfuly excuted");
},
errormessage: function () {
alert("Error Occured here");
},
_namespace: true
};
// creation records using mscrm2016 application
// created by Ravi Jaala on august 5th 2016
//===============================================================
if (typeof (MscrmAplications) == "undefined") {
MscrmAplications = { _namespace: true };
}
MscrmAplications.Studentonload =
{
CreateRecord: function () {
debugger;
var student = {};
student.new_name = "DemoExample";// string
student.new_courseName = "MSCRMTechnologies";// string values
student.new_CourseDuration = { Value: 100000001 }; // optionset values
student.new_Gender = false;//Two OptionSetvalues
student.new_Fee = { Value: "60000" }; // currency field
var dt = new Date(2015, 9, 8);
student.new_startdate = dt; // date and time field
student.new_TotalSudents = 200;// whole numbers
student.new_Amount = "6.2";// floating point
student.new_Hieght = "9.9"; //decimal
student.new_Student = { Id: "F3397DD5-1458-E611-80F1-C4346BDD3121", LogicalName: "new_students", Name: "StudentC" };//lookupvalues
SDK.REST.createRecord(student, "new_course", MscrmAplications.Studentonload.sucessful, MscrmAplications.Studentonload.errormessage);
},
sucessful: function () {
alert("sucessfuly excuted");
},
errormessage: function () {
alert("Error Occured here");
},
_namespace: true
};
Subscribe to:
Posts (Atom)