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

Reassign Ownership (ownerId) of Entity using sevicecontext - CRM 2011

$
0
0

how do i reassign ownership of an entity using servicecontext? this is what i'm trying to do:

I'm using ServiceContext with early bound.

1. newing up a new entity, set Id and another text field.
2. Setting the OwnerId to another systemuser
3. calling context.Attach(), context.UpdateObject() and context.SaveChanges()

result:

I see that the text was changed, but the ownership remained the same.

Any ideas?


Data is not saving if the field has on change event ?!!

$
0
0

Hello guys ,

     We are using MS CRM 2011 online, In opportunity , one change "projected order value" field a java script will be triggered to convert the currency into dollars . it works fine if the user tabs out after entering  the value. on  saving, data will be saved properly.  Problem occurs if the user don't' tab out and directly save the record. !!  it wont' save the value in dollar field.. 

After  multiple checking it seems that, it is happening in multiple fields which has on-change event.. data is not saving if they  user directly opens the record and enter the data only in that filed which has on change event and saves without tabbing out.. 

I put debugger on-change event.. surprisingly on-change event scripts triggers when you directly click on save button without tabbing out from the field.  

May be i'm missing out something very basic.. can you guys please guide me ??

WorkFlow for appointment, why the target entity in Inputparameter always contains the attributes "optionalattendees","organizer" and "requiredattendees" ?

$
0
0

Hello,

I have a problem of my customered workflow for appointment, I have set this workflow triggered when the attribute "organizer" has been modified. But when i updated the field "category" of the appointment, this action triggered this workflow. So I list all the attributes in the target entity of InputParameters. I found that the target entity always contains these 3 attributes  "optionalattendees","organizer" and "requiredattendees", does someone know why?
In these case, when I change the owner of the appointment, the workflow starts twice.
IF I dont set the triggered attribute "organizer" for this workflow, il will work find, but i need the worklflows starts when the "organizer" has been changed(the workflow will send an email), how can i do it?
Thanks

MS CRM 2011 ONLINE - Setting default product to order product

$
0
0

I am trying to set the default product for the order product. I use script below on the form's onLoad event.

function SetDef(){
lookup = Xrm.Page.getAttribute('productid').getValue();
if (lookup == null) {
Xrm.Page.getAttribute('productid').setValue([{id: '31F65B93-30ED-E211-9B99-EE3A97CBB23B', name: 'Service', entityType: 'typeproduct'}]);
}
}

I only get this:

I have no idea what is wrong. The same script worked for default customer for order form.

Advice needed if this is possible and if so how

$
0
0

We have a custom entity that holds records of debits and credits for customers. Each record has a cleared funds date field, a value column and a lookup on the account entity

Typically for one customer there may be records entered as

Licence  Description      Value    Date

111111      OPEN/BAL     3.00    01/01/2013

111111         CREDIT      1.00    01/01/2013

111111        CREDIT      95.37   02/03/2013

111111         DEBIT        -0.57  03/03/2013

111111        CREDIT     123.38  05/03/2013

What i would like to do is have a button on the custom entity view, enter a licence and date, to run a report and mark the included items ( ie items that are 'active' and before the specified date) as deactivated and also put a new entry in for OPEN/BAL based on a calculation

in the case above, if i entered 111111 and put the date of 04/03/2013 i would be left with

111111      OPEN/BAL      9.88 ( based on a calculation )  10/05/2013 ( Date action taken )

111111        CREDIT     123.38  05/03/2013

Im presuming that I will need to add a button on the 'ribbon' and then run a process . does any one know of any examples that may help ?     


Dont ask me .. i dont know

crm 2011 on-premise: problem setting up lookup field in C# plugin

$
0
0

I have a pre-create plugin on a phone call record and I am initializing its 'regardingobjectid' lookup field with a newly created case record as shown below. The problem is that the 'Regarding' field on the phonecall form shows no Text but just the icon for the Case record though the Title of the Case record is populated. The Case icon is clickable and leads to the Case record but I am not sure why there is no Text in the Lookup field.

'entity' is the phonecall record within the pre-create plugin:

entity.Attributes["regardingobjectid"] = newEntityReference("incident",newGuid(new_caseid.ToString()));

Can somebody help me figure out the best way to get the Case Title show up on the Lookup field? thanks!


Custom Ribbon button in CRM new release Orion?

$
0
0
Does any body have idea about whether Custom Ribbon button is supported or not in CRM new release Orion.

Quick Search Problem in View.

$
0
0

I have view on Account Entity.

But some field are coming from other Entity.

Ex.  1. Acoount Id(Account)

         2. Account Name(Account)

3.primary Contact(contact)

So how to make primary contact as searchable through QuickSearch.

thanks

Regard

Sangram


microsoft blog


Trigger a plugin on selection of a Lookup value.

$
0
0

Hi

1.    I have form i.e "Account". That contain a lookup "contact" and a textfield.

2.    when user will select a record from contact lookup,  a field form selected contact  should update the textfield.(in Main            form).

3.    is it possible through plugin.(I can not use java script due to some security reason).

Thanks

Regard

Sangram 


microsoft blog

CRM 2011 Qualify Lead buttons not working after RU12 on-premise

$
0
0

After updating to RU12 on-premise we're now running into an issue submitting the qualify for a Lead. Once we click on Ok after making our selections it does nothing and the error below is what it records. This funtionality does the the same thig if we hit cancel as well. After looking at the Conv_Lead.aspx code it clearly looks like the function is setup (correctly?) so I'm a bit at a loss of what needs to be done to fix this?

Any help or ideas is appreciated.

Nothing happens when OK or Cancel is clicked. ONly exiting the screen is a possibility and it gives me the errors below.

***we get the same error for when cancel button is pressed***

Microsoft Dynamics CRM Error Report Contents

<CrmScriptErrorReport>
  <ReportVersion>1.0</ReportVersion>
  <ScriptErrorDetails>
   <Message>Syntax error</Message>
   <Line>126</Line>
   <URL>/crm/SFA/Leads/Dialogs/conv_lead.aspx</URL>
   <PageURL>/crm/SFA/Leads/Dialogs/conv_lead.aspx</PageURL>
   <Function>safeWindowShowModalDialog(url,winArguments,features,useModalDialog)</Function>
   <CallStack>
    <Function>safeWindowShowModalDialog(url,winArguments,features,useModalDialog)</Function>
    <Function>openStdDlg(url,winArguments,width,height,resizable,modeless,customWinParams,functionReference)</Function>
    <Function>openStdDlgWithCallback(url,winArguments,width,height,functionReference,resizable,modeless,customWinParams)</Function>
    <Function>anonymous(gridControl,records,entityTypeCode){var$v_0=Mscrm.CrmUri.create("/SFA/Leads/Dialogs/conv_lead.aspx");if(records&&records.length>1)$v_0.get_query()["showNew"]=0;var$v_1=[gridControl,records,entityTypeCode],$v_2=Mscrm.Utilities.createCallbackFunctionObject("performActionAfterConvertLead",Mscrm.List,$v_1),$v_3=openStdDlgWithCallback($v_0,null,410,430,$v_2);Mscrm.Utilities.isModalDialogSupported()&&Mscrm.List.performActionAfterConvertLead($v_3,gridControl,records,entityTypeCode)}</Function>
    <Function>anonymous($p0,$p1,$p2,$p3){Mscrm.CrmHeader.setScriptFile(Mscrm.CrmUri.create($p1),true);for(var$v_0=window,$v_1=$p0.split("."),$v_2=0;$v_2<$v_1.length;$v_2++)if($v_0)$v_0=$v_0[$v_1[$v_2]];if(!IsNull($v_0)&&typeof$v_0===Mscrm.TypeNames.functionType){var$v_3=this.$CN_1($p2,$p3);return$v_0.apply(null,$v_3)}returnnull}</Function>
    <Function>anonymous($p0,$p1,$p2,$p3){var$v_0=this.getCommandDefinition($p0,$p1);if(IsNull($v_0)||IsNull($v_0.Actions))returnfalse;for(var$v_1=0;$v_1<$v_0.Actions.length;$v_1++){var$v_2=$v_0.Actions[$v_1];switch($v_2.ActionType){case2:this.$DF_1($v_2.Attributes);break;case3:var$v_3=$v_2.Attributes;this.$9w_1($v_3.FunctionName,$v_3.Library,$v_2.Parameters,$p2);break;case1:this.$DG_1($v_2.Attributes,$v_2.Parameters);break}}returntrue}</Function>
    <Function>anonymous($p0,$p1,$p2){var$v_0=this.parseCommandFromRibbon($p0),$v_1=this.$7s_1($v_0.command,$v_0.entityLogicalName,$p1,$p2),$v_2=$p1;if(!IsNull($v_2)&&!isNullOrEmptyString($v_2.PopulationXML)&&!$v_2.SuppressCommandIncludes){var$v_3=null;if($v_0.entityContext==="Form"){var$v_4=$find("crmFormSelector");if($v_4)$v_3=$v_4.get_currentFormId()}$v_2.PopulationXML=this.$Ep_1($v_2.PopulationXML,$v_0.entityLogicalName,$v_3)}return$v_1}</Function>
    <Function>anonymous($p0,$p1,$p2){if(this.$1w_1&&!this.$1w_1.$3k_1)returnthis.$1w_1.handleCommand($p0,$p1,$p2);returnfalse}</Function>
    <Function>anonymous(handler,commandId,properties,sequenceNumber){returnhandler.handleCommand(commandId,properties,sequenceNumber)}</Function>
    <Function>anonymous($p0,$p1,$p2){var$v_0=this.$2R_0[$p0];if(CUI.ScriptUtility.isNullOrUndefined($v_0))returnfalse;elseif(Array.isInstanceOfType($v_0)){for(var$v_1=$v_0,$v_2=false,$v_3=0;$v_3<$v_1.length;$v_3++){var$v_4=$v_1[$v_3];if(this.callCommandHandler($v_4,$p0,$p1,$p2))$v_2=true}return$v_2}elsereturnthis.callCommandHandler($v_0,$p0,$p1,$p2)}</Function>
    <Function>anonymous(commandId,properties){returnthis.$DE_0(commandId,properties,this.getNextSequenceNumber())}</Function>
    <Function>anonymous(commandId,properties,commandInfo,root){returnthis.$10_1.executeCommand(commandId,properties)}</Function>
    <Function>anonymous($p0){if(CUI.ScriptUtility.isNullOrUndefined($p0.$4_1))return;$p0.$7Q_1=this.$DU_1();var$v_0=$p0.get_commandInfo();$v_0.CommandId=$p0.$4_1;$v_0.RootId=this.$4_0;$v_0.RootType=this.get_rootType();!CUI.ScriptUtility.isNullOrUndefined(this.$26_1)&&this.$26_1.executeRootCommand($p0.$4_1,$p0.$32_1,$v_0,this)}</Function>
    <Function>anonymous($p0){this.$7s_1($p0);returntrue}</Function>
    <Function>anonymous($p0){if($p0.$I_1!==11){$p0.get_commandInfo().RootLocation=$p0.$I_1===2?"UpperRibbon":"LowerRibbon";if($p0.$I_1===2){var$v_0=$p0.$32_1;$p0.get_commandInfo().TabId=$v_0.NewContextId}}returnCUI.Root.prototype.$2n_0.call(this,$p0)}</Function>
    <Function>anonymous($p0){this.$2n_0($p0)&&!CUI.ScriptUtility.isNullOrUndefined(this.$M_0)&&this.$M_0.$Ay_0($p0);this.$Am_0($p0)}</Function>
    <Function>anonymous($p0){this.$2n_0($p0)&&!CUI.ScriptUtility.isNullOrUndefined(this.$M_0)&&this.$M_0.$Ay_0($p0);this.$Am_0($p0)}</Function>
    <Function>anonymous($p0){this.$2n_0($p0)&&!CUI.ScriptUtility.isNullOrUndefined(this.$M_0)&&this.$M_0.$Ay_0($p0);this.$Am_0($p0)}</Function>
    <Function>anonymous($p0){this.$2n_0($p0)&&!CUI.ScriptUtility.isNullOrUndefined(this.$M_0)&&this.$M_0.$Ay_0($p0);this.$Am_0($p0)}</Function>
    <Function>anonymous($p0){this.$2n_0($p0)&&!CUI.ScriptUtility.isNullOrUndefined(this.$M_0)&&this.$M_0.$Ay_0($p0);this.$Am_0($p0)}</Function>
   </CallStack>
  </ScriptErrorDetails>
  <ClientInformation>
   <BrowserUserAgent>Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)</BrowserUserAgent>
   <BrowserLanguage>en-US</BrowserLanguage>
   <SystemLanguage>en-US</SystemLanguage>
   <UserLanguage>en-US</UserLanguage>
   <ScreenResolution>1920x1080</ScreenResolution>
   <ClientName>Web</ClientName>
   <ClientTime>2013-08-13T15:56:18</ClientTime>
  </ClientInformation>
  <ServerInformation>
    <OrgLanguage>1033</OrgLanguage>
    <OrgCulture>1033</OrgCulture>
    <UserLanguage>1033</UserLanguage>
    <UserCulture>1033</UserCulture>
    <OrgID>{18B8FA5C-8A97-442D-86DD-F165239B5EED}</OrgID>
    <UserID>{0A9FE007-38F4-E011-A9A0-005056B754DF}</UserID>
    <CRMVersion>5.0.9690.3236</CRMVersion>
  </ServerInformation>
</CrmScriptErrorReport>

<CrmScriptErrorReport>
  <ReportVersion>1.0</ReportVersion>
  <ScriptErrorDetails>
   <Message>'applychanges' is undefined</Message>
   <Line>476</Line>
   <URL>/apscrm/SFA/Leads/Dialogs/conv_lead.aspx</URL>
   <PageURL>/apscrm/SFA/Leads/Dialogs/conv_lead.aspx</PageURL>
   <Function>safeWindowShowModalDialog(url,winArguments,features,useModalDialog)</Function>
   <CallStack>
    <Function>safeWindowShowModalDialog(url,winArguments,features,useModalDialog)</Function>
    <Function>openStdDlg(url,winArguments,width,height,resizable,modeless,customWinParams,functionReference)</Function>
    <Function>openStdDlgWithCallback(url,winArguments,width,height,functionReference,resizable,modeless,customWinParams)</Function>
    <Function>anonymous(gridControl,records,entityTypeCode){var$v_0=Mscrm.CrmUri.create("/SFA/Leads/Dialogs/conv_lead.aspx");if(records&&records.length>1)$v_0.get_query()["showNew"]=0;var$v_1=[gridControl,records,entityTypeCode],$v_2=Mscrm.Utilities.createCallbackFunctionObject("performActionAfterConvertLead",Mscrm.List,$v_1),$v_3=openStdDlgWithCallback($v_0,null,410,430,$v_2);Mscrm.Utilities.isModalDialogSupported()&&Mscrm.List.performActionAfterConvertLead($v_3,gridControl,records,entityTypeCode)}</Function>
    <Function>anonymous($p0,$p1,$p2,$p3){Mscrm.CrmHeader.setScriptFile(Mscrm.CrmUri.create($p1),true);for(var$v_0=window,$v_1=$p0.split("."),$v_2=0;$v_2<$v_1.length;$v_2++)if($v_0)$v_0=$v_0[$v_1[$v_2]];if(!IsNull($v_0)&&typeof$v_0===Mscrm.TypeNames.functionType){var$v_3=this.$CN_1($p2,$p3);return$v_0.apply(null,$v_3)}returnnull}</Function>
    <Function>anonymous($p0,$p1,$p2,$p3){var$v_0=this.getCommandDefinition($p0,$p1);if(IsNull($v_0)||IsNull($v_0.Actions))returnfalse;for(var$v_1=0;$v_1<$v_0.Actions.length;$v_1++){var$v_2=$v_0.Actions[$v_1];switch($v_2.ActionType){case2:this.$DF_1($v_2.Attributes);break;case3:var$v_3=$v_2.Attributes;this.$9w_1($v_3.FunctionName,$v_3.Library,$v_2.Parameters,$p2);break;case1:this.$DG_1($v_2.Attributes,$v_2.Parameters);break}}returntrue}</Function>
    <Function>anonymous($p0,$p1,$p2){var$v_0=this.parseCommandFromRibbon($p0),$v_1=this.$7s_1($v_0.command,$v_0.entityLogicalName,$p1,$p2),$v_2=$p1;if(!IsNull($v_2)&&!isNullOrEmptyString($v_2.PopulationXML)&&!$v_2.SuppressCommandIncludes){var$v_3=null;if($v_0.entityContext==="Form"){var$v_4=$find("crmFormSelector");if($v_4)$v_3=$v_4.get_currentFormId()}$v_2.PopulationXML=this.$Ep_1($v_2.PopulationXML,$v_0.entityLogicalName,$v_3)}return$v_1}</Function>
    <Function>anonymous($p0,$p1,$p2){if(this.$1w_1&&!this.$1w_1.$3k_1)returnthis.$1w_1.handleCommand($p0,$p1,$p2);returnfalse}</Function>
    <Function>anonymous(handler,commandId,properties,sequenceNumber){returnhandler.handleCommand(commandId,properties,sequenceNumber)}</Function>
    <Function>anonymous($p0,$p1,$p2){var$v_0=this.$2R_0[$p0];if(CUI.ScriptUtility.isNullOrUndefined($v_0))returnfalse;elseif(Array.isInstanceOfType($v_0)){for(var$v_1=$v_0,$v_2=false,$v_3=0;$v_3<$v_1.length;$v_3++){var$v_4=$v_1[$v_3];if(this.callCommandHandler($v_4,$p0,$p1,$p2))$v_2=true}return$v_2}elsereturnthis.callCommandHandler($v_0,$p0,$p1,$p2)}</Function>
    <Function>anonymous(commandId,properties){returnthis.$DE_0(commandId,properties,this.getNextSequenceNumber())}</Function>
    <Function>anonymous(commandId,properties,commandInfo,root){returnthis.$10_1.executeCommand(commandId,properties)}</Function>
    <Function>anonymous($p0){if(CUI.ScriptUtility.isNullOrUndefined($p0.$4_1))return;$p0.$7Q_1=this.$DU_1();var$v_0=$p0.get_commandInfo();$v_0.CommandId=$p0.$4_1;$v_0.RootId=this.$4_0;$v_0.RootType=this.get_rootType();!CUI.ScriptUtility.isNullOrUndefined(this.$26_1)&&this.$26_1.executeRootCommand($p0.$4_1,$p0.$32_1,$v_0,this)}</Function>
    <Function>anonymous($p0){this.$7s_1($p0);returntrue}</Function>
    <Function>anonymous($p0){if($p0.$I_1!==11){$p0.get_commandInfo().RootLocation=$p0.$I_1===2?"UpperRibbon":"LowerRibbon";if($p0.$I_1===2){var$v_0=$p0.$32_1;$p0.get_commandInfo().TabId=$v_0.NewContextId}}returnCUI.Root.prototype.$2n_0.call(this,$p0)}</Function>
    <Function>anonymous($p0){this.$2n_0($p0)&&!CUI.ScriptUtility.isNullOrUndefined(this.$M_0)&&this.$M_0.$Ay_0($p0);this.$Am_0($p0)}</Function>
    <Function>anonymous($p0){this.$2n_0($p0)&&!CUI.ScriptUtility.isNullOrUndefined(this.$M_0)&&this.$M_0.$Ay_0($p0);this.$Am_0($p0)}</Function>
    <Function>anonymous($p0){this.$2n_0($p0)&&!CUI.ScriptUtility.isNullOrUndefined(this.$M_0)&&this.$M_0.$Ay_0($p0);this.$Am_0($p0)}</Function>
    <Function>anonymous($p0){this.$2n_0($p0)&&!CUI.ScriptUtility.isNullOrUndefined(this.$M_0)&&this.$M_0.$Ay_0($p0);this.$Am_0($p0)}</Function>
    <Function>anonymous($p0){this.$2n_0($p0)&&!CUI.ScriptUtility.isNullOrUndefined(this.$M_0)&&this.$M_0.$Ay_0($p0);this.$Am_0($p0)}</Function>
   </CallStack>
  </ScriptErrorDetails>
  <ClientInformation>
   <BrowserUserAgent>Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3)</BrowserUserAgent>
   <BrowserLanguage>en-US</BrowserLanguage>
   <SystemLanguage>en-US</SystemLanguage>
   <UserLanguage>en-US</UserLanguage>
   <ScreenResolution>1920x1080</ScreenResolution>
   <ClientName>Web</ClientName>
   <ClientTime>2013-08-13T15:56:19</ClientTime>
  </ClientInformation>
  <ServerInformation>
    <OrgLanguage>1033</OrgLanguage>
    <OrgCulture>1033</OrgCulture>
    <UserLanguage>1033</UserLanguage>
    <UserCulture>1033</UserCulture>
    <OrgID>{18B8FA5C-8A97-442D-86DD-F165239B5EED}</OrgID>
    <UserID>{0A9FE007-38F4-E011-A9A0-005056B754DF}</UserID>
    <CRMVersion>5.0.9690.3236</CRMVersion>
  </ServerInformation>
</CrmScriptErrorReport>

-------------------------------------------------------------------------------
***Our conv_lead.aspx function for applychanges***

function cancel( )
{
closeWindow();
}


function applychanges()
{
var ret = new Object();

ret.qualify          = radQualify.checked;
ret.unqualify        = radUnqualify.checked;
ret.account          = cbAddAccount.checked;
ret.contact          = cbAddContact.checked;
ret.opportunity      = cbAddOpportunity.checked;

if(cbAddOpportunity.checked && !IsNull(crmOwnerLookup.DataValue) && !cbAddContact.checked && !cbAddAccount.checked)
{
with(crmOwnerLookup.DataValue[0])
{
if(type == Account)
{
ret.parentAccount    = id;
ret.parentContact    = "";
}
else
{
ret.parentContact    = id;
ret.parentAccount    = "";
}
}
}
else
{
ret.parentContact    = "";
ret.parentAccount    = "";
}

ret.showNew          = cbShowNew.checked;
ret.unqualifyStatus  = selStatus.DataValue;
ret.qualifyStatus  = selQualifyStatus.DataValue;

var sCustParams = "";

if( ret.qualify )
{
sCustParams = "&qualify=" + true ;


if( ret.parentAccount )
{
sCustParams += "&qlShowNew=" + ret.showNew;
sCustParams += "&qlCreateAccount=" + ret.account;
sCustParams += "&qlCreateContact=" + ret.contact;
sCustParams += "&qlCreateOpportunity=" + ret.opportunity;
sCustParams += "&qlOpportunityParentType=1"
sCustParams += "&qlOpportunityParentId=" + ret.parentAccount;
}
else if( ret.parentContact )
{
sCustParams += "&qlShowNew=" + ret.showNew;
sCustParams += "&qlCreateAccount=" + ret.account;
sCustParams += "&qlCreateContact=" + ret.contact;
sCustParams += "&qlCreateOpportunity=" + ret.opportunity;
sCustParams += "&qlOpportunityParentType=2"
sCustParams += "&qlOpportunityParentId=" + ret.parentContact;
}
else
{
sCustParams += "&qlShowNew=" + ret.showNew;
sCustParams += "&qlCreateAccount=" + ret.account;
sCustParams += "&qlCreateContact=" + ret.contact;
sCustParams += "&qlCreateOpportunity=" + ret.opportunity;
sCustParams += "&qlOpportunityParentType=" + "-1";
}

if(cbAddOpportunity.checked)
{
ret.OppCurrencyId = crmCurrencyLookup.DataValue[0].id;
sCustParams += "&qlOppCurrencyId=" + ret.OppCurrencyId;
}
sCustParams += "&ulNewStatus=" + ret.qualifyStatus;
}

else
{
sCustParams = "&qualify=" + false;
sCustParams += "&ulNewStatus=" + ret.unqualifyStatus;
}

ret.sCustParams = sCustParams;

window.returnValue = ret;
closeWindow();
}

Picklist Value in Email template

$
0
0

I have a email template where I am having a picklist value.

When I run the workflow, the email comes with the Value in the picklist field, I want the text of the picklist in that field

eg: I have Picklist "evaulation criteria'

Technology 200001

Price  200002

I need the value 'Technology' but instaed I am getting the '200001' in email.

I am using the schema name in the email template.

let me know


CRM pop-up Silverlight application in new browser window issue

$
0
0

Hi Guys,

I have developed a silverlight application that is launched from a CRM form. The form has a field and in the OnChange event of the field, it calls window.open to open a HTML web resource:

window.open(serverUrl + "")...

The HTML web resource contains an iframe that embeds the silverlight control.

The silverlight control has a "Save Data" button that saves data back to the CRM form. This all works fine on my development PC, however, on other PC, the data are not saved back to CRM.

I put debugging messages and the Xrm object is null. In the silverlight code, I am accessing the Xrm object by:

 
HtmlPage.Window.Eval("document.parentWindow.opener.Xrm") as ScriptObject;

This works on my development PC but doesn't work on other PC, does anyone know why this is happening? Is this a permission or browser settings issue?

I also tried to run "document.parentWindow.opener.Xrm" in IE developer tool's script window on the other PC while the silverlight control is open, and i can see the DOM object ok??

 

Regards,

Jerry

 

how to get parent case values via xrm?

$
0
0

Hello - I have a requirement where I need to give users the ability to create child cases. There are about 10 case form field values that the users want copied from the parent case to the child case by default. It seems like I need to do this through Xrm via the onload function in the case js, so the form is pre-populated with the expected values, which the user can then modify.

However, I'm not sure about the best way to go about doing this. It looks like, when I select Case > Children from the left nav bar, and then click the "Add New Case" button, CRM opens a new Case form with a _CreateFromId parameter in the query string.

I could probably make an oData call from the js to retrieve the parent entity by this ID but I wasn't sure if there was a quicker, more appropriate Xrm function build into the framework that would be more appropriate to use for this?

CRM 2011 Service Authentication (on premise)

$
0
0

Hi,

I have seen a lot of information about authenticating to the OrganizationServiceProxy using

_Credentials =

NewClientCredentials
_Credentials.Windows.ClientCredential =CredentialCache.DefaultNetworkCredentials

When I use this I get the following error:

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

I can authenticate okay if I pass log on details, but I need my application to use the credentials of the user. Any ideas what could be wrong?

_Credentials.Windows.ClientCredential =CredentialCache.DefaultNetworkCredentials works fine through Visual Studio.

Thanks in advance

ActiveXObject not supporting Other than IE browser.

$
0
0

In my project i have used below mentioned code to retrieve fields.Its working fine in IE but when i use with Firefox and chrome its getting error since ActiveXObject doesnot support other browser.I find the solution, Where they are saying to use odata query.But my project i have used lot of places below code..can any one suggest me for solution.

Thanx in advance..

My code is

function RetrieveEntityVaules(prmEntityName, prmEntityId, prmEntityColumns) {


var returnvalue, errorCount, msg, xmlHttp, arrayEntityColumns, xmlEntityColumns;

arrayEntityColumns = prmEntityColumns.split(",");

for (var i = 0; i < arrayEntityColumns.length; i++) {
xmlEntityColumns += "<q1:Attribute>" + arrayEntityColumns[i] + "</q1:Attribute>";
}

var authenticationHeader = Xrm.Page.context.getAuthenticationHeader();

//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'>" +
authenticationHeader +
"<soap:Body>" +
"<Retrieve xmlns='http://schemas.microsoft.com/crm/2007/WebServices'>" +
"<entityName>" + prmEntityName + "</entityName>" +
"<id>" + prmEntityId + "</id>" +
"<columnSet xmlns:q1='http://schemas.microsoft.com/crm/2006/Query' xsi:type='q1:ColumnSet'>" +
"<q1:Attributes>" +
xmlEntityColumns +
"</q1:Attributes>" +
"</columnSet>" +
"</Retrieve></soap:Body></soap:Envelope>";

//call function to create Soap Request to ms crm webservice
xmlHttp= new ActiveXObject("Msxml2.XMLHTTP");

 

 

 

xmlHttp.Open("POST", "/mscrmservices/2007/CrmService.asmx", false);

xmlHttp.setRequestHeader("SOAPAction", "http://schemas.microsoft.com/crm/2007/WebServices/Retrieve");

xmlHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");

xmlHttp.setRequestHeader("Content-Length", xml.length);

xmlHttp.send(xml);


returnvalue= xmlHttp.responseXML;

var errorCount = returnvalue.selectNodes('//error').length;


if (errorCount != 0) {
var msg = returnvalue.selectSingleNode('//description').nodeTypedValue;
alert("Error Message : " + msg);
}
else {

return returnvalue;
}
}


Arun Kumar G


Javascript to validate if date entered is greater than today's date

$
0
0
I need to validate On Change if date entered to a field is greater than today, if it is, generate an alert and empty the field. Can anyone provide a JavaScript example pls.

Cannot export solution from one organization to another

$
0
0

Hi,

We work with 2 organizations. One test and one production, the test is where we do all the work on an unmanaged solution. Than we export it managed and import on the production. This has worked without a problem so far. But when I tried it now I get the following error:

A managed solution cannot overwrite a {0} component on the target system that has an unmanaged base instance.  The most likely scenario for this error is that an unmanaged solution has installed a new unmanaged {0} component on the target system, and now a managed solution from the same publisher is trying to install that same {0} component as managed.  This will cause an invalid layering of solutions on the target system and is not allowed.

I assume this means something has changed on production and now can't be overwritten by the solution from the test environment. So I figured, no biggy, I'll just delete this from the test and try again. However the problem is it says that the issue is in Mappings, an Attribute map between quotedetail and salesorderdetail. These two have no relationship... So I went looking in the customization.xml and found the mapping.

Here I found this:

<EntityMap><EntitySource>quotedetail</EntitySource><EntityTarget>salesorderdetail</EntityTarget><AttributeMaps><AttributeMap><AttributeSource>ave_finishingid</AttributeSource><AttributeTarget>ave_finishingid</AttributeTarget></AttributeMap></AttributeMaps></EntityMap>

finishing is a custom entity, which does contain a 1:N relation to both entities. So I tried to delete these relationships but I simply can't. It keeps giving me the error:

Cannot Delete Component because one or more components require it. But there are no dependencies left on the relationships. I've deleted everything from forms, views, charts, even navigations... Still nothing when I select the relationship and click on show dependencies, it says there are none... I'm at a loss here on what to do.. I need to export the solution to production asap but am not allowed to edit the customization.xml, cause I figured I'ld just delete the entitymap there and it would work, which is probably true but also unsupported... Anyone have any ideas on what else I can do?? 

Email Router Configured for gmail in crm 2011

$
0
0

Hi,

I have configured email router for gmail (pop3) and it's displaying test succeded, but how do i test this one , because i have set queue's email id as my gmail id and if i give some other gmail id test connection fails.  What is Uid pwd we need to set at Email router configuration profile. I have selected  access credentials as other specified and password same as gmail. What email id i have to set for queue. I am working on my local virtual box(on premise). Any help would be appreciated.


Abhishek


crm 2011 online: Issue when debugging custom workflow activity

$
0
0

Hi,

I have created a custom workflow activity for CRM 2011 online.

The workflow fails, so I am trying to debug it.I have installed profiler, attached visual studio to plugin registration tool.

But I get this error when I try to 'Start Execution' from Plugin reg tool.

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Could not load file or assembly 'Microsoft.Xrm.Sdk.Workflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Detail: <OrganizationServiceFault xmlns="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <ErrorCode>-2147220970</ErrorCode>
  <ErrorDetails xmlns:a="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
    <KeyValuePairOfstringanyType>
      <a:key>CallStack</a:key>
      <a:value i:type="b:string" xmlns:b="http://www.w3.org/2001/XMLSchema">   at System.Activities.WorkflowApplication.Invoke(Activity activity, IDictionary`2 inputs, WorkflowInstanceExtensionManager extensions, TimeSpan timeout)
   at System.Activities.WorkflowInvoker.Invoke(Activity workflow, IDictionary`2 inputs, TimeSpan timeout, WorkflowInstanceExtensionManager extensions)
   at System.Activities.WorkflowInvoker.Invoke(IDictionary`2 inputs)
   at PluginProfiler.Library.WorkflowAppDomainProxy.ExecuteCore(Stopwatch watch, ProfilerExecutionReport report, Object instance, Object executionParameter)
   at PluginProfiler.Library.AppDomainProxy.Execute(ProfilerExecutionConfiguration configuration, ProfilerExecutionReport report)</a:value>
    </KeyValuePairOfstringanyType>
  </ErrorDetails>
  <Message>Could not load file or assembly 'Microsoft.Xrm.Sdk.Workflow, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.</Message>
  <Timestamp>2013-08-27T13:04:59.2179304Z</Timestamp>
  <InnerFault i:nil="true" />
  <TraceText i:nil="true" />
</OrganizationServiceFault>

I am not sure what the issue, I have been stuck with this.

It will be appreciated if you can assist me in this issue please.

Regards,

Wesley

CRM Cross browser issue

$
0
0

Hi all,

I am using crm 2011 online application. it is working fine in internet explorer and even scripts are also running in the Internet explorer.

But when i am trying this into the mozila firefox or google crome. It is not opening the crm application.

I have included this in trusted site as well but didn't work for me.

can anyone please tell me that how to make it compatible with all the browser and along with that is there any impact on java scripts used for form events in different browsers ?

Please help !!

Thanks 

Ankit

Viewing all 9244 articles
Browse latest View live


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