Microsoft Dynamic CRM Data Archiving solution

Hi,
How can i archive data in dynamic CRM. 
e.g. If i have last 20 years data in dynamic CRM then i wants to archive data in another organization and then retrieve in same organization.
If this process is available in dynamic CRM or how can i create this tool for the same.
Please suggest me for this.
Thanks

Hi Narendra,
Recently i implemented the Data Archiving in CRM 2011 in supported way. 
We identified the entities where the volume of data is very high over the period like case, opportunity, activity, system jobs, lead etc.
I am using "SSIS Integration Toolkit v5.1 for Microsoft Dynamics CRM" from KingswaySoft to create and delete the data.
I created a new organization same as main organization. In new organization i create the closed case, opportunity, activity, lead from main organization and once done i delete them from main organization. This exercise we execute in every 3 months. We always
delete the completed system jobs from main organization. And we provided the access to new organization only to few admin users just for reporting purpose.
Chandan - http://mscrm-chandan.blogspot.in/ I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful !!!

Similar Messages

  • KB3008923 Makes Microsoft Dynamic CRM 2013 add/change javascript in Form Dialog impossible - Fix is use CHROME or remove update.

    After KB3008923 was installed on my computer we found out that in Microsoft Dynamic Crm 2013
    we could not change Form Script or add Form scripts as the dialog adding/maintaining this did not work
    any more. The dropdown box is empty and the function and parameters are gone.
    Fix is to remove KB3008923 or use CHROME until Microsoft fixes  it! 

    REPOSTING...
    Some web application modal dialog boxes don't work correctly in Internet Explorer 11 after you install update 3008923 (17 Dec-14)
    http://support2.microsoft.com/kb/3025390/en-us
    ~Robear Dyer (PA Bear) MS MVP-Windows Client since 2002 Disclaimer: MS MVPs neither represent nor work for Microsoft

  • Coded UI automation support for MIcrosoft Dynamic CRM 2013

    Hi,
    I have been checking for a UI automation tool for Microsoft Dynamic CRM 2013. Even though it is mentioned as coded UI fully supports Dynamic CRM, I was not able to automate CRM with VS2013, VS2015 Preview. Please reply if you have any workaround to make
    it possible to automate UI testing of CRM 2013 using coded UI.
    Regards,
    Vinu chandran.

    Hi Vinu,
    According to your description,
    could you please tell me what version of VS you use to test your coded UI test?
    In addition, I did some search and don’t find any information about CRM2013 support for Coded UI test.
    Based on this article:
    Supported Configurations and Platforms for Coded UI Tests and Action
    Recordings, Dynamics CRM web client is fully supported. Even though I am not sure whether it includes CRM2013, I suggest you should use VS to drag the crosshair
    on the control to check the control can be identified by Coded UI Test.
    In addition, since the issue is related to the Microsoft Dynamic CRM, I suggest you can ask the issue to
    Microsoft Dynamic
    CRM forum, may be you will get better support.
    As you said that you are not able to automate coded UI test with VS2015 Preview, because VS2015 Preview is still a preview version
    instead of final released version, I suggest that you should submit this feedback to Microsoft Connect feedback portal:
    http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx,
    Microsoft engineers will evaluate them seriously.
    After you submit the feedback, you can post the link here which will be beneficial for other members with the
    similar issue.
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Need information about CRM data archiving

    We get a requirement for data archiving on CRM.
    Would you please provide some links/docs?
    Thanks a lot!

    Read,
    http://help.sap.com/saphelp_sm40/helpdata/EN/8d/3e4c11462a11d189000000e8323d3a/frameset.htm
    Also,You can find some of the objects for CRM here,
    http://help.sap.com/saphelp_sm40/helpdata/EN/a4/9fa471b41f44828da6ea1490f02e2b/content.htm
    http://help.sap.com/saphelp_sm40/helpdata/EN/a3/e40fe634874243b7917d1d6d0757c4/content.htm
    regards
    Juan

  • SAP CRM Data archiving

    Hi Experts,
    We identified top 50 Big tables in our SAP CRM production. We need to archive this tables. I am new this archiving methodology. Can any one guide me how to do this.
    Regards,
    Rao

    Hi Srinivasarao,
    In CRM most of the standard applications have their own archiving objects and these can be archived using the transaction SARA.
    There would be certain prerequiest for this and also some techincal setting such as file server configuration etc which needs to be done. Please contact your basis support guys and they will be able to help you.
    For basic understanding of data archiving please look at
    http://help.sap.com/erp2005_ehp_02/helpdata/en/2e/9396345788c131e10000009b38f83b/frameset.htm
    Regards,
    Kiran

  • CRM data archiving.

    Hi,
    I am involved in a project ,where i am  facing performance issues in the Agent Inbox of IC Webclient.
    The Agent Inbox search takes a lot of time and sometime fails in the live environment.The reason of the slow response has been identified due to the presence of huge volume of data in the CRM tables. There is a select query  which has five major tables in the loop.
    The standard CRM tables involved are CRMD_ORDERADM_H , CRMD_ACTIVITY_H and CRMD_ORDER_INDEX.
    Due to the presence of huge amount of data in these tables, I am considering the option of archiving the data from these tables in order to free the memory.
    We are  using Activity Management and IC webclient to record the interaction with the customers.
    However, i am not sure of the impact that can be caused due to the absence of data in these tables.Will the absence of data in the fields of these tables have an impact on other or the existing  CRM functionality.
    Will the absence of data in these fields(above standard tables) hamper the existing functionality .?
    Could you please give your  thoughts on this ?Any sort of suggestions are welcomed.
    regards
    Maroof

    Hi Ajay,
    Thanks for the reply.I still have two queries .
    I need to archive only those activity transactions(Business Activity-Interaction Record) which have the status as closed .
    1)How do I set this criteria to archive only such activity transactions.?
    2)Do I have to create a new archiving object or can I use an existing archiving object such as CRM_SERORD,CRM_ACT_ON etc...?
    Where could I set this criteria ,so that the system picks up these activity transactions which have their status as closed and then archives them.
    The archiving object CRM_SERORD has the table CRM_ORDER_INDEX .This data in this table is used for searching a business transaction.
    Regards
    Maroof.

  • CRM  Data Archiving Process

    t

    Hi Ganesh,
    It will take couple of days to inform all the information of archiving, but i will try to give brief explanation regarding archiving FILE configuration:
    Prerequisites of archiving are
    You should have storage system connected to your system.
    FILE configuration: T.Code -- FILE
    You can create your own Logical file name, Logical file path, Physical file name
    and Physical file path. For more detail information please see SAP Help.
    1. Create Logical File path: Example: Z_ARCHIVE_PATH
    2. Assign this to physical file path, Here you should know what is your operating system. Based on that select the syntax group and create your Physical file path. Example: if it is UNIX -- /archiving/<FILENAME>
    3 Create Logical File Name. Example:
    Enter “Z_ARCHIVE_DATA_FILE_TECH”
       Physical File:
    Enter “D_<PARAM_3>_<PARAM_2>_<DATE>_<TIME>”
    PARAM 3 gives Archiving object name, PARAM_2 gives one character alphabetic code, which guarantees that the archive file is unique.
    *Data Format:
    Set to “ASC”
    Application. Area:
    Set to “BC”
    *Logical Path:
    Set to “Z_ARCHIVE_DATA_PATH”
    After creating the this assign the logical file name to Archiving objects. It is assigned in SARA > Enter AO > Click on Customizing > Archiving Object specific customizing Technical settings --- Assign Logical file name.
    Here in this screen you can also mention File size as 100 MB. Meaning after 100MB of first file second archive file is created.
    You can also configure whether u want to have automatic deletion run or manually to schedule the deletion job.
    Similarly you can also schedule the automatic store job.
    - Ganesh, Prerequisites of archiving application data will various between archiving object. Better to study archiving process in <u>sap.help.com</u> 
    -Thanks,
    Ajay

  • Field catalog issue in Data archiving

    Hi Experts,
    We are facing issue in SAP CRM Data Archiving info structure. I have created the fieldcatlog for the service Ticket( CRM_SERORD archive object) and Act On ( CRM_ACT_ON archive Object).
    in our scenario, multiple Business partner(Consumer, orgnisational and employee) are attached to each Service ticket, in my ZARxx tables are storing the one entry means one service ticket and one Business partner.
    My requirment is it should show all the business partners for each service ticket.
    Could you please help me on this.
    Regards,
    Srini

    Hi Srini,
    We have the same problem for our project. Did you find a solution for this problem ?
    Best regards,
    Nevets

  • "No list available" - Spool message  - Data Archiving

    Hi ,
    I am facing problem in CRM Data Archiving .
    Now I am Archiving the Arc Object  >> PRODUCT_MD .
    All the parameters i have given correctly.
    when i execute the job, in the spool message it says <b>"No list available".</b>
    I thought the problem with the input.
    then i executed this tcode  - "COMMPR01" (based on the help.sap.com for this archiving object.)
    I selected some of the  "Material" in that and set the product status as
    <b>"To archive".</b>
    Any Idea on this .
    expecting your valuable inputs .
    Regards
    Ganesh

    When ever we execute logic in batch mode, the ALV list will be populated to the spool. The error says that, there is not data coming up via list output of the report. Hence there is no spool being created.
    Regards,
    Chiranjeevi.

  • CRM Data XML Archiving

    Hi Folks,
    I need help with this one, does anyone know how we can archive crm data in XML format fro external storage.
    I know it is possible to a certain extent but I\m wondering if there is an easier way other than writing programs to do it.
    Also is is possible to convert normal archive files to xml files
    any suggestions will be most appreciated,
    Kinika,

    Hi Kinika,
    I think this question is something for the [CRM forum|SAP CRM: Webclient UI - Framework;, please post it there.
    Regards,
    Claudius

  • Dynamic CRM 2013 Online how to execute Report, generate PDF and email

    Dear All,
    I am using Dynamic CRM 2013 online. For quote, I have workflow and Dialogue processes for review process. On approval, I want the system to generate a PDF of quote report, attach the PDF and email it to the Customer.
    Better I would like, When approver, clicks on the approve button, the system should auto generate a PDF of quote report, attach the PDF and email it to the Customer, without any further input from the user. If its not possible, I may have to put button on
    quote form.
    I am using the attached code, but facing various issues.
    1. Under prepare the SOAP Message coding part, I am not sure what should be the below URL for CRM 2013 Online?
    xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
    2. What should be the emailid here? Is it Recepient Contact id(Guid) ?
    var emailid = resultXml.selectSingleNode("//CreateResult").nodeTypedValue;
    alert("emailid" + emailid.toString());
    3. Using this code, not able to create Entity for "ActivityMimeAttachment", I am getting newEntity as undefined.
    Below is the code I am using. Please check and help me out, where I am going wrong. Let me know if any better way to implement it. At present, I have put one button on quote form, on click event, below code will get executed.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    <script type="text/javascript">
    var Xrm;
    if (window.opener) { Xrm = window.opener.Xrm; }
    else if (window.parent) { Xrm = window.parent.Xrm; }
    function getReportingSession() {
    var reportName = "Quotation_Report"; //set this to the report you are trying to download
    var reportId = "7C39D18F-1DC6-E311-8986-D89D6765B238"; //set this to the guid of the report you are trying to download
    var recordid = Xrm.Page.data.entity.getId();
    // recordid = recordid.substring(1, 37); //getting rid of curly brackets
    alert(recordid);
    var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
    var retrieveEntityReq = new XMLHttpRequest();
    retrieveEntityReq.open("POST", pth, false);
    retrieveEntityReq.setRequestHeader("Accept", "*/*");
    retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    retrieveEntityReq.send("id=%7B" + reportId + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName=" + reportName + "&isScheduledReport=false");
    var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
    var ret = new Array();
    ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
    x = retrieveEntityReq.responseText.indexOf("ControlID=");
    ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
    return ret;
    function createEntity(ent, entName, upd) {
    var jsonEntity = JSON.stringify(ent);
    var createEntityReq = new XMLHttpRequest();
    var ODataPath = Xrm.Page.context.getServerUrl() + "XRMServices/2011/OrganizationData.svc";
    createEntityReq.open("POST", ODataPath + "/" + entName + "Set" + upd, false);
    createEntityReq.setRequestHeader("Accept", "application/json");
    createEntityReq.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    createEntityReq.send(jsonEntity);
    var newEntity = JSON.parse(createEntityReq.responseText).d;
    alert("new entity" + newEntity);
    return newEntity;
    function createAttachment() {
    var params = getReportingSession();
    var recordid = Xrm.Page.data.entity.getId();
    alert("recordid " + recordid);
    var orgName = Xrm.Page.context.getOrgUniqueName();
    var userID = Xrm.Page.context.getUserId();
    //create email record
    // Prepare the SOAP message.
    var xml = "<?xml version='1.0' encoding='utf-8'?>" +"<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'" +
    " xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" +
    " xmlns:xsd='http://www.w3.org/2001/XMLSchema'>" +
    "<soap:Header>" +
    "</soap:Header>" +
    "<soap:Body>" +
    "<Create xmlns='http://schemas.microsoft.com/crm/2007/WebServices'>" +
    "<entity xsi:type='email'>" +
    "<regardingobjectid type='quote'>" + recordid + "</regardingobjectid>" +
    "<subject>" + "Email with Attachment4" + "</subject>" +
    "</entity>" +
    "</Create>" +
    "</soap:Body>" +
    "</soap:Envelope>";
    // Prepare the xmlHttpObject and send the request.
    var xHReq = new ActiveXObject("Msxml2.XMLHTTP");
    xHReq.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);
    xHReq.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/Create");
    xHReq.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
    xHReq.setRequestHeader("Content-Length", xml.length);
    xHReq.send(xml);
    // Capture the result
    var resultXml = xHReq.responseXML;
    // alert("resultXml " + resultXml);
    // Check for errors.
    var errorCount = resultXml.selectNodes('//error').length;
    if (errorCount != 0) {
    alert("ERROR");
    var msg = resultXml.selectSingleNode('//description').nodeTypedValue;
    alert(msg);
    var emailid = resultXml.selectSingleNode("//CreateResult").nodeTypedValue;
    alert("emailid" + emailid.toString());
    //var emailid = userID;
    var post = Object();
    post.Body = encodePdf(params);
    var email = new Array();
    email[0] =new Object();
    email[0].id = emailid;
    email[0].entityType ='email';
    post.Subject ="File Attachment";
    post.AttachmentNumber = 1;
    post.FileName ="Report.pdf";
    post.MimeType ="application/pdf";
    post.ObjectId = Object();
    post.ObjectId.LogicalName ="email";
    post.ObjectId.Id = email[0].id;
    post.ObjectTypeCode ="email";
    alert(post.ObjectId.Id);
    createEntity(post,"ActivityMimeAttachment", "");
    alert("created successfully");
    email.Subject = "Your Order";
    //Set The current order as the Regarding object
    email.RegardingObjectId = {
    Id: Xrm.Page.data.entity.getId(), //Get the current entity Id , here OrderId
    LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
    //Create Email Activity
    SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
    // Email Call Back function
    function EmailCallBack(result) {
    email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
    var activityPartyFrom = new Object();
    // Set the From party of the ActivityParty to relate an entity with Email From field
    activityPartyFrom.PartyId = {
    Id: customerId, // id of entity you want to associate this activity with.
    LogicalName: "contact"
    // Set the "activity" of the ActivityParty
    activityPartyFrom.ActivityId = {
    Id: result.ActivityId,
    LogicalName: "email"
    // Now set the participation type that describes the role of the party on the activity).
    activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
    // Create the from ActivityParty for the email
    SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
    var activityPartyTo = new Object();
    // Set the From party of the ActivityParty to relate an entity with Email From field
    activityPartyTo.PartyId = {
    Id: ownerId, // id of entity you want to associate this activity with.
    LogicalName: "systemuser"
    // Set the "activity" of the ActivityParty
    activityPartyTo.ActivityId = {
    Id: result.ActivityId,
    LogicalName: "email"
    // Now set the participation type that describes the role of the party on the activity). activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
    // Create the from ActivityParty
    SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
    //ActivityParty From Callback
    function ActivityPartyFromCallBack(result) {
    //ActivityParty To Callback
    function ActivityPartyToCallBack(result) {
    var StringMaker = function () {
    this.parts = [];
    this.length = 0;
    this.append = function (s) {
    this.parts.push(s);
    this.length += s.length;
    this.prepend = function (s) {
    this.parts.unshift(s);
    this.length += s.length;
    this.toString = function () {
    return this.parts.join('');
    var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
    function encode64(input) {
    var output = new StringMaker();
    var chr1, chr2, chr3;
    var enc1, enc2, enc3, enc4;
    var i = 0;
    while (i < input.length) {
    chr1 = input[i++];
    chr2 = input[i++];
    chr3 = input[i++];
    enc1 = chr1 >> 2;
    enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
    enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
    enc4 = chr3 & 63;
    if (isNaN(chr2)) {
    enc3 = enc4 = 64;
    else if (isNaN(chr3)) {
    enc4 = 64;
    output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
    return output.toString();
    var bdy = new Array();
    var bdyLen = 0;
    function concat2Bdy(x) {
    bdy[bdyLen] = x;
    bdyLen++;
    function encodePdf(params) {
    bdy = new Array();
    bdyLen = 0;
    var retrieveEntityReq = new XMLHttpRequest();
    var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] + "&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] + "&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
    retrieveEntityReq.open("GET", pth, false);
    retrieveEntityReq.setRequestHeader("Accept", "*/*");
    retrieveEntityReq.send();
    BinaryToArray(retrieveEntityReq.responseBody);
    return encode64(bdy);
    </SCRIPT>
    <SCRIPT type=text/vbscript>
    Function BinaryToArray(Binary)
    Dim i
    ReDim byteArray(LenB(Binary))
    For i = 1 To LenB(Binary)
    byteArray(i-1) = AscB(MidB(Binary, i, 1))
    concat2Bdy(AscB(MidB(Binary, i, 1)))
    Next
    BinaryToArray = byteArray
    End Function
    </SCRIPT>
    </head>
    <body>
    <input type="button" onclick="createAttachment();" value="Attach Report" />
    </body>
    </html>
    Thanks. and waiting for your valuable comments.
    - Mittal

    Hello,
    Yes, I was able to make my code working as below. Tested on CRM online 2013.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
    <script type="text/javascript">
    if (typeof (SDK) == "undefined")
    { SDK = { __namespace: true }; }
    SDK.JScriptRESTDataOperations = {
    _context: function () {
    if (typeof GetGlobalContext != "undefined")
    { return GetGlobalContext(); }
    else {
    if (typeof Xrm != "undefined") {
    return Xrm.Page.context;
    else { return new Error("Context is not available."); }
    _getServerUrl: function () {
    var serverUrl = this._context().getServerUrl()
    if (serverUrl.match(/\/$/)) {
    serverUrl = serverUrl.substring(0, serverUrl.length - 1);
    return serverUrl;
    _ODataPath: function () {
    return this._getServerUrl() + "/XRMServices/2011/OrganizationData.svc/";
    _errorHandler: function (req) {
    return new Error("Error : " +
    req.status + ": " +
    req.statusText + ": " +
    JSON.parse(req.responseText).error.message.value);
    _dateReviver: function (key, value) {
    var a;
    if (typeof value === 'string') {
    a = /Date\(([-+]?\d+)\)/.exec(value);
    if (a) {
    return new Date(parseInt(value.replace("/Date(", "").replace(")/", ""), 10));
    return value;
    Create: function (object, type, successCallback, errorCallback) {
    var req = new XMLHttpRequest();
    req.open("POST", this._ODataPath() + type + "Set", true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.onreadystatechange = function () {
    if (this.readyState == 4 /* complete */) {
    if (this.status == 201) {
    successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
    else {
    errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
    req.send(JSON.stringify(object));
    Retrieve: function (id, type, successCallback, errorCallback) {
    var req = new XMLHttpRequest();
    req.open("GET", this._ODataPath() + type + "Set(guid'" + id + "')", true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.onreadystatechange = function () {
    if (this.readyState == 4 /* complete */) {
    if (this.status == 200) {
    successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d);
    else {
    errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
    req.send();
    Update: function (id, object, type, successCallback, errorCallback) {
    var req = new XMLHttpRequest();
    req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.setRequestHeader("X-HTTP-Method", "MERGE");
    req.onreadystatechange = function () {
    if (this.readyState == 4 /* complete */) {
    if (this.status == 204 || this.status == 1223) {
    successCallback();
    else {
    errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
    req.send(JSON.stringify(object));
    Delete: function (id, type, successCallback, errorCallback) {
    var req = new XMLHttpRequest();
    req.open("POST", this._ODataPath() + type + "Set(guid'" + id + "')", true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.setRequestHeader("X-HTTP-Method", "DELETE");
    req.onreadystatechange = function () {
    if (this.readyState == 4 /* complete */) {
    if (this.status == 204 || this.status == 1223) {
    successCallback();
    else {
    errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
    req.send();
    RetrieveMultiple: function (type, filter, successCallback, errorCallback) {
    if (filter != null) {
    filter = "?" + filter;
    else { filter = ""; }
    var req = new XMLHttpRequest();
    req.open("GET", this._ODataPath() + type + "Set" + filter, true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.onreadystatechange = function () {
    if (this.readyState == 4 /* complete */) {
    if (this.status == 200) {
    successCallback(JSON.parse(this.responseText, SDK.JScriptRESTDataOperations._dateReviver).d.results);
    else {
    errorCallback(SDK.JScriptRESTDataOperations._errorHandler(this));
    req.send();
    __namespace: true
    </script>
    <script type="text/javascript">
    //Create Email and link it with Order as Regarding field
    var Xrm;
    var email = new Object();
    var ownerID = "";
    var CustomerId = "";
    if (window.opener) { Xrm = window.opener.Xrm; }
    else if (window.parent) { Xrm = window.parent.Xrm; }
    //Get ownerid who send email of quotation to customer
    function GetOwnerID() {
    var owner = Xrm.Page.getAttribute("ownerid").getValue();
    ownerID = owner[0].id;
    var ownerName = owner[0].name;
    var entityType = owner[0].entityType;
    GetToEmailGUID();
    //Get customerid who receive email of quotation from owner
    function GetToEmailGUID() {
    var Customer = Xrm.Page.getAttribute('customerid').getValue();
    CustomerId = Customer[0].id;
    var CustomerName = Customer[0].name;
    var entityType = Customer[0].entityType;
    //if CustomerId is type of "Account" then get Primary Contact id of that account
    if (entityType == "account") {
    var contact = Xrm.Page.getAttribute("customerid").getValue();
    if (contact === null) return;
    var serverUrl = Xrm.Page.context.getClientUrl();
    var oDataSelect = serverUrl + "/XRMServices/2011/OrganizationData.svc/AccountSet(guid'" + contact[0].id + "')?$select=PrimaryContactId";
    var req = new XMLHttpRequest();
    req.open("GET", oDataSelect, false);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json;charset=utf-8");
    req.onreadystatechange = function () {
    if (req.readyState === 4) {
    if (req.status === 200) {
    var retrieved = JSON.parse(req.responseText).d;
    CustomerId = retrieved.PrimaryContactId.Id;
    else {
    alert(this.statusText);
    req.send();
    function CreateEmail() {
    GetOwnerID();
    email.Subject = "Email with Report Attachment";
    //Set The current order as the Regarding object
    email.RegardingObjectId = {
    Id: Xrm.Page.data.entity.getId(), //Get the current entity Id , here OrderId
    LogicalName: Xrm.Page.data.entity.getEntityName()//Get the current entity name, here it will be “salesOrder”
    //Create Email Activity
    SDK.JScriptRESTDataOperations.Create(email, "Email", EmailCallBack, function (error) { alert(error.message); });
    // Email Call Back function
    function EmailCallBack(result) {
    email = result; // Set the email to result to use it later in email attachment for retrieving activity Id
    var activityPartyFrom = new Object();
    // Set the From party of the ActivityParty to relate an entity with Email From field
    activityPartyFrom.PartyId = {
    Id: CustomerId, //"79EBDD26-FDBE-E311-8986-D89D6765B238", // id of entity you want to associate this activity with.
    LogicalName: "contact"
    // Set the "activity" of the ActivityParty
    activityPartyFrom.ActivityId = {
    Id: result.ActivityId,
    LogicalName: "email"
    // Now set the participation type that describes the role of the party on the activity).
    activityPartyFrom.ParticipationTypeMask = { Value: 2 }; // 2 means ToRecipients
    // Create the from ActivityParty for the email
    SDK.JScriptRESTDataOperations.Create(activityPartyFrom, "ActivityParty", ActivityPartyFromCallBack, function (error) { alert(error.message); });
    var activityPartyTo = new Object();
    // Set the From party of the ActivityParty to relate an entity with Email From field
    activityPartyTo.PartyId = {
    Id: ownerID, //"79EBDD26-FDBE-E311-8986-D89D6765B238", // id of entity you want to associate this activity with.
    LogicalName: "systemuser"
    // Set the "activity" of the ActivityParty
    activityPartyTo.ActivityId = {
    Id: result.ActivityId,
    LogicalName: "email"
    // Now set the participation type that describes the role of the party on the activity).
    activityPartyTo.ParticipationTypeMask = { Value: 1 }; // 1 means Sender
    // Create the from ActivityParty
    SDK.JScriptRESTDataOperations.Create(activityPartyTo, "ActivityParty", ActivityPartyToCallBack, function (error) { alert(error.message); });
    //ActivityParty From Callback
    function ActivityPartyFromCallBack(result) {
    //ActivityParty To Callback
    function ActivityPartyToCallBack(result) {
    GetReportId('Quotation');
    //Create attachment for the created email
    function CreateEmailAttachment() {
    //get reporting session and use the params to convert a report in PDF
    var params = getReportingSession();
    //Email attachment parameters
    var activitymimeattachment = Object();
    activitymimeattachment.ObjectId = Object();
    activitymimeattachment.ObjectId.LogicalName = "email";
    activitymimeattachment.ObjectId.Id = email.ActivityId;
    activitymimeattachment.ObjectTypeCode = "email",
    activitymimeattachment.Subject = "File Attachment";
    activitymimeattachment.Body = encodePdf(params);
    activitymimeattachment.FileName = "Report.pdf";
    activitymimeattachment.MimeType = "application/pdf";
    //Attachment call
    SDK.JScriptRESTDataOperations.Create(activitymimeattachment, "ActivityMimeAttachment", ActivityMimeAttachmentCallBack, function (error) { alert(error.message); });
    //ActivityMimeAttachment CallBack function
    function ActivityMimeAttachmentCallBack(result) {
    var features = "location=no,menubar=no,status=no,toolbar=no,resizable=yes";
    var width = "800px";
    var height = "600px";
    window.open(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", features);
    // To open window which works in outlook and IE both
    //openStdWin(Xrm.Page.context.getServerUrl() + "main.aspx?etc=" + 4202 + "&pagetype=entityrecord&id=" + email.ActivityId, "_blank", width, height, features);
    //This method will get the reportId based on a report name that will be used in getReportingSession() function
    function GetReportId(reportName) {
    var oDataSetName = "ReportSet";
    var columns = "ReportId";
    var filter = "Name eq '" + reportName + "'";
    retrieveMultiple(oDataSetName, columns, filter, onSuccess);
    function retrieveMultiple(odataSetName, select, filter, successCallback) {
    var serverUrl = Xrm.Page.context.getServerUrl();
    var ODATA_ENDPOINT = "/XRMServices/2011/OrganizationData.svc";
    var odataUri = serverUrl + ODATA_ENDPOINT + "/" + odataSetName + "?";
    if (select) {
    odataUri += "$select=" + select + "&";
    if (filter) {
    odataUri += "$filter=" + filter;
    $.ajax({
    type: "GET",
    contentType: "application/json; charset=utf-8",
    datatype: "json",
    url: odataUri,
    beforeSend: function (XMLHttpRequest) {
    XMLHttpRequest.setRequestHeader("Accept", "application/json");
    success: function (data) {
    if (successCallback) {
    if (data && data.d && data.d.results) {
    successCallback(data.d.results);
    else if (data && data.d) {
    successCallback(data.d);
    else {
    successCallback(data);
    error: function (XmlHttpRequest, errorThrown) {
    if (XmlHttpRequest && XmlHttpRequest.responseText) {
    alert("Error while retrieval ; Error – " + XmlHttpRequest.responseText);
    function onSuccess(data) {
    reportId = data[0].ReportId.replace('{', ").replace('}', ");
    CreateEmailAttachment(); // Create Email Attachment
    //Gets the report contents
    function getReportingSession() {
    var pth = Xrm.Page.context.getServerUrl() + "/CRMReports/rsviewer/reportviewer.aspx";
    var retrieveEntityReq = new XMLHttpRequest();
    var Id = Xrm.Page.data.entity.getId();
    var quotationGUID = Id.replace('{', ""); //set this to selected quotation GUID
    quotationGUID = quotationGUID.replace('}', "");
    var reportName = "Quotation"; //set this to the report you are trying to download
    var reportID = "7C39D18F-1DC6-E311-8986-D89D6765B238"; //set this to the guid of the report you are trying to download
    var rptPathString = ""; //set this to the CRMF_Filtered parameter
    var strParameterXML = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'><entity name='quote'><all-attributes /><filter type='and'><condition attribute='quoteid' operator='eq' uitype='quote' value='" + quotationGUID + "' /> </filter></entity></fetch>";
    retrieveEntityReq.open("POST", pth, false);
    retrieveEntityReq.setRequestHeader("Accept", "*/*");
    retrieveEntityReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    rptPathString = "id=%7B" + reportID + "%7D&uniquename=" + Xrm.Page.context.getOrgUniqueName() + "&iscustomreport=true&reportnameonsrs=&reportName=" +
    reportName + "&isScheduledReport=false&p:CRMAF_Filteredquote=" + strParameterXML;
    //remove the part starting from &p:salesorderid if your report has no parameters
    retrieveEntityReq.send(rptPathString);
    var x = retrieveEntityReq.responseText.indexOf("ReportSession=");
    var ret = new Array();
    ret[0] = retrieveEntityReq.responseText.substr(x + 14, retrieveEntityReq.responseText.indexOf("&", x) - x - 14); //the session id
    x = retrieveEntityReq.responseText.indexOf("ControlID=");
    ret[1] = retrieveEntityReq.responseText.substr(x + 10, retrieveEntityReq.responseText.indexOf("&", x) - x - 10); //the control id
    return ret;
    var bdy = new Array();
    var bdyLen = 0;
    function concat2Bdy(x) {
    bdy[bdyLen] = x;
    bdyLen++;
    function encodePdf(params) {
    bdy = new Array();
    bdyLen = 0;
    var retrieveEntityReq = new XMLHttpRequest();
    var pth = Xrm.Page.context.getServerUrl() + "/Reserved.ReportViewerWebControl.axd?ReportSession=" + params[0] +
    "&Culture=1033&CultureOverrides=True&UICulture=1033&UICultureOverrides=True&ReportStack=1&ControlID=" + params[1] +
    "&OpType=Export&FileName=Public&ContentDisposition=OnlyHtmlInline&Format=PDF";
    retrieveEntityReq.open("GET", pth, false);
    retrieveEntityReq.setRequestHeader("Accept", "*/*");
    retrieveEntityReq.send();
    BinaryToArray(retrieveEntityReq.responseBody);
    return encode64(bdy);
    var StringMaker = function () {
    this.parts = [];
    this.length = 0;
    this.append = function (s) {
    this.parts.push(s);
    this.length += s.length;
    this.prepend = function (s) {
    this.parts.unshift(s);
    this.length += s.length;
    this.toString = function () {
    return this.parts.join('');
    var keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
    function encode64(input) {
    var output = new StringMaker();
    var chr1, chr2, chr3;
    var enc1, enc2, enc3, enc4;
    var i = 0;
    while (i < input.length) {
    chr1 = input[i++];
    chr2 = input[i++];
    chr3 = input[i++];
    enc1 = chr1 >> 2;
    enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
    enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
    enc4 = chr3 & 63;
    if (isNaN(chr2)) {
    enc3 = enc4 = 64;
    } else if (isNaN(chr3)) {
    enc4 = 64;
    output.append(keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4));
    return output.toString();
    </script>
    <script type="text/vbscript">
    Function BinaryToArray(Binary)
    Dim i
    ReDim byteArray(LenB(Binary))
    For i = 1 To LenB(Binary)
    byteArray(i-1) = AscB(MidB(Binary, i, 1))
    concat2Bdy(AscB(MidB(Binary, i, 1)))
    Next
    BinaryToArray = byteArray
    End Function
    </script>
    </head>
    <body>
    <input type="button" onclick="CreateEmail();" value="Attach Report" />
    </body>
    </html>
    Thank you,
    Mittal.

  • RE: Dynamically mapping data to widgets

    One quick and dirty solution would be something like this (though not
    terribly efficient):
    newPanel : Panel;
    newPanel = <panelCreatedFromWindowWorkshop>.Clone(deep = TRUE);for childWidget in newPanel.children do
    -- check if the childWidget field name matches field name to be
    set
    if childWidget.name.isEqual(source=<..FieldNameToSet..>,
    ignoreCase=TRUE) then
    dataWidget : dataField = dataField(childWidget);
    if dataWidget.textvalue = NIL then
    dataWidget.textvalue = new;
    end if;
    -- set the textvalue of the childWidget to required
    value
    dataWidget.textvalue.setvalue('WORKS !');
    end if;
    end for;
    Your problem would have been directly solved if the Forte library class
    CompoundField provided a SetDataObject( ) method corresponding to the
    GetDataObject( ) method.
    According to Forte Help - "The GetDataObject method returns the object
    that the compound field is mapped to. If the compound field is not
    mapped to an object, this method returns NIL."
    Maybe Forte could consider providing this in a future release.
    Another option would have been to use the GetFieldByName( ) method on
    the newly created panel to get at the child widgets directly.
    According to Forte help - "GetFieldByName is designed for use in dynamic
    applications. For example, you can use GetFieldByName to retrieve the
    names of dynamically created fields for immediate use in dynamic
    applications."
    This works fine for compile-time named widgets, but I couldn't get it to
    work for the newPanel child widgets using the code below, or maybe I am
    missing something here.
    newPanel : Panel;
    newPanel = <panelCreatedFromWindowWorkshop>.Clone(deep = TRUE);newPanel.name.setvalue('newPanel');
    newPanel.parent = <aGridField>;
    dataWidget : dataField = dataField(newPanel.getFieldByName('age'));
    (OR)
    dataWidget : dataField =
    dataField(<aGridField>.getFieldByName('newPanel.age'));
    (OR)
    dataWidget : dataField =
    dataField(self.window.getFieldByName('newPanel.age'));
    In all cases the return value was NIL.
    Maybe someone from Forte could shed more light on this.
    Hope this helps.
    Prashant.
    From: Richard Finegan[SMTP:[email protected]]
    Reply To: Richard Finegan
    Sent: Thursday, August 13, 1998 2:27 PM
    To: 'Forte Users Mailing List'
    Subject: Dynamically mapping data to widgets
    Here's what I'm trying to do:
    I have a panel with a bunch of data fields that I've mapped to an
    object.
    I want to replicate the panel several times to programmatically
    populate a
    TabFolder (although the TabFolder bit isn't really relevant here, I
    think).
    But I can't figure out how to get at the mapped data in the replicas
    of my
    object...
    newPanel : Panel;
    newPanel = <panelCreatedFromWindowWorkshop>.Clone(deep = TRUE);
    panelCreatedFromWindowWorkshop.anAttributeOfObjMappedToPanel =
    something;
    // tada! "something" appears in a data field of the original panel
    newPanel.? = something; // how to do the same thing with the new
    panel?
    How do I map an object to the replicated panel? I've experimented
    with
    assigning "Widget.AppData" to a new object, but I can't seem to get it
    to
    do anything...
    Thanks in advance for your help.
    Richard Finegan
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi Michael,
    did you find any solution?
    I've the same problem.

  • Handling dynamic item data in VSTS

    Hi Team,
    Can you please let us know how to handle dynamic item data in VSTS.
    Regards
    Raghavendra
    8105577088

    Hi Raghavendra,
    Based on your previous threads posted by you in the test forum, I doubt that you want to create the coded UI test, am I right?
    If so, which kind of app did you want to test, WPF or others? Could you share us a screen shot about the real UI controls you want to test? What real Controls you want to test, list item controls or others?
    You know that to find a control in coded UI test, we have to use the unique peoperties as the search properties, so if your controls are dynamic, the real issue would be related to the search properties you use in your code.
    Like this case:
    https://social.msdn.microsoft.com/Forums/en-US/4c4805f0-230d-459d-a3e5-61e62746c5b9/list-box-item-is-not-get-selected-while-play-back-the-recorded-script-in-coded-ui-test?forum=vsautotest
    As Pankaj's suggestion, if the list items are dynamic then you can use the index values instead of the innertext, so the real issue would be related to how to use the search perperties in your side. If you item text value is dynamic, you'd better not
    use the text value as the search properties. 
    About "How does “Coded UI test” finds a control ??", reference:
    http://blogs.msdn.com/b/balagans/archive/2009/12/28/9941582.aspx
    If I have misunderstood this issue, please feel free to let me know.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Getting and error of Dynamic CRM Destination connection?

    Hi,
    I have used KingswaySoft Dynamic CRM Destination component to connect CRM 2013 in SSIS. bu getting below error when try to execute the package?
    [Dynamics CRM Destination [20]] Error: An error occurred with the following error message: "KingswaySoft.IntegrationToolkit.DynamicsCrm.CrmServiceException: CRM service call returned an error: Please select a Client Market for the Parent Account(Error
    Code: -2147220891, Detail Message: Please select a Client Market for the Parent Account) (SSIS Integration Toolkit for Microsoft Dynamics CRM, v5.0.101.5040)
    System.ServiceModel.FaultException<KingswaySoft.DynamicsCrmServices.Soap2011.OrganizationService.OrganizationServiceFault>: Please select a Client Market for the Parent Account
    Could you please anyone can help me regarding this error?
    Thanks in Advance.
    Thanks &amp;amp; Regards, Anil

    Hi Anil, 
    By reading the error message, it looks like that you have a CRM plugin which is firing this error message, in which case you would either have to update your source data to accommodate this particular requirement or otherwise you may have to re-engineer
    your CRM plugin code to relax this particular constraint. 
    Please feel free to reach out to us for a direct support (we don't monitor this forum on a regular basis) as Arthur has suggested. 
    Thanks,
    Daniel Cai | http://danielcai.blogspot.com |
    @danielcai | Data Integration made easy with
    SSIS Integration Toolkit

  • Business Partner Data Archiving - Help Required

    Hi,
    Am New to Data Archiving and need help to Archive Business Partner in CRM. I tried to Archive some BP's but it was not archiving. Kindly throw some light on it.
    Problem we face are:
    1) When we try to write a Business Partner to an Archive File the Job Log Shows finished but no files are created in the System.
    2) When we try to delete the BP from Data Base it doesn't show the Archived BP's that could be deleted (I guess this is because there are no archived file).
    Archive Object Used is CA_BUPA. We have created a Variant and set the Time as Immediate and Spool to LOCL.
    Kindly let us know if there is any step we are missing here and if we are on the wrong track.
    All answers are appreciated.
    Thanks,
    Prashanth
    Message was edited by:
            Prashanth KR

    Hi,
    To archive a BP following steps are to be followed.
    A. Mark the BP to be archived in transaction BP >status tab
    B. Run dacheck
    FYI : Steps on how to perform dacheck :
    1.  In transaction DACONTROL change the following parameter to the
    values : for CA_BUPA .
    No. calls/packages   1
    Number of Objects   50
    Package SizeRFC     20
    Number of Days       1 (if you use mobile client it should be more)
    2.If a business partner should be archived directly after the
      archiving note was set, this can be done by reseting the check
       date with report CRM_BUPA_ARCHIVING_FLAGS.
       here only check (set) the options :
       - Archiving Flag
       - Reset Check Date
      Reset all options should be unchecked.
    3. go to dacheck and run the process
    4. This will change the status of the BPs to 'Archivable'
       *Only those bp's which are not involved in any business transactions,
        install base, Product Partner Range (PPR) will be set to archivable
    The BP's with status 'Archivable' will be used by the archiving
         run.
    Kindly refer note 646425 before goint to step C ***
    C.Then run transaction CRM_BUPA_ARC.
    - Make sure that the "selection program" in transaction "DACONTROL"
       is maintained as " CRM_BUPA_DA_SELECTIONS"
      Also create a variant, which can done by excecuting
      CRM_BUPA_DA_SELECTION and enter the variants name for the field
      Variant. This variant is the buisness partner range.
    - Also please check note 554460.
    Regards, Gerhard

Maybe you are looking for

  • Error in  deploying the visual composer model

    Hello friends,     I have issue in deploying model in Visual Composer.I am able to compile the model successfully. While deploying the model I am getting following error: Error in compiling Flex application: java.lang.InternalError: Can't connect to

  • How do i get my iphone to show up in itunes

    I have uninstalled and reinstalled iTunes and tried everything else, but my iPhone will not show up in iTunes. How do I fix this?

  • ITunes won't open due to problem with audio configuration

    Out of the clear blue iTunes will not open any longer. I get a gray message screen that says iTunes can't open due to an audio configuration problem. Any answers for this???

  • Flash Player not working in Firefox

    Suddenly Firefox will not play flash player content called when I play games online. It worked fine a few days ago. When I click on the link, it opens the game page, but where the game should appear, I see a blank black box. When I click on the "Play

  • WRT1900AC - WiFi on 5GHz band *RANDOM REBOOTS*

    I've noticed that this router is totally unstable (random reboots) on 5GHz band. I'm using Lenovo ThinkPad T440p with build-in Intel(R) Dual Band Wireless-AC 7260 and it's unusable on 5GHz band using Mixed mode. I've setup to N-Only but it doesn't he