Quantcast
Channel: CRM Development forum
Viewing all 9244 articles
Browse latest View live

CRM 2011 - Custom App and Organization service reference authentication

$
0
0

In my custom application I have following code

Credentials _Credentials= New ClientCredentials();
_Credentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;

serviceProxy =newOrganizationServiceProxy(OrganizationUri,null,_Credentials,null)

When I run application in visual studio it works great. But when I deployed this on IIS I got following error:

The request for security token could not be satisfied because authentication failed

I can authenticate if I pass log on details, but I need my application to use the credentials of the user. Any ideas what could be wrong? If we want to run the custom app for the current user how can we get the service reference accordingly?


Thanks, Jaydeep


Code is returning error Object is null or undefined when the value exists

$
0
0

When I attempt to run my code I get an error that the value is null or undefined. However, the alert line returns the correct value of the field I'm looking up. I have debugged the code and the var ratePercentage remained undefined, but the line before that correctly pops up a message box with the value of the field. What am I doing wrong? I've tried several different variations of code to get the value there but all return null or undefined?

Thanks for any help.

<Message>Unable to get value of the property 'new_CommissionRate': object is null or undefined</Message>
   <Line>25</Line>

var _rate = this.parent.JSON.parse(_retrieve.responseText).d;
            alert(_rate.new_CommissionRate); var ratePercentage = _rate.result.new_CommissionRate.getValue();
            Xrm.Page.getAttribute("new_commissionpercentage").setValue(ratePercentage);
            Xrm.Page.getAttribute("new_commissionpercentage").setSubmitMode("always");   

MS CRM 2011- Rollup 13- If we delete attribute without removing from user views, it allow us to delete it. Does this limitation exist from previous rollup\version?

$
0
0

Hi All,

I have user view for advance find and I deleted few of fields from entity.

If I try to reopen the user view then it shows me error like "Some of fields got deleted". So update the view.

Can we stop this happening

we are using crm 2011 and rollup 13.

Web Part Error

$
0
0
The site collection containing this sandboxed solution has exceeded its daily resource usage quota. Correlation ID: 84af3d9c-365c-8075-82f0-45d6ae0171d0. 

SSRS CRM Report: Pass more than one row (GUID) thru a tablix click action

$
0
0

Hi All

So let me try to describe the Problem:

I have made a report which shows data in a table.
Now Within this table I group on date (month) and some other unnecessary criteria.
Therefore the data which will be shown is summarized. Please see pic below.

But exactly there’s my problem. In the subreport I always get the first id. But that’s not quite what I was expecting.

I would expect the following behaviour:

Sum
'--> sumarized amount of several rows (eg. id of row one, id of row two, if of row n)     
     '--> pass n id's
          '--> parameter PreFiltering of the Subreport contains an array of the passed id's

Final question: Is it even possible to pass more than one id within a parameter with this approach?

Things I’ve already tried without success:

  • JOIN functionality
  • SPLIT functionality






CRM2011: Performance issue with plug-in on SetState

$
0
0

Hi,

I have plug-in, that triggers on SetState of a custom entity. Basically it creates a successor and a bunch of related records (modifications of the original ones). The original record is not manipulated in the plugin.

The plugin is registered synchronous, post stage. There are no further Plug-Ins handling that entity or any of the related entity that are created during that process.

When I test the plug-in isolated (that is mocking the context using Rhino.Mock but passing a real OrganizationServiceProxy) it takes about 5.5 seconds. Not very fast, but OK regarding the heavy work done.

Setting the state of the custom entity in code with the plug-in deactivated takes about 0.8 seconds.

Now setting the state with the plug-in activated takes more than 90 seconds!

Anybody has an idea, what makes it so extremely slow (about 14 times slower than SetState + plug-in isolated)? I'm desperately looking for any ideas here.

In Addition, it get's that slow, when more than about 90-100 of those custom entities are related to a contact, when I change the state for one of those contact's entities.

Workflow halts on waiting and shows validation errors on parameters

$
0
0

Hi,

I've created 2 workflows but they won't pass the validation of crm and halts on waiting.

Using CRM 2011 RU14 On Premise.

The error message is :

Unhandled Exception: System.Activities.InvalidWorkflowException: The following errors were encountered while processing the workflow tree:
'DynamicActivity': The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "DirectCast(CustomActivityStep1_5_converted, Microsoft.Xrm.Sdk.OptionSetValue)".Invalid L-value expression.:Reference expressions cannot end with Conversion. The provided expression's type must exactly match the type T of VisualBasicReference<T> or LambdaReference<T>.
'DynamicActivity': The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "DirectCast(CustomActivityStep1_6_converted, System.Boolean)".Invalid L-value expression.:Reference expressions cannot end with Conversion. The provided expression's type must exactly match the type T of VisualBasicReference<T> or LambdaReference<T>.
   at System.Activities.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstanceExtensionManager extensionManager)
   at System.Activities.WorkflowApplication.EnsureInitialized()
   at System.Activities.WorkflowApplication.Enqueue(InstanceOperation operation, Boolean push)
   at System.Activities.WorkflowApplication.WaitForTurn(InstanceOperation operation, TimeSpan timeout)
   at System.Activities.WorkflowApplication.InternalRun(TimeSpan timeout, Boolean isUserRun)
   at Microsoft.Crm.Workflow.ActivityHost.StartWorkflowExecution(Activity workflow, ICommonWorkflowContext context)
   at Microsoft.Crm.Workflow.ActivityHostBase.StartWorkflow(ICommonWorkflowContext context, Activity preLoadedActivity)

My parameters are coded as followed. I can select the optionset value in crm for this workflow and the boolean is translated to a checkbox.

Optionsetvalues are 1,2 and 3 so that shouldn't be a problem either.

[Input("Output Format")]
        [AttributeTarget("pwb_documentgenerator", "pwb_outputformat")]
        [Default("1")]
        public InOutArgument<OptionSetValue> DocumentOutFormat { get; set; }

        [Input("Send Email")]
        [Default("False")]
        public InOutArgument<bool> SendEmail { get; set; }

Been trying several things but can't get it to work.

Any suggestions?

Regards,

Sven Peeters

Is It possible to trigger a work flow on the selection of lookup?

$
0
0

Hi,

Is it poosible to trigger a work flow once i select a value in lookup field?


Subgrid record on click event in crm 2011

$
0
0

Hi Guys,

As per my requirement, when i click the record to open inside a subgrid, a custom web page should open and inside that the actual record will open in an IFrame. For that is there any event or jscript to open the web page by clicking the record in crm 2011. Please help on this, any help would be grateful. And let me know if i m not clear too.


Arun Kumar G

Versioning in Dynamics CRM 2011?

$
0
0

Hi All,

Lets say, for each phase of opportunity I want to create questions and responses. Suppose for a planning phase I have a 10 questions and responses for the same. Here I want to maintain the version of this(v1.0). Suppose for the same phase I am adding new 5 questions. So next version will become for 15 questions.

Any help?


If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Thanks and Regards, Yogesh Vijay Mulay

Creating a pictorial chart on MS CRM 2011 form?

$
0
0

Hi,

I have to create a pictorial chart as given below based on the Date fields on the form.It should be dynamically created which one will be the best approach.Please suggest me.

Thanks,


If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Thanks and Regards, Mohammad Yusuf Ansarihttp://microxrm.blogspot.in

CRM 2011 Error Message “An error occurred when verifying security for the message.”

$
0
0
I am trying to connect to CRM 2011 Online and On-premise from ASP.Net External Portal,But when I call IOgranizationService.Execute(_Request),I am getting the error “An error occurred when verifying security for the message.”

I searched the bolgs and found that this is due to the time zone and time difference between CRM server and my application server(where asp.net website is hosted).

By changing the time zone and time of my application server to sync with CRM Server I am able to query the CRM without any error.

But I dont want to go with this way.

Is there any thing else that can be done to resolve this issue without changing the time zone.

Any help would be appreciated

MS CRM 2011 ONLINE - Dialog won't start

$
0
0
I want to start a dialog by JavaScript with this script.
window.open("/" + Xrm.Page.context.getOrgUniqueName() + "/cs/dialog/rundialog.aspx?DialogId=%7b29D672A3-DAF7-4E7B-B771-F9472005FE1F%7d&EntityName=salesorder&ObjectId=" + Xrm.Page.data.entity.getId());

All I get is just new window with text page not found. The url is this:
https://x.x.x.com/x/cs/dialog/rundialog.aspx?DialogId=%7b29D672A3-DAF7-4E7B-B771-F9472005FE1F%7d&EntityName=salesorder&ObjectId={55B3279C-FE07-E311-8561-3C4A92DBDC37}

The dialog is tested and working.

Views

$
0
0

is it possible to increase the height of the header in an entity view.

ie double the height of the header and centre and word wrap the field header

 


Dont ask me .. i dont know

Problem in authentication with : https://login.microsoftonline.com/extSTS.srf

$
0
0

Existing systems are based on Live Id authentication and working fine. Recently new Office 365 is introduced. The issue is related to authentication with Office 365.

We take binary token from authorization response and use this token for communication with CRM using SOAP.

Following is the content of login request to MS online login servers,

===============================================================================================

POST request tohttps://login.microsoftonline.com/extSTS.srf

===============================================================================================

<s:Envelope xmlns:s='http://www.w3.org/2003/05/soap-envelope'

               xmlns:a='http://www.w3.org/2005/08/addressing'

               xmlns:u='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd'>

               <s:Header>

                               <a:Action s:mustUnderstand='1'>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</a:Action>

                               <a:ReplyTo>

                                               <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>

                               </a:ReplyTo>

                               <a:To s:mustUnderstand='1'>https://login.microsoftonline.com/extSTS.srf</a:To>

                               <o:Security s:mustUnderstand='1'

                                               xmlns:o='http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'>

                                               <o:UsernameToken>

                                                               <o:Username><![CDATA[HIDDEN@HIDDEN.onmicrosoft.com]]></o:Username>

                                                               <o:Password><![CDATA[1qaz@WSX]]></o:Password>

                                               </o:UsernameToken>

                               </o:Security>

               </s:Header>

               <s:Body>

                               <t:RequestSecurityToken xmlns:t='http://schemas.xmlsoap.org/ws/2005/02/trust'>

                                               <wsp:AppliesTo xmlns:wsp='http://schemas.xmlsoap.org/ws/2004/09/policy'>

                                                               <a:EndpointReference>

                                                                               <a:Address><![CDATA[HIDDEN.onmicrosoft.com]]></a:Address>

                                                               </a:EndpointReference>

                                               </wsp:AppliesTo>

                                               <t:KeyType>http://schemas.xmlsoap.org/ws/2005/05/identity/NoProofKey</t:KeyType>

                                               <t:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</t:RequestType>

                                               <t:TokenType>urn:oasis:names:tc:SAML:1.0:assertion</t:TokenType>

                               </t:RequestSecurityToken>

               </s:Body>

</s:Envelope>

===============================================================================================

Response fromhttps://login.microsoftonline.com/extSTS.srf

===============================================================================================

<?xml version="1.0" encoding="utf-8" ?>

<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"

               xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"

               xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"

               xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust"

               xmlns:psf="http://schemas.microsoft.com/Passport/SoapServices/SOAPFault">

               <S:Body>

                               <S:Fault>

                                               <S:Code>

                                                               <S:Value>S:Sender</S:Value>

                                                               <S:Subcode>

                                                                               <S:Value>wst:InvalidRequest</S:Value>

                                                               </S:Subcode>

                                               </S:Code>

                                               <S:Reason>

                                                               <S:Text xml:lang="en-US">Invalid Request</S:Text>

                                               </S:Reason>

                                               <S:Detail>

                                                               <psf:error>

                                                                               <psf:value>0x8004882a</psf:value>

                                                                              <psf:internalerror>

                                                                                               <psf:code>0x80045b02</psf:code>

                                                                                               <psf:text>The partner DNS used in the login request cannot be

                                                                                                               found.&#x000D;&#x000A;</psf:text>

                                                                               </psf:internalerror>

                                                               </psf:error>

                                               </S:Detail>

                               </S:Fault>

               </S:Body>

</S:Envelope>

The problem is complain about partner DNS not found. Tried with several trial dynamic CRM accounts but none worked. Can you guys help me in identifying the reason of this error and possible action.


Which Version of Visual Stuiod Expres works with SDK?

$
0
0

I've downloaded versions of Visual Studio Express 2010 and 2012 neither one is working when I try to connect with the CRM 2011 SDK? When I attempt to run the toolkit install I get an error message that Visual Studio must be installed first. I downloaded the Visual Studio for desktop but doesn't seem to work.

There are several different versions, Windows 8, Desktop, C++, Web. Is there one in particular that only works with CRM SDK? Or am I doing something else wrong?

Thanks for any help.
-Trevor

customeraddress privileges

$
0
0

We have a requirement to prevent all non-system admins from deleting any record, except customeraddress.

so we removed the delete privilege from all entities. However, there is no option for customeraddress

How can we control the privileges of customer address?

Retrieve field value from a related entity on load

$
0
0

I know there are dozens of other threads out there that ask similar questions and I've tried multiple solutions from those threads but I can't seem to get it to work. I have a decimal value field on the user record for a base commission rate. On a custom entity for commission line item there is a commission rate decimal value field. When I create a new commission rate line item record I want to retrieve the commission base rate value from the owner and have it populate on the new entity record. Below is my code, it seems to run through but I always get the Error Message pop up instead of the field value populated. I'm wondering if the retrieve.responseText could be an issue since it's a decimal not text? But I'm just not sure. Can anyone see whats wrong in the code?

Thanks,
Trevor

if(Xrm.Page.getAttribute("ownerid").getValue() != null)
{
      var id = Xrm.Page.getAttribute("ownerid").getValue()[0].id;

    var _oPath = Xrm.Page.context.getServerUrl() + "/XRMServices/2011/OrganizationData.svc";
    var _retrieve = new XMLHttpRequest();
    _retrieve.open("GET", _oPath + "/User Set(guid'" + id + "')", true);
    _retrieve.setRequestHeader("Accept", "application/json");
    _retrieve.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    _retrieve.onreadystatechange = function () { RetrieveCommissionCallBack(this); };

    _retrieve.send();
}
}

function RetrieveCommissionCallBack(_retrieve)
{
    if(_retrieve.readyState == 4)
    {
        if(_retrieve.status == 200)
        {
            var _rate = JSON.parse(_retrieve.responseText).d;
            if(_rate.new_commissionrate.Value != null)
             {
                     Xrm.Page.getAttribute("new_commissionpercentage").setValue(_rate.new_commissionrate.Value);

             }
 
        }
        else
        {
            window.alert("There was an error retrieving Commission Base Rate Information");
        }
    }
}

CRM 2011 RC - Passing Parameter to Left Navigation Link in Details form (not in sitemap)

$
0
0

Hi,

I have a external application link to which I wanted to pass values from entity form controls.

I tried attaching onclick event inside form load but its not working.

Is there any other way to pass parameter to link url?

Appreciate your response.

Following is code which I tried

function FillTPIdInCustomNavLink(linkId) {debugger;var navLeftItem = document.getElementById(linkId);if (navLeftItem != null&& navLeftItem != undefined) 
  {if (Xrm.Page.data.entity.attributes.get('mbs_mssalestpid') != null) 
    {var tpid = Xrm.Page.data.entity.attributes.get('mbs_mssalestpid').getValue()if (tpid != '') 
      {var strOnclickValue = navLeftItem.attributes.onclick.value;if (strOnclickValue != null&& strOnclickValue != '') 
        {
          navLeftItem.onclick = function () { strOnclickValue.replace("-1", tpid); };
          alert(navLeftItem.attributes.onclick.value);
        }
      }
    }
  }
}

makeer

email settings: tracking/matching questions?

$
0
0

Hello - I'm trying to get a better understanding of email tracking/matching functionality in CRM:

tracking:
----------
* Prefix: Is this field required? Or generally recommended? Do you generally use a simple word/acronym for the prefix to reflect the crm org?
* Deployment base tracking number: Not sure what this is?
* Number of digits for user numbers: Does CRM generate a "user number" for a user the first time he sends *or* receives an email in CRM? What happens if the value for this setting is set to 2 but then the system grows to 100 users who are sending/receiving email?
* Number of digits for incremental message counter: Is this number incremented for a particular email thread? Or is this number cumulatively incremented for all emails that a user sends/receives?  If the total number grows beyond the configured setting then what happens?  Does it grow as needed?  Or does the email fail at that point?

matching:
----------
* Filter subject keywords: has a default value of "^[\s]*([\w]+\s?:[\s]*)+"  What is the purpose of this regex?  What does it do?
* Max # of subject keywords or recipients: The default of 20 seems reasonable but what would be the downside of setting it to 40?
* Max diff allowed between subject keywords: The default is 0. I've seen e-mails with an extra keyword in the subject line simply not get delivered.  Do you allow any leniance with this process by bumping up this number?  Otherwise, what is your process for handling emails that don't get imported into CRM simply because there's an extra word in the subject line?
* Minimum # of recipients required to match: Why is this set to 2? Seems like most e-mails will only have 1 recipient?  Maybe I'm not clear on what this setting means?

Viewing all 9244 articles
Browse latest View live


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