Quantcast
Viewing all 79901 articles
Browse latest View live

Handle null entityreference in LINQ

How to handle join when the EntityReference is null. For example 

var info = (from cr in xrm.CreateQuery<new_course>()
join c in xrm.CreateQuery<Contact>()
on cr.course_contact.Id equals c.ContactId
where c.Id == courseGuid
select cr.title).FirstOrDefault();

when course_contact is null C# throws null exception 

Microsoft.Crm.CrmArgumentNullException: attributeName ---> Microsoft.Crm.CrmArgumentNullException: attributeName ---> System.ArgumentNullException: Value cannot be null.
Parameter name: attributeName
--- End of inner exception stack trace ---
at Microsoft.Crm.Metadata.EntityMetadata.TryGetAttribute(String attributeName, NameMappingType mapping)
at Microsoft.Crm.Metadata.EntityMetadata.GetAttribute(String attributeName, NameMappingType mapping)
at Microsoft.Crm.Query.EntityExpression.FromSdkQueryVisitor.Visit(ConditionExpression condition)
at Microsoft.Crm.Query.EntityExpression.FromSdkQueryVisitor.Visit(FilterExpression filter)
at Microsoft.Crm.Query.EntityExpression.FromSdkQueryVisitor.Visit(QueryExpression query)
at Microsoft.Crm.Query.EntityExpression.InitializeFromQuery(QueryBase query)
at Microsoft.Crm.Query.EntityExpression.Converter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at Microsoft.Crm.BusinessEntities.ConversionHelpers.Convert(ICrmConversionContext conversionContext, Object source, Type destinationType)
at Microsoft.Crm.Extensibility.DictionaryMapper.Map(ParameterCollection inputs, ICrmConversionContext context)
at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider)
at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
--- End of inner exception stack trace ---
at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
at Microsoft.Crm.Extensibility.Pipeline.<>c__DisplayClass2_1.<Execute>b__0()


Plugin not getting updated in managed solution

Hello All,

      I have updated the plugin via Plugin Registration Tool in the sandbox environment. Later I have downloaded the managed solution & created a package to be deployed on Microsoft. While package certification by Microsoft I am always getting the same error. The error which is mentioned for the code in the plugin is fully commented out.  

Please let me know where I missing out the steps in plugin update.

Thanks in advance.

Regards

Siddharth

Reg Filter in a GRID in an entity

Hi guys,

I have a custom entity in which i have subgrid to display the views of another entity and now what I want is to filter the 

Image may be NSFW.
Clik here to view.

Product grade field based on the material group category. Is it possible?

I have tried addpresearch and custom filter method but it doesn't work here.

any suggestions, please.

Add own template to associated documents new menu

We have set up Dynamic 365 for Customer Engagement to use Sharepoint Online. In the Associated Documents form we want to add own own templates to the NEW menu. Is this possible?

Image may be NSFW.
Clik here to view.

In a custom entity, updating specified field(not currency), the field currency also be updated

In my a custom entity, there are many fields, also contain the field currency. The field currency also be updated while I update other field, although the field currency is still original value.

Attached image is Audit History.Image may be NSFW.
Clik here to view.
Audit History

Here is a snippet of the code:

Entity vendorResource = new Entity("EntityStaff");
vendorResource.Id = vendors.Entities[0].Id;

vendorResource.Attributes["abc_building"] = new EntityReference("abc_officefloor", buildingID);
vendorResource.Attributes["abc_seat"] = new EntityReference("abc_facilityseat", seatID);

service.Update(vendorResource);

I just want to update Facility Site and Seat fields, but I don't know why the field Currency also be updated. Help me!

Classic interface vs. Unified interface for yet to be go LIVE client

We are currently developing for one of our clients in classic interface. A lot of development has been done so far with classic interface and some of tasks are still under development.
There are lot of functionalities, which use Xrm.Page directive too.
 
Now, our dilemma is, should we move the client to Unified Interface at this stage and validate all the developed features again at new UI.
OR
Should we continue with the classic one, do the GO LIVE for the client at the end of this year.

Could anybody advise on this? Any help would be much appreciated.

D365 Entity Messages - Custom Display string does not work in D365 latest version

Hi,

I have added Custom display string in Quote entity Messages ("Effective To") and published but CRM still display's Default string. Tried importing translation with new text, still no luck.

Can anyone confirm if this is a MS bug in latest release?

Thanks in advance.

Integrating CRM 2013 on Premise and Office 365

Hello,


Now, we are using Microsoft Office 2013 and MS Dynamics CRM 2013 with UR 5 with Outlook integration. We will replace Microsoft Outlook 2013 by Office 365 Outlook. MS Word, Excel and MS Dynamics CRM remain unchanged.

Is it supported?

Integrating CRM 2013 on Premise and Office 365

CRM 2013 on-premise, Office365 email, and Server-side sync

does anyone have any guidelines for integrate CRM 2013 on-premise and office 365?

Please advise what changes are required.


javascripts for using in ms crm 365

Hello everyone ,

i need one small help in java scripts.

i have written below code in field called actual start-(this is field) in form in ms crm 365.

my requirement is ....when i open a page then actual start date should be auto field and if someone want to change date in less then current date then it should through alert message and make the field blank (actual start) while saving the form and does not let the save the form unless entered the current date or future date ...

----------------------------------------------------------------

function fromDateValidation()
{
debugger;
var fromDate = Xrm.Page.getAttribute("actualstart").getValue();
var today = new Date();
var currentDate = today.setHours(0, 0, 0, 0);
Xrm.Page.getAttribute("actualstart").setValue(currentDate);
// var currentDate = today.getDate();
// var getFromDate = new Date(fromDate);
//var frDate = getFromDate.getDate();

if(fromDate < currentDate) {
alert("Start Time cannot less than Today's date");
Xrm.Page.getAttribute("actualstart").setValue(null);
return false;
}
}

-----------------------------------------------------------

m sorry to ask this but m new to this java scripts

thanks .

AMit 

Reg Filter in the subgrid between teo fields

Hi Guys,

i have a subgrid and I want to filter the subgrid between two fields present inside the subgrid.

For ex:

I have 4 fields inside the subgrid,

ShopName(Single line of text)

Braches city(lookup)

Mobile Number

Amount.

In the above, I want to filter Branch's city field based on the shop name selected.

I am able to do this in the parent form of the View in the subgrid.

is this possible to do directly in the subgrid itself?

Please advise.

Regards,

AxTechie2120

Making only BPF field required using JS

We have a field that is on the form and on the BPF. I would like to make the field conditionally required in the BPF to move from Stage X to Stage Y.

However, when I use JS to make it required referencing the "header_process" field, the normal field on the form becomes required as well. Meaning that in order to save the record, you have to fill in a value, which I don't want. It should only be necessary to fill it in to go to the next stage.

Is this just a limitation of CRM?

Making only the BPF field required using JS

We have a field that is on the form and on the BPF. I would like to make the field conditionally required in the BPF to move from Stage X to Stage Y.

However, when I use JS to make it required referencing the "header_process" field, the normal field on the form becomes required as well. Meaning that in order to save the record, you have to fill in a value, which I don't want. It should only be necessary to fill it in to go to the next stage.

Is this just a limitation of CRM?

How do you import multiple lookup values to one field?

I'm hoping this is a pretty easy question - I need to import multiple lookup values into one field. How do I do this?

For example, in my Account entity, I have a field called "Region" which is a lookup for the Territory entity. It's an N:N subgrid meaning it can contain more than one Territory in the field. I have a spreadsheet which contains all this information but I'm not sure how to actually import it. Using commas (,) and quotation marks (") to separate the values didn't work. Am I missing something obvious?

Thanks in advance for any help with this!

CRM Mailbox Issue

We are using Dynamics 365 On Premise (version 8.2.3) and occasionally when a mailbox is created, even though the email settings are correctly set, the emails are not processed for the mailbox.  In our case we are using the router to process emails.  If load the data from my CRM instance in my router, I do not see the mailboxes.  However, when I set all three email settings to "None," wait 5 minutes, and the reapply the default email settings, the emails are correctly processed by the router.

Auto Emails with MS Flows

Hi There,

Im trying to currently set up an auto email to be sent directly to a new lead when the details are uploaded to v9 Dynamics.

The idea is for me to create a MS contact form to be added to our website. once someone has filled out the form and submitted it, the details then transfer as a lead to Dynamics.

Once this data is in, i would like the system to auto generate a email thanking them for there enquiry and that a rep will make contact. (THIS IS THE BIT I AM STUCK WITH)

I have seen online that i might be able to use MS flows but its not clear.

I only want the Auto email to be sent out via leads that has come from the contact form. (i don't want an email to be sent out to every lead as we also input new details manually) 

I know that Dynamics already has a lead template that i'm going to use.

Any ideas on how to get around this?


Need help debugging jscript event that shows/hides sections based on Opportunity Scope field

I am trying to use a jscript event to show/hide tabs on my Opportunity form based on what is selected in the "Opportunity Scope".  I have made this an OnLoad event, as well as an "OnChange" event for when the Opportunity Scope field is changed.  However, I haven't been able to get the event to work.  I am fairly new to javascript and could use some help debugging.

Here is my code:

function HideShowOpportunityTabs()
{
OppScope = Xrm.Page.getAttribute(“new_OpportunityScope”);
if (OppScope.getValue() != null)
{
if(OppScope.getText()==”Product”)
{
Xrm.Page.ui.tabs.get(“RecurringRevenue”).setVisible(false);
Xrm.Page.ui.tabs.get(“FieldService”).setVisible(false);
}
else if (OppScope.getText()==”Professional Services”)
{
Xrm.Page.ui.tabs.get(“RecurringRevenue”).setVisible(true);
Xrm.Page.ui.tabs.get(“FieldService”).setVisible(true);
}
}
}

When I load the form, I receive the following error:

Image may be NSFW.
Clik here to view.

The "OnChange" event is not working either.  It does not cause an error, but the sections are not being hidden.

Any help fixing this would be greatly appreciated.  Thanks!

I can not get the Contact on an Opportunity to pull into a custom Word Template, I have used ALL XML options, HELP!

I have created a custom Word Template or the Opportunity entity in Microsoft Dynamics 365. I have used all available Contact XML mappings including Contactid, Conactidname, Fullname, Firstname, Lastname… no data will pull in even though the opportunity record has an associated Contact. Why? Please help? 

Generate report on Security Role

Hi All,

Is there a way to find out which security roles have which privileges in bulk?

I know to find individually by clicking the security roles -> Core records and see which privilege has got which access.

But I would like to know, is there a way that can we export all security roles along with the privileges?

(for eg)If I have 20 security roles, I would like to see in an excel that all 20 security roles along with which access they got on which privilege. (ie) system admin has these access and salesperson have got this access. 

Many thanks,

Poornimaa AN

How to access External web API in CRM plugin ?

using (var client = new WebClient())

         {

              client.Proxy = new WebProxy("Enter IP Address of proxy", Enter PORT);

              client.Proxy.Credentials = new NetworkCredential(@"UserName", "Password");

              client.Headers.Add("Content-Type:application/json");

               client.Headers.Add("Accept:application/json");

               var response = client.UploadString("Enter API URL", JsonConvert.SerializeObject(classobject));                    

         }

Query for advanced find of accounts whose contacts has not had appointment

Hi! 
I want to set up a personal view with the following criteria

Active Accounts where account address 1 equals a specific city, or no data in adress 1 city. Only view those accounts who has contacts, and only view those accounts whose contact has not had an appointment the last 6 months or ever. 

The active and city-part is fine. But Im struggling with the query for accounts whose contacts has not had an appointment. Meaning that if only 1 contact under an account has had an appointment, the account should not be visible in this view. 

Would also like to add that the appointments in regarding contacts, not regarding accounts. 

Thank you,

Best,

Kristin

Viewing all 79901 articles
Browse latest View live


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