Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all 46379 articles
Browse latest View live

How to set up Project Service Automation on Dynamics CRM 2016 onPremise?

$
0
0

Hi, i am a classic .NET developer and want to play around with CRM 2016 and its programmability. I have installed Dynamics CRM 2016 onpremise with Update 1 which runs successfully. What i wanted to try out is Dynamics CRM 2016 Project Service Automtion. But i cannot find the link for it in my portal. How can i setup or configure Project Service Automation for Dynamics CRM 2016 for an onpremise installation?

best regards

Yavuz


Plugin query - Contact with Id = xxx-xxxx does not exist

$
0
0

Hi,

I have replaced the OOTB address1_country field with a custom lookup list. I created an entity called Country, and created records of this type for every country in the world. Now, when the user creates a contact, they select the country from a lookup field.

However, when creating a contact in CRM by tracking it in from Outlook contacts, the original address1_country field is filled in. In order to then update the custom country field, I have written a plugin which takes the string value in address1_country (eg United Kingdom), looks up the relevant custom country record and adds it to the custom country field.

This all works perfectly when the string value matches a custom country. However, when the string value is something like 'UK' instead of 'United Kingdom', and therefore does not exist as a custom country record, I get the following error:

<Message>contact With Id = 2179c8b4-f2ff-e611-810e-e0071b6611e1 Does Not Exist</Message>

The plugin is firing on create of contact, post-operation, synchronous. 

Could some suggest what I need to do?? Thank you.

Plugin code:

var pluginExecutionContext = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));

if (pluginExecutionContext.Depth > 1) { return; }
var factory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
var service = factory.CreateOrganizationService(pluginExecutionContext.UserId);

Entity contact = pluginExecutionContext.InputParameters["Target"] as Entity;

ColumnSet cols = new ColumnSet("frp_country", "frp_country", "address1_country", "address1_country");
Entity contactfull = service.Retrieve("contact", contact.Id, cols);

string countryname = "";
Guid countryid = new Guid();

if (contactfull.Contains("frp_country")) { return; }
if (contactfull.Contains("address1_country")) { countryname = (string)contactfull["address1_country"]; } else { return; }

string fetchxml = @"<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>
<entity name='frp_countrylist'>
<attribute name='frp_countrylistid' />
<attribute name='frp_name' />
<filter type='and'>
<condition attribute='frp_name' operator='eq' value='" + countryname + @"' />
</filter>
</entity>
</fetch>";

EntityCollection results = service.RetrieveMultiple(new FetchExpression(fetchxml));

foreach (var ctry in results.Entities)
{
if (ctry.Contains("frp_countrylistid")) { countryid = (Guid)ctry["frp_countrylistid"]; }
}

contactfull["frp_country"] = new EntityReference("frp_countrylist", countryid);

service.Update(contactfull);

CRM BizTalk Integration

$
0
0

Hi all.

I have problem with sending create message from biztalk to Crm.

The adapter failed to transmit message going to send port "WcfSendPort_OrganizationService" with URL "https://.....api.crm5.dynamics.com/XRMServices/2011/Organization.svc". It will be retransmitted after the retry interval specified for this Send Port. Details:"System.ServiceModel.Security.SecurityNegotiationException: Secure channel cannot be opened because security negotiation with the remote endpoint has failed. This may be due to absent or incorrectly specified EndpointIdentity in the EndpointAddress used to create the channel. Please verify the EndpointIdentity specified or implied by the EndpointAddress correctly identifies the remote endpoint. ---> System.ServiceModel.FaultException: An error occurred when verifying security for the message.
at System.ServiceModel.Security.SecurityUtils.ThrowIfNegotiationFault(Message message, EndpointAddress target)
at System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody(Message incomingMessage, SspiNegotiationTokenProviderState sspiState)
--- End of inner exception stack trace ---

Server stack trace:
at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout)
at System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout)
at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan timeout)
at System.ServiceModel.Security.SecurityProtocol.OnOpen(TimeSpan timeout)
at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
at System.ServiceModel.Channels.CommunicationObject.Open()

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at System.ServiceModel.ICommunicationObject.Open()
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.GetChannel[TChannel](IBaseMessage bizTalkMessage, ChannelFactory`1& cachedFactory)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendMessage(IBaseMessage bizTalkMessage)".

Problem is security. Can anybody help me how to overcome this problem ?

Thank you.

Updating Fields Using Java

$
0
0

Hi Folks,

I am trying to use Java to update a lookup field (User) and a date field of when a field was marked as approved or rejected. I've attached the code below, but it doesnt seem to be triggering? Wondering if anyone could spot where I am going wrong? Thanks!!!

function OnOppLoad() {
    Xrm.Page.getControl("header_process_ro_gateway1approvedtoproceed").setVisible(false);
    Gateway2ReadOnly()
}


function Gateway2Tier1() {


    var approval = Xrm.Page.getAttribute("ro_tier1approval").getValue()
    var robertsondivisionshortcode = Xrm.Page.data.entity.attributes.get("ro_robertsondivisionshortcode").getValue()
    var estimatedvalue = Xrm.Page.getAttribute("estimatedvalue").getValue()

    if (approval === "1" || "2") {
        var SetUserName = new Array();
        SetUserName[0] = new Object();
        SetUserName[0].id = Xrm.Page.context.getUserId();
        SetUserName[0].entityType = 'systemuser';
        SetUserName[0].name = Xrm.Page.context.getUserName();

        Xrm.Page.getAttribute("ro_decisionbyteir1gateway2").setValue(SetUserName)

        var approvaldate = new Date();


        if (robertsondivisionshortcode != "IsCon") {
            Xrm.Page.getAttribute("ro_gateway1approvedtoproceed").setValue(1);
        }

        if (robertsondivisionshortcode == "IsCon" && estimatedvalue < 3499999) {
            Xrm.Page.getAttribute("ro_hiddengateway2approvedtoproceed").setValue(1);
        }



        Xrm.Page.data.entity.attributes.get("ro_tdecisiondateteir1gateway2").setValue(approvaldate);

    }

    Gateway2ReadOnly()

}




function Gateway2Tier2() {
    var approval = Xrm.Page.getAttribute("ro_tier2gateway2apporvalby").getValue()

    if (approval === "1" || "2") {
        //set the approved by field
        var SetUserName = new Array();
        SetUserName[0] = new Object();
        SetUserName[0].id = Xrm.Page.context.getUserId();
        SetUserName[0].entityType = 'systemuser';
        SetUserName[0].name = Xrm.Page.context.getUserName();
        Xrm.Page.getAttribute("ro_decisionbyteir2gateway2").setValue(SetUserName)
        var approvaldate = new Date();
        Xrm.Page.data.entity.attributes.get("ro_decisiondateteir2gateway2").setValue(approvaldate);


    }
}

function Gateway2Tier3() {
    var approval = Xrm.Page.getAttribute("ro_tier3approvalgateway2").getValue()

    if (approval === "1" || "2") {
        //set the approved by field
        var SetUserName = new Array();
        SetUserName[0] = new Object();
        SetUserName[0].id = Xrm.Page.context.getUserId();
        SetUserName[0].entityType = 'systemuser';
        SetUserName[0].name = Xrm.Page.context.getUserName();
        Xrm.Page.getAttribute("ro_decisionbyteir3gateway2").setValue(SetUserName)
        var approvaldate = new Date();
        Xrm.Page.data.entity.attributes.get("ro_decisiondateteir3gateway2").setValue(approvaldate);
    }
}

function Gateway2Tier4() {
    var approval = Xrm.Page.getAttribute("ro_tier4approvalgateway2").getValue()

    if (approval === "1" || "2") {
        //set the approved by field
        var SetUserName = new Array();
        SetUserName[0] = new Object();
        SetUserName[0].id = Xrm.Page.context.getUserId();
        SetUserName[0].entityType = 'systemuser';
        SetUserName[0].name = Xrm.Page.context.getUserName();
        Xrm.Page.getAttribute("ro_decisionbyteir4gateway2").setValue(SetUserName)
        var approvaldate = new Date();
        Xrm.Page.data.entity.attributes.get("ro_decisiondateteir4gateway2").setValue(approvaldate);
    }
}







function Gateway2ApprovaltoProcced() {

    //ro_gatewaygroupapproval
    //ro_constructionmdapproval

    var Tier2 = Xrm.Page.getAttribute("ro_tier2gateway2apporvalby").getValue()
    var Tier3 = Xrm.Page.getAttribute("ro_tier3approvalgateway2").getValue()
    var Tier4 = Xrm.Page.getAttribute("ro_tier4approvalgateway2").getValue()

    var approval = Xrm.Page.getAttribute("ro_tier1approval").getValue()
    var estimatedvalue = Xrm.Page.getAttribute("estimatedvalue").getValue()

    if (approval == 1 && Tier2 == 1 && estimatedvalue < 4999999) {
        Xrm.Page.getAttribute("ro_hiddengateway2approvedtoproceed").setValue(1);
        return;
    }

    if (approval == 1 && Tier3 == 1 && Tier2 == 1 && estimatedvalue < 7499999) {
        Xrm.Page.getAttribute("ro_hiddengateway2approvedtoproceed").setValue(1);
        return;
    }

    if (approval == 1 && Tier3 == 1 && Tier2 == 1 && estimatedvalue > 7499999 && Tier4 == 1) {
        Xrm.Page.getAttribute("ro_hiddengateway2approvedtoproceed").setValue(1);
        return;
    }
    Xrm.Page.getAttribute("ro_hiddengateway2approvedtoproceed").setValue(0);

}


function Gateway2ReadOnly() {

    var approval = Xrm.Page.getAttribute("ro_tier1approval").getValue()
    if (approval === "1" || "2") {

        Xrm.Page.ui.controls.get("ro_decisionbyteir1gateway2").setDisabled(true)
        Xrm.Page.ui.controls.get("ro_tdecisiondateteir1gateway2").setDisabled(true)
    }
    else {
        Xrm.Page.ui.controls.get("ro_decisionbyteir1gateway2").setDisabled(false)
        Xrm.Page.ui.controls.get("ro_tdecisiondateteir1gateway2").setDisabled(false)
    }


    var Tier2 = Xrm.Page.getAttribute("ro_tier2gateway2apporvalby").getValue()
    if (approval === "1" || "2") {

        Xrm.Page.ui.controls.get("ro_decisionbyteir2gateway2").setDisabled(true)
        Xrm.Page.ui.controls.get("ro_decisiondateteir2gateway2").setDisabled(true)
    }
    else {
        Xrm.Page.ui.controls.get("ro_decisionbyteir2gateway2").setDisabled(false)
        Xrm.Page.ui.controls.get("ro_decisiondateteir2gateway2").setDisabled(false)
    }


    var Tier3 = Xrm.Page.getAttribute("ro_tier3approvalgateway2").getValue()
   if (approval === "1" || "2") {

       Xrm.Page.ui.controls.get("ro_decisionbyteir3gateway2").setDisabled(true)
       Xrm.Page.ui.controls.get("ro_decisiondateteir3gateway2").setDisabled(true)
    }
    else {
       Xrm.Page.ui.controls.get("ro_decisionbyteir3gateway2").setDisabled(false)
       Xrm.Page.ui.controls.get("ro_decisiondateteir3gateway2").setDisabled(false)
    }



   var Tier4 = Xrm.Page.getAttribute("ro_tier4approvalgateway2").getValue()
    if (approval === "1" || "2") {

        Xrm.Page.ui.controls.get("ro_decisionbyteir4gateway2").setDisabled(true)
        Xrm.Page.ui.controls.get("ro_decisiondateteir4gateway2").setDisabled(true)
    }
    else {
        Xrm.Page.ui.controls.get("ro_decisionbyteir4gateway2").setDisabled(false)
        Xrm.Page.ui.controls.get("ro_decisiondateteir4gateway2").setDisabled(false)
    }




}



Updating Fields Using Java

$
0
0

Hi Folks,

I am trying to update two fields based on when a field was approved or rejected.

The Approval Field is an Option Set, choice values are "1" and "2" the other two fields are a User Look Up field and a standard Date/Time Field.

I am not getting any script errors, but the code doesnt seem to be updating the 2 fields. Wondering if anyone could tell me where I am going wrong? Thanks!!!

function OnOppLoad() {
    Xrm.Page.getControl("header_process_ro_gateway1approvedtoproceed").setVisible(false);
    Gateway2ReadOnly()
}


function Gateway2Tier1() {


    var approval = Xrm.Page.getAttribute("ro_tier1approval").getValue()
    var robertsondivisionshortcode = Xrm.Page.data.entity.attributes.get("ro_robertsondivisionshortcode").getValue()
    var estimatedvalue = Xrm.Page.getAttribute("estimatedvalue").getValue()

    if (approval === "1" || "2") {
        var SetUserName = new Array();
        SetUserName[0] = new Object();
        SetUserName[0].id = Xrm.Page.context.getUserId();
        SetUserName[0].entityType = 'systemuser';
        SetUserName[0].name = Xrm.Page.context.getUserName();

        Xrm.Page.getAttribute("ro_decisionbyteir1gateway2").setValue(SetUserName)

        var approvaldate = new Date();


        if (robertsondivisionshortcode != "IsCon") {
            Xrm.Page.getAttribute("ro_gateway1approvedtoproceed").setValue(1);
        }

        if (robertsondivisionshortcode == "IsCon" && estimatedvalue < 3499999) {
            Xrm.Page.getAttribute("ro_hiddengateway2approvedtoproceed").setValue(1);
        }



        Xrm.Page.data.entity.attributes.get("ro_tdecisiondateteir1gateway2").setValue(approvaldate);

    }

    Gateway2ReadOnly()

}




function Gateway2Tier2() {
    var approval = Xrm.Page.getAttribute("ro_tier2gateway2apporvalby").getValue()

    if (approval === "1" || "2") {
        //set the approved by field
        var SetUserName = new Array();
        SetUserName[0] = new Object();
        SetUserName[0].id = Xrm.Page.context.getUserId();
        SetUserName[0].entityType = 'systemuser';
        SetUserName[0].name = Xrm.Page.context.getUserName();
        Xrm.Page.getAttribute("ro_decisionbyteir2gateway2").setValue(SetUserName)
        var approvaldate = new Date();
        Xrm.Page.data.entity.attributes.get("ro_decisiondateteir2gateway2").setValue(approvaldate);


    }
}

function Gateway2Tier3() {
    var approval = Xrm.Page.getAttribute("ro_tier3approvalgateway2").getValue()

    if (approval === "1" || "2") {
        //set the approved by field
        var SetUserName = new Array();
        SetUserName[0] = new Object();
        SetUserName[0].id = Xrm.Page.context.getUserId();
        SetUserName[0].entityType = 'systemuser';
        SetUserName[0].name = Xrm.Page.context.getUserName();
        Xrm.Page.getAttribute("ro_decisionbyteir3gateway2").setValue(SetUserName)
        var approvaldate = new Date();
        Xrm.Page.data.entity.attributes.get("ro_decisiondateteir3gateway2").setValue(approvaldate);
    }
}

function Gateway2Tier4() {
    var approval = Xrm.Page.getAttribute("ro_tier4approvalgateway2").getValue()

    if (approval === "1" || "2") {
        //set the approved by field
        var SetUserName = new Array();
        SetUserName[0] = new Object();
        SetUserName[0].id = Xrm.Page.context.getUserId();
        SetUserName[0].entityType = 'systemuser';
        SetUserName[0].name = Xrm.Page.context.getUserName();
        Xrm.Page.getAttribute("ro_decisionbyteir4gateway2").setValue(SetUserName)
        var approvaldate = new Date();
        Xrm.Page.data.entity.attributes.get("ro_decisiondateteir4gateway2").setValue(approvaldate);
    }
}







function Gateway2ApprovaltoProcced() {

    //ro_gatewaygroupapproval
    //ro_constructionmdapproval

    var Tier2 = Xrm.Page.getAttribute("ro_tier2gateway2apporvalby").getValue()
    var Tier3 = Xrm.Page.getAttribute("ro_tier3approvalgateway2").getValue()
    var Tier4 = Xrm.Page.getAttribute("ro_tier4approvalgateway2").getValue()

    var approval = Xrm.Page.getAttribute("ro_tier1approval").getValue()
    var estimatedvalue = Xrm.Page.getAttribute("estimatedvalue").getValue()

    if (approval == 1 && Tier2 == 1 && estimatedvalue < 4999999) {
        Xrm.Page.getAttribute("ro_hiddengateway2approvedtoproceed").setValue(1);
        return;
    }

    if (approval == 1 && Tier3 == 1 && Tier2 == 1 && estimatedvalue < 7499999) {
        Xrm.Page.getAttribute("ro_hiddengateway2approvedtoproceed").setValue(1);
        return;
    }

    if (approval == 1 && Tier3 == 1 && Tier2 == 1 && estimatedvalue > 7499999 && Tier4 == 1) {
        Xrm.Page.getAttribute("ro_hiddengateway2approvedtoproceed").setValue(1);
        return;
    }
    Xrm.Page.getAttribute("ro_hiddengateway2approvedtoproceed").setValue(0);

}


function Gateway2ReadOnly() {

    var approval = Xrm.Page.getAttribute("ro_tier1approval").getValue()
    if (approval === "1" || "2") {

        Xrm.Page.ui.controls.get("ro_decisionbyteir1gateway2").setDisabled(true)
        Xrm.Page.ui.controls.get("ro_tdecisiondateteir1gateway2").setDisabled(true)
    }
    else {
        Xrm.Page.ui.controls.get("ro_decisionbyteir1gateway2").setDisabled(false)
        Xrm.Page.ui.controls.get("ro_tdecisiondateteir1gateway2").setDisabled(false)
    }


    var Tier2 = Xrm.Page.getAttribute("ro_tier2gateway2apporvalby").getValue()
    if (approval === "1" || "2") {

        Xrm.Page.ui.controls.get("ro_decisionbyteir2gateway2").setDisabled(true)
        Xrm.Page.ui.controls.get("ro_decisiondateteir2gateway2").setDisabled(true)
    }
    else {
        Xrm.Page.ui.controls.get("ro_decisionbyteir2gateway2").setDisabled(false)
        Xrm.Page.ui.controls.get("ro_decisiondateteir2gateway2").setDisabled(false)
    }


    var Tier3 = Xrm.Page.getAttribute("ro_tier3approvalgateway2").getValue()
   if (approval === "1" || "2") {

       Xrm.Page.ui.controls.get("ro_decisionbyteir3gateway2").setDisabled(true)
       Xrm.Page.ui.controls.get("ro_decisiondateteir3gateway2").setDisabled(true)
    }
    else {
       Xrm.Page.ui.controls.get("ro_decisionbyteir3gateway2").setDisabled(false)
       Xrm.Page.ui.controls.get("ro_decisiondateteir3gateway2").setDisabled(false)
    }



   var Tier4 = Xrm.Page.getAttribute("ro_tier4approvalgateway2").getValue()
    if (approval === "1" || "2") {

        Xrm.Page.ui.controls.get("ro_decisionbyteir4gateway2").setDisabled(true)
        Xrm.Page.ui.controls.get("ro_decisiondateteir4gateway2").setDisabled(true)
    }
    else {
        Xrm.Page.ui.controls.get("ro_decisionbyteir4gateway2").setDisabled(false)
        Xrm.Page.ui.controls.get("ro_decisiondateteir4gateway2").setDisabled(false)
    }




}


A remark set to modified on

$
0
0

Hello gentlemen,

I have the following problem.

In the ticket flow detail of the interactive service hub we sort on last modified. Since we use a lot of remarks/notes, it would be splendid that the system sees a remark/note as a modification.

Is there a way to set a remark/note as a modification, in order to sort the list?

Cheers,

Ruud

Exporting Marketing Lists - Format

$
0
0

Hello,

 

How do you change the file extension of Excel exports of Marketing Lists? The current format (.xls) seems to be corrupted and won’t be open on my Mac

 

Many thanks in advance,

 

Sean

What is Address URL of : Microsoft dynamic 365 for Operations

$
0
0

Hello EveryOne

 i just download MS Dynamic crm Operation application and required Address for dynamics 365 for operations and Company id also

please help me regarding this


CRM Online - SharePoint Online integration, trigger folder creation from workflow activity

$
0
0

Hi,

In the latest version of CRM Online you can configure in document management settings to automatically create a folder in SharePoint online.
This works as advertised, however, you need to navigate to the documents section of the related entity in order for the automatic folder creation to 'trigger'.

My question is if I can trigger this process sooner? I have the following scenario:

- Opportunity stage changes from Develop to propose
- custom workflow triggers => In a custom workflow activity, I need to trigger the folder creation of this opportunity, and pass the sharepoint URL to a 3rd party webservice

I found this blog post (chitrarasan.wordpress.com/.../auto-create-sharepoint-folder-in-crm-online), which demonstrates what I need. However, I need to do it from a workflow activity and not from JS, can anyone point me to a resource/solution? Thanks in advance!

OAuth problem with Dynamics CRM Online. (while retreiving authorization code)

$
0
0

Hi there!

When I use OAuth to retrieve access token for accessing CRM I have problem:

In my Azure app I provide url for redirect, on which will be send authorization code as get parameter.

This page should be located on CRM side. But authorization code recieves in format like:

REDIRECT_URI/?code=AUTHORIZATION_CODE      and I have a 500 error.


But if I want to parse this authorization code it need to be in format like:

REDIRECT_URI?Data=code%3DAUTHORIZATION_CODE

Redirect uri implies my custom web resource page in CRM. (for example xxx.crm.dynamics.com/.../somePage.html)

How to do it best way?

Is exist specific CRM page that using for retreiving authorization code? Or what?

How to get around this?

How to trigger email sending function using custom button in ms crm

$
0
0

Hi ,

I'm trying to introduce a new button in the email form which will also be working like the SEND button, this button should send the email along with some additional logic . How can i trigger the email sending feature in my custom button along with additional logic behind it, Any help on this is appreciated.

Dynamics 365 | Rollup View

Configuration Migration Error - Email Entity - Cannot specify child attributes in the columnset for Retrieve. Attribute: safedescription (Stream was too long?)

$
0
0

I am getting this one error that is currently stopping me from exporting my CRM 2016 on-premise installation to Online... Anyone have any advice on how to either fix or bypass this error? I imagine it's probably from a very long email description (body) that needs to get truncated? I don't see how to move past this error... any assistance or suggestions would be appreciated.

DataMigrationUtility.Export Error 2 3/3/2017 12:09:47 AM Message: Exception Raised when Serializing Microsoft.Xrm.Tooling.Dmt.DataMigCommon.DataModel.Data.entities
Source : System.Xml
Method : Serialize
Date : 3/3/2017
Time : 12:09:42 AM
Error : There was an error generating the XML document.
Stack Trace : at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
at System.Xml.Serialization.XmlSerializer.Serialize(Stream stream, Object o, XmlSerializerNamespaces namespaces)
at Microsoft.Xrm.Tooling.Dmt.DataMigCommon.Utility.Helper.Serialize[T](Object objToSerialize)
======================================================================================================================
Inner Exception Level 1 :
Source : mscorlib
Method : Write
Date : 3/3/2017
Time : 12:09:43 AM
Error : Stream was too long.
Stack Trace : at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.Write(String value)
at System.Xml.XmlTextEncoder.Write(String text)
at System.Xml.XmlTextWriter.WriteString(String text)
at System.Xml.Serialization.XmlSerializationWriter.WriteAttribute(String localName, String ns, String value)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterentities.Write4_entitiesEntityRecordField(String n, String ns, entitiesEntityRecordField o, Boolean isNullable, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterentities.Write5_entitiesEntityRecord(String n, String ns, entitiesEntityRecord o, Boolean isNullable, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterentities.Write10_entitiesEntity(String n, String ns, entitiesEntity o, Boolean isNullable, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterentities.Write11_entities(String n, String ns, entities o, Boolean isNullable, Boolean needType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterentities.Write12_entities(Object o)
======================================================================================================================

DataMigrationUtility.Export Error 2 3/3/2017 12:09:49 AM Failed to create output file

how can I make field fetch from another field using JavaScript?

$
0
0

Hey, can anyone help me find the error ?

I want the "country code" entity to be fetched from "country" field automatically  

entity name " citizen"

and there is another entity "country"  that is a lookup field in "citizen"  includes 2 fields: name and country code.

here is my code :

// ----- Start OF Script : Fetch country code on change of country------ //

function Fetchcountrycode()
{
var country = Xrm.Page.getAttribute("Country").getValue();

if (country!= null && country != "")
{
var countrycode;

var serverUrl = Xrm.Page.context.getClientUrl();

if (serverUrl.match(/\/$/))
{
serverUrl = serverUrl.substring(0, serverUrl.length - 1);
}

// To be updated as required
var fetchXml = "<fetch mapping='logical' version='1.0'>"
+ "<entity name='Citizen'>"
+ "<attribute name='Country'/>"
+ "<attribute name='new_countrycode'/>"
+ "<filter type='and'>"
+ "<condition attribute='Country' operator='eq' value='" + country[0].id + "'/>"
+ "</filter>"
+ "</entity>"
+ "</fetch>";


var xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<soapenv:Envelope xmlns:soapenv=\"schemas.xmlsoap.org/.../envelope\">" +
"<soapenv:Body>" +
"<RetrieveMultiple xmlns=\"schemas.microsoft.com/.../Services\" xmlns:i=\"www.w3.org/.../XMLSchema-instance\">" +
"<query i:type=\"a:FetchExpression\" xmlns:a=\"schemas.microsoft.com/.../Contracts\">" +
"<a:Query>" + fetchXml.replace(/\&/g, '&' + 'amp;').replace(/</g, '&' + 'lt;').replace(/>/g, '&' + 'gt;').replace(/\'/g, '&' + 'apos;').replace(/\"/g, '&' + 'quot;') + "</a:Query>" +
"</query>" +
"</RetrieveMultiple>" +
"</soapenv:Body>" +
"</soapenv:Envelope>";

var xmlHttpRequest;
var doc;
var result;

if (window.XMLHttpRequest)
{
// code for IE7, IE8, IE9 , IE10 , Firefox, Chrome, Opera, Safari
xmlHttpRequest = new XMLHttpRequest();
xmlHttpRequest.open("POST", serverUrl + "/XRMServices/2011/Organization.svc/web", false);
xmlHttpRequest.setRequestHeader("SOAPAction", "schemas.microsoft.com/.../RetrieveMultiple");
xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xmlHttpRequest.setRequestHeader("Content-Length", xml.length);
xmlHttpRequest.send(xml);
result = xmlHttpRequest.responseXML.xml;
}
else
{
// code for IE6, IE5
xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
xmlHttpRequest.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);

xmlHttpRequest.setRequestHeader("Content-Length", xml.length);
xmlHttpRequest.send(xml);
result = xmlHttpRequest.responseXML.xml;
}

if (window.DOMParser)
{
parser = new DOMParser();
doc = parser.parseFromString(xmlHttpRequest.responseText, "text/xml");
}
// Internet Explorer
else
{
doc = new ActiveXObject("MSXML2.DOMDocument");
doc.async = false;
doc.loadXML(result);
}

if (navigator.userAgent.toLowerCase().indexOf("chrome") > - 1)
{

var vals = doc.getElementsByTagName("KeyValuePairOfstringanyType");

for (var j = 0; j < vals.length; j ++ )
{

if(vals[j].getElementsByTagName("key")[0].firstChild.nodeValue == "new_countrycode")
{
countrycode = vals[j].getElementsByTagName("value")[0].textContent;
}

if( ! CheckFetchedValueExistance('new_countrycode', vals, 'key'))
{
alert("country mode Not Found.");
}
}
}
else
{
var vals = doc.getElementsByTagName("a:KeyValuePairOfstringanyType");

for (var j = 0; j < vals.length; j ++ )
{
if(vals[j].getElementsByTagName("b:key")[0].firstChild.nodeValue == "new_countrycode")
{
countrycode = vals[j].getElementsByTagName("b:value")[0].textContent;
}

if( ! CheckFetchedValueExistance('new_countrycode', vals, 'b:key'))
{
alert("country mode Not Found.");
}
}
}

if (countrycode == "true")
{
Xrm.Page.getAttribute("new_countrycode").setValue(1);
}
else if (countrycode == "false")
{
Xrm.Page.getAttribute("new_countrycode").setValue(0);
}
else
{
Xrm.Page.getAttribute("new_countrycode").setValue(null);
}
}
else
{
Xrm.Page.getAttribute("new_countrycode").setValue(null);
}
}

// ----- End OF Script : Fetch country code on change of country ------ //

// ---------------------------------------------------------------------------------------------------------------------------- //

Thanks 

Campaign Responses

$
0
0

I am using CRM2016 and sending campaign emails using Marketing list. How can i get campaign responses created automatically against each sent campaign emails?


JQuery to Fetch the Logged in User Web Role - Naos Portal

$
0
0

Hi All,

I need to get the web role of logged in user and based on that i have to show/hide certain web link navigation menus in the Naos portal.

Example:

if user has two roles. role 1 and role 2. i should validate like if he has role 2 he should not be allowed to see the web page that is given access to the Role 1 already.

in a simpler way regardless of whatever web role he has, he should be allowed to access one web page in the navigation.

Access control rules were not meeting the expected requirement.

How can i achieve this in the Naos portal? 

Dialogue and FLS

$
0
0

Hi CRM Community,

 I am experiencing a strange issue with dialogs. So I created a very simple dialog where it updates one field on the contact record.

The issue is, my form has Field Level Security and most users can read the fields but cannot update.

When I run the dialog I get an error indicating that I don’t have access to update the field. However, the dialog is not trying to update any of the fields that has field level security.

Troubleshooting this issue, when I run the dialog as System Admin, the dialog works and the audit history shows that every single field on my contact form is being updated which makes sense why I am getting the error message but do not know why a dialog will try to edit all fields when a dialog is ran.

If I edit my FLS profile and deny my test user access to read on FLS the dialog runs. It only fails when you have read but not edit.

Environment is CRM Dynamics 2016 (8.1.0.359)

 

Many thanks in advance,

Nro

 

Error Message: Assignee has insufficient privileges

$
0
0

I get this error message when I try to merge two Contact records: "Assignee has insufficient privileges. The selected {0} does not have sufficient privileges to be assigned records of this type. For more information, contact your system administrator."

No Log File.

The contacts both have the same Owner, which is a user on which all other merges are working just fine.

Navision timestamp column

$
0
0

Is it possible to remove default timestamp column from Navision 2016. We want to move data into azure usign stretch database functionality but due to timestamp column limitation we are not able to do so. Is there any workaround for this timestamp column?

Command Bar Menu - Appointment Activity -Disappearing CRM

$
0
0

I am facing an issue in CRM, the bug is when I create an appointment and try to save it, the commandBar go invisible after the load of the created record of the appointment. I try to inspect the javascript associated code but there is no hint about the source of the problem, I should say that after refreshing the page of the created page the command bar become visible.

OnSave: function (e) {

    EOZ.Appointment.SetPivotalId();

    var eventArgs = e.getEventArgs();

    if (Xrm.Page.ui.getFormType() == 1 && eventArgs.getSaveMode() == 1 && !saveAndClose) {
        Xrm.Page.getAttribute("createdon").addOnChange(EOZ.Appointment.CreatedOnChanged);
    }

    else {
        saveAndClose = true;
        Xrm.Page.getAttribute("createdon").removeOnChange(EOZ.Appointment.CreatedOnChanged);
    }
},

CreatedOnChanged : function () {
    var id = Xrm.Page.data.entity.getId();
    setTimeout(function () {
        Xrm.Utility.openEntityForm("appointment", id);
    }, 500);

}

NB : After a lot of javascript debugging, i noticed that the problem is only happened when the method "CreatedOnChanged" is called more than once, in the other hand if it's called just once the command bar is visible. I don't know if it's the source of the bug, but it is the only difference in the code's behaviour.

Viewing all 46379 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>