CRM-BW

Hi friend's
what are the integration's between CRM and BW plz  give me the answer
mail mail id [email protected]

Hi Mahesh,
Please refer Best Practices for your information.
http://help.sap.com/bp_crmv250/CRM_DE/BBLibrary/html/BBlibrary.htm
B84: BI Connectivity
Regards,
Johnny.
Reward if it helps.

Similar Messages

  • BADI for changing fields during Creation of BP in CRM

    Hello to everyone,
      I need to find a BADI (or other way) to default several fields during BP creation in CRM (4.0 SR1 SP9). The fields I will like to set are TAX TYPE, TAX NUMBER, TAX CATEGORY, etc.. I have found the BADI BUPA_TAX_UPDATE but i dont see any suitable parameters (structures) to changes these fields. Please advice and thanks in advance.

    Hi
    If you use function BUPA_NUMBERS_GET then your BP number will already be buffered and you can avoid a DB read. It may also be that the BP is not in the DB yet anyway.
    You can only pass one GUID in at a time - loop through IT_CHANGED_INSTANCES into a variable of type BU_PARTNER_GUID and pass that into the function as input parameter IV_PARTNER_GUID.
    Cheers
    Dom

  • Refresh CRM data in R/3 report

    Hi All,
    I've a report in R/3 where i get the Order Status of CRM through a RFC, but when i'm changing the status in CRM through crmd_order, when the report is open in R/3. When i press the refresh button, the status is not changed, it shows the previous status.
    Below is the code, can any1 help me how to go about
      CALL FUNCTION 'CRM0_READ_RFC_DEST'
        EXPORTING
         i_consumer             = 'CRM'
          i_download_type       = '*'
          i_objname             = '*'
      I_BAPICRMDH2          =
      I_REM_LOGSYS          =
        TABLES
          t_crmrfcpar           = t_crmrfcpar
    EXCEPTIONS
      NO_ENTRY_FOUND        = 1
      OTHERS                = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF NOT t_crmrfcpar[] IS  INITIAL.
        READ TABLE t_crmrfcpar INDEX 1.
        l_rfcdst = t_crmrfcpar-rfcdest.
      ENDIF.
    Call RFC
    *loop at z_guid into lguid.
    *endloop.
    *refresh ZORDER_STATUS.
    CALL FUNCTION 'ZCRM_HEADER_STATUS'
      DESTINATION l_rfcdst
    IMPORTING
          ORDER_IDRET       =   l_guid
      tables
          ORD_STATUS        = ZORDER_STATUS
    Regards
    Sanju

    any body?

  • Installation of IPC AP 7.0 Jar is getting Failed when uploading in CRM

    Hello Experts,
    we did some changes in the previosly uploded version of IPC AP 7.0  customer user exit Jar file in eclipse.
    While uploading the new modified jar through transaction /SAPCND/UE_DEV in CRM we are getting error :" installation of module <Jar file name > has failed ".
    when we checked the logs in SM 53 we seen the below mentioned error:
    Message: Exception of type com.sap.sql.log.OpenSQLException caught: Exception of type com.sap.sql.sqlparser.CommonSQLParserException: - statement "DELETE FROM "SVMCRT_MOD_TR_T" WHERE "MODULE_NAME" LIKE ? ESCAPE ^ (reason: Modification of ABAP tables is not permit ted)" is not supported
    caught: - statement "DELETE FROM "SVMCRT_MOD_TR_T" WHERE "MODULE_NAME" LIKE ? ESCAPE ^ (reason: Modification of ABAP tables is not permitted)" is not supported
    --> com.sap.sql.log.OpenSQLException: Exception of type com.sap.sql.sqlparser.CommonSQLParserException: - statement "DELETE FROM "SVMCRT_MOD_TR_T" WHERE "MODULE_NAME" LIKE ? ESCAPE '^' (reason: Modification of ABAP tables is n" is not suppor ted
    caught: - statement "DELETE FROM "SVMCRT_MOD_TR_T" WHERE "MODULE_NAME" LIKE ? ESCAPE '^' (reason: Modification of ABAP tables is not permitted)" is not supported
    at com.sap.sql.log.Syslog.createAndLogOpenSQLException(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Object;)Lcom/sap/sql/log/OpenSQLException;(Syslog.java:85)
    at 
    if  required i can post the complete stack trace.
    any inputs/suggestions are most welcome.
    Thanks & regards,
    Siddharth

    Hi Mark,
    Yesterday after Posting the thread we found the same Note ,Issue occured because of  JAVA write access was not enabled on the table ,After enabling it as mentioned in SAP Note, Jar file get successfully uploaded.
    Thanks for your Help also.
    Regards,
    Siddharth

  • Custom message required on log on pop-up in SAP CRM WEB UI

    We required custom message to the log- on popup, right now the message is coming after we give the user ID and password "starting SAP CRM" instead of that
    user required welcome message.., how can achieve this ?
    Please reply as soon as possible.

    Hi Pankaj,
    did you already check the guide in the CRM Wiki:
    https://wiki.sdn.sap.com/wiki/display/CRM/WelcomeUserMessageinWeb+UI
    Hope this answers your question.
    Best Regards,
    Michael

  • 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.

  • Follow up transaction in CRM

    Hi All,
    I want to create an Order in CRM with reference to the Standard Order (which is created in ECC and replicated from ECC to CRM).
    When I open the Transaction (which is created in ECC and replicated from ECC to CRM).
    in CRM and clikc on follow up I am not able to create the follow up transaction.
    The follow up transaction is in display mode.
    Can anybody give me inputs in this regard? where is wrong
    Will award the points for the helpful answer.
    Regards,
    -Rahul.

    Hi Shalini,
    The document is replicated from ECC to CRM without any errors.
    For this document I just want to create follow up transaction in CRM.(I dont want to change the document in CRM)
    The follow up transaction is in display mode. this is my problem.
    Hi Rekha:
    I have done following setting in CRM to create follow up transaction in CRM for the document which is replicated from ECC to CRM.
    1)     Defined the Copying Control for Transaction type
    2)     Defined Copying Control for Item categories
    3)     Defined Item category determination when copying
    Thanks in advance,
    Regards,
    -Rahul.

  • How to Delete the condition record in CRM

    HI,
    Can you please help me how to delete the condition record from condition table in CRM.
    Please explain the usage of FM CRMXIF_CONDITION_SEL_DELETE with examples.
    I have also read the documention of the function module. How to use this FM for custom defined condition table.
    (this is the code given in Documentation)
    DATA-OBJECT_REPRESENTATION         = 'E'
    DATA-SEL_OPT-CT_APPLICATION              = 'CRM'
    DATA-SEL_OPT-OBJECT_TASK                    = 'D'
    DATA-SEL_OPT-RANGE-FIELDNAME        = 'PRODUCT_ID'
    DATA-SEL_OPT-RANGE-R_SIGN                  = 'I'    (Including)
    DATA-SEL_OPT-RANGE-R_OPTION           = 'EQ'
    DATA-SEL_OPT-RANGE-R_VALUE_LOW  = 'PROD_1'
    Thanks
    Shankar

    Hi Shankar,
    I am using the same CRMXIF_CONDITION_SEL_DELETE function module to delete condition record present in CRM.
    But it is giving me below error in the return table of the FM after i run the program. Can you please correct me if I am doing any thing wrong?
    Error in  lt_return: SMW3     CND_MAST_SEL_DEL_EXT_VALIDATE     CND_M_SD
    code:
    ls_range-fieldname = 'PRODUCT_ID''.
    ls_range-R_SIGN = 'I'.
    ls_range-R_OPTION = 'EQ'.
    ls_range-R_VALUE_LOW = '123456'.
    APPEND ls_range TO lt_range.
    MOVE lt_range TO ls_entry-SEL_OPT-range.
    ls_data-SEL_OPT-object_task = 'D'.
    ls_data-SEL_OPT-ct_application = 'CRM'.
    ls_data-object_representation = 'E'.
    CALL FUNCTION 'CRMXIF_CONDITION_SEL_DELETE'
      EXPORTING
        DATA          = ls_date
    IMPORTING
       RETURN        = lt_return
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      IMPORTING
        return = lt_ret.
    Edited by: Saravanaprasad Nadar on Jul 7, 2010 1:27 AM

  • How to get a Custom View in CRM 2007

    Hi,
    I have created a new view (SrvTLocation) and I want to replace Service Level Agreements view with the SrvTLocation.
    In the old version, I followed this approach to get the location view
    1. Add SrvTLocation to the SrvTViewSet under the view area "SrvTActionSLA".
    2. Redefine the method "DO_REPLACE_INITIAL_VIEW" of the controller class of "SrvTViewSet", so that it will replace the "SrvTSLA" with "SrvTLocation"
    I dont know how to do it in the new system.
    Please advice me. I will reward points.
    Sreekanth

    Hi Sreekanth
    Have you checked the new CRM 2007 Cookbook.
    I believe it's available from SAP Marketplace. Haven't checked myself but do believe it's there.
    Regards
    Arden
    Reward with points if helpful

  • Error while calling a web service from BCM to CRM

    Dear Experts,
    I'm calling a CRM web service from BCM via Custom IVR. The web service works fine when run using SOAPUI. But when called from BCM, there is an error in the CEM logs as mentioned below:
    11:16:51.515 (11224              ) ERR> Connection/0C3D6220 [0.0.0.0:0->172.16.213.11:8000]: SoapClient::Invoke3 - Unknown operation ZCRMU_CUST_AUTHO_ONCALL
    11:16:51.515 (11224              ) ERR> [EXC] : IvrApplication.callSoapMethod (CALL_ID=48B73B3988FDD541BD0722E4D6512E26): Exception
    11:16:51.516 (11224              ) ERR> <type 'exceptions.RuntimeError'> : SoapClient::Invoke3 - Unknown operation ZCRMU_CUST_AUTHO_ONCALL
    11:16:51.518 (11224              ) ERR> File: .\IvrApplication.py (1728)  Func: callSoapMethod          <None>
    11:16:51.518 (11224              ) ERR> File: .\soaplib.py    (  25)  Func: __call__                <None>
    11:16:51.518 (11224              ) ERR> File: .\soaplib.py    (  40)  Func: __request                <None>
    11:16:51.518 (11224              ) DBG> Connection/0C3D6220 [0.0.0.0:0->172.16.213.11:8000]: TcpConnection::OnDisposed
    11:16:51.518 (11224              ) DBG> Connection/0C3D6220 [0.0.0.0:0->172.16.213.11:8000]: Disposed while still connection open
    11:16:51.518 (11224              ) DBG> Connection/0C3D6220 [0.0.0.0:0->172.16.213.11:8000]: Close
    11:16:51.518 (11224              ) DBG> Connection/0C3D6220 [0.0.0.0:0->172.16.213.11:8000]: CloseMySocket - closed
    11:16:51.518 (08220/IpcWorker    ) DBG> ThreadPool[00558068]: WorkerThread GetQueuedCompletionStatus result=0 poverlapped=09E21C6C key=0C3D6220 bytes=0
    11:16:51.518 (08220/IpcWorker    ) DBG> ThreadPool[00558068]: IIoCompletion pending=1
    11:16:51.518 (08220/IpcWorker    ) DBG> Connection/0C3D6220 [0.0.0.0:0->172.16.213.11:8000]: OnIoCompletion 09E21C6C result=0 bytes=0
    11:16:51.518 (08220/IpcWorker    ) DBG> (0C3D6294) LastError::WinError TcpConnection::OnIoCompletion - 10038 (0x2736) An operation was attempted on something that is not a socket.
    11:16:51.518 (08220/IpcWorker    ) DBG> Connection/0C3D6220 [0.0.0.0:0->172.16.213.11:8000]: OnIoCompletion 09E21C68 receive
    It seems that through the IVR the web service is not even reached. I discovered this by inserting an external break point in the CRM Function Module which is called by the web service.
    Can anybody help me in resolving this error? I'm working on BCM 7 SP 6.
    Thanks in Advance.
    Regards,
    Swapna

    Hi Swapna,
    from your screenshot it seems that you actually try to call the service in your Data Source Expression field. You should set path to the WSDL file here actually - this could be either URL to SAP or to filesystem, as Anton suggested (this could be faster). Have you created endpoint binding for your service in transaction SOAMANAGER? If yes, then simply download the corresponding WSDL with binding or copy the URL which leads to it. But also test whether you are able to retrieve the WSDL without logging into SAP (close all browser windows and then open a new one otherwise session ID from other browser windows can be reused).
    If you have to give username and password, then setup anonymous alias in transaction SICF, for example.
    Pleas, check my previous post on the same subject here: Re: BCM7 IVR : SOAP request for client identification in CRM .
    Maybe it could help.
    Regards,
    Dawood.

  • Industry error while doing replication of customer from R/3 to CRM

    Hi,
    We have production system already implemented and going for roll out for another company both R/3 & CRM.
    We have generated conditional objects while doing roll out phase. From then we are getting this error.
    Problem:
    Customers are not getting replicated to CRM. And in SMW01 the error log says
    "Industry 300 not defined for industry system SAPS
    Validation error occurred: Module CRM_BUPA_MAIN_VAL, BDoc type BUPA_MAIN."
    Since we are going for roll out we have done initial load of all conditional objects
    like 'DNL_COND_A002' etc.
    After running we did checked in R3AM1 - everything was DONE - in green colour.
    But in SLG1 - Display log - there are several entries in Red colour.
    Message text says -
    "It is not possible to change client-independent Customizing objects
    Diagnosis:
    Change of client-independent Customizing objects is not permitted in the client in which the transfer of data for table T682 is executed.
    System response:
    As table T682 contains client-independent Customizing, data transfer is interrupted.
    Procedure for System Administration
    Provide users with the appropriate authorization to execute data transfer in a client in which changes to client-independent objects is permitted."
    Now queues are pilled up with the industry error and don't know how to correct these errors.
    Please help.
    Regards,
    Dhanraj Dange

    Hi pankaj,
    Step 1:After completing Initial Download tranfer of data takes place from R/3 to CRM system in the form of Customers or employess.
    Bulk data will be flown in the first step.
    I f there are any errors ,we solve the errors and replicate them manually by using CRMM_BUPA_map.
    Step2:There are few customers which are created daily in SAP SD or R/3 and these customers are transfered from R/3 to CRM .
    So my question is  Is this b'cos of Delta Download or Bcoz of some other Reason.
    If so "Is there any specific name for this.
    Regards,
    divya

  • Error while saving a Sales Order in the CRM Mobile Application

    Hi,
    I am facing issues while saving a Sales Order in the CRM Mobile Application. I am getting the error message "Value Field KvLangu is not valid (Error: 236 / 1102)".
    I would be very grateful if somebody had faced this issue before and this way could help me with some information.
    Best Regards,
    Rogerio Prado.

    Hi Rogerio,
    You should put mobile sales related messages in the forum "CRM Mobile applications"
    This error message is coming because the language table SMOT002 might be empty in your mobile client OR it does not have all the values which have been customized in the system.
    You need to have subscription based on publication "customizing objects" assigned to your site.
    Regards
    Vivek

  • The billing doc is not showing in the order  documnet flow in SAP CRM 7.0

    Hi CRM Experts,
    Our CRM system has been upgraded from 4.0 to 7.0 recently.
    We have come across with one strange issue; for some orders  which are billed in ECC6.0 are not showing as next document in the CRM order under document flow in SAP GUI. Only preceding document and replicated document are showing in the CRM document flow.
    Appreciate for yor valuable solution at the earliest.
    Best Regards
    Succhi

    I have the same problem!!!   Did anyone solve this???

  • BSP Error while selecting "campaign elements" in spanish --- crm 2007

    Hi experts,
    I´m trying to look for a solution for a problem with an error that occours while selecting in WEB UI --marketing --- campaign elements , in spanish language.
    Error Business Server Page (BSP)
    <thtmlb:textView>: (design) The Attribute Value is not a Value from: STANDARD/HEADER1/HEADER2/LABEL/VALUE/ITALIC/BOLD
    In english it works perfect.

    Which field is? Has translate value content to spanish for this field?.
    In SAP CRM UI, press F2 and tell me which is the field

  • Material confirmation in ECC based on service confirmation in CRM

    The scenario is Service order & confirmation is in SAP CRM & the billing is in ECC
    The Issue is about material ( spare parts) issue in ECC based on the service confirmation in CRM. In ECC the spare parts are batch managed.
    So to do an automatic goods issue in ECC, we need to enable a BAPI for batch determination.
    Now we are contemplating of doing the goods issue in ECC manually.
    Request you to see if the below scenario works or a better solution is possible
    Can we assign a normal sales order type instead of a debit memo so that delivery of spare parts & then billing can take place.
    The menu path I am talking about is  ( ECC- SPRO- Integration with other mySAP components-CRM-Settings for service processing-billing integration-map transaction types & item categories)

    Hi Madhu G
    I have defined the confirmation profile in Opk0. I know that I can assign a different profile with reference to user.
    I dont want confirmation profile based on Storage location
    I want the confirmation screen to be different for different materials -plant combination. Does anyone have any idea how this can be achieved?
    regards
    PK

  • Setting up Free Goods in CRM 5.0 Standalone

    Dear Friends,
    We are trying to set up Free Goods in our CRM 5.0 standalone environment. What we want to realize is that, if customer buys product A, product B will be added to the order automatically as free of charge. So far we have no idea how to get this set up in the system.
    In R/3 you can specify 'requirement' in each condition type. In the 'requirement' section you can add a small ABAP program that might realize the functionality. However, it doesn't seem to be the case in CRM.
    Please advise. Many thanks!
    Leon

    Hi,
    While defining the Condition types in IMG system will ask the Application and Usage,select the applicatioin CRM, Usage is Free goods.
    CRM Standalone condition records maintain from the  Transaction code
    /SAPCND/GCM - Condition Maintenance, after entering this code give the Application CRM than select your Free goods condition type maintain the values.
    Relationship maintains in the condition records only, Once you select the Free godds conditin type than all required coloumns will pop up enter your product and Qty with the offered free goods product.
    Regards
    Naren..

Maybe you are looking for

  • Calendar crashes opening iCloud-sync'd events

    I receive many invites from co-workers who use Outlook / Exchange to create appointments. I receive the appointment, accept and add it to iCal on my MacBook Pro (10.7.3) just fine. I sync my calendars to my iPhone and iPad via iCloud.I can open the a

  • I have problems with my payment.

    It says always that security code is wrong and I don't get it. I have tried Visa and Mastercard and nothings working. I can't bye even free apps. Im from Finland! Please help me..

  • SMTP+Iron port out going mail issue

    Hi, One of the EBiz instance is configured with Iron port SMTP server for outgoing workflow mails. Th IRONPOrt mails are relayed using round robin technique. From the EBiz server OS if i fire mails the mails mails are relying using the round robin te

  • Utility error

    Hello, I recently changed to Yosemite and since then I have a funny situation, which is bugging me. Every 20 minutes on the dot a window pops up from the console with the message "Utility error" In the box is a cloud visible with a zipped up zipper.

  • I cant find my serial code for my free trial

    please help, i've been trying for hours to activate my free trial of creative cloud, however i cant get past the stage of where it requires a serial code. can you please tell me where to find it