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

How to create a Custom Entity record using SDK?

$
0
0

How to create a Custom Entity record using SDK?


Understanding Xrm.Page Client Side Model In Microsoft Dynamics 365 Customer Engagement (CRM)

$
0
0

In Microsoft Dynamics 365 CRM, javascript is the backbone of client-side customization. From show/hide of fields to locking/unlocking, getting/setting values of fields etc are coded in javascript. This makes it critical to understand and get the clarity of the model dynamics CRM use for interaction with CRM form objects.

It’s not possible to interact with form objects using simple javascript in a supported way. Microsoft Dynamics CRM provides an object model of form elements that can be utilized to manipulate data, change form object properties, or analyze the current state of the form or data within the form. This object model is called Xrm.Page

Following is the Xrm.Page object’s hierarchy showing the available namespaces, objects, and their collections. You will be using these properties while writing JScript code:

Following are the things you can do with Xrm.Page model :

  • Change the appearance or manipulate form objects like data controls (text boxes, checkboxes, etc.), tabs, sections, etc.
  • Identify elements to show/hide.
  • Specify names of objects from which to retrieve/store data values.
  • Provide namespaces to properties so the system allows multiple controls per field or multiple forms per entity. [ Continue Reading ]

Execute A Plugin From JavaScript In Microsoft Dynamics 365 Customer Engagement (CRM)

$
0
0

Many-a-times we face such situations where we need to call a plugin from a form event of javascript or a ribbon button.

Below are some of the ways of doing it:

  •  Keep a flag field on form and update that field. Call plugin on the update of that form
  • Create a dummy entity of type activity and create a record using javascript everytime you want to call the plugin. On creation of this record of dummy entity, call your plugin
  • Create an action in crm and register your plugin step on action message using plugin registration tool. Call this action using javascript.

You probably would have used the 1st approach many times which is the easiest and quickest solution, but this solution have drawbacks of it’s own.

Let’s list out the characteristics of each of the above 3 approaches:

1. Keeping a flag approach

  • Easy and quick to build
  • Need to create an unnecessary field in crm
  • Auditing is possible on the flag field to identify who and when triggered the plugin

2. Creating a dummy entity approach

  • Need to create a new dummy entity
  • On every fire of step, one record is created
  • Auditing is possible on the dummy entity record to identify who and when triggered the plugin

3. Creating and calling an action approach

  • No need to create any extra field or entity
  • Auditing is not possible directly [ Continue Reading ]

USD 4.0 : Unified Interface Window Navigation Rule (url - tel:) not working

$
0
0

Hi All,

I have configured USD 4.0 with Customer Service Hub application. I have a windows navigation rule and but this rule never triggers.

Scenario: when I clicked on the phone number in the contact/account record, it always opens the Cisco Jabber (which is default application on my machine). Since, windows navigation rule suppose to stop it, but its not working.

Window navigation rule is as follows:-

Send email request with custom entity

$
0
0

I just created an email request using C# to send email from system user into employee (custom entity). In the custom entity i added an email field type. When i run the program it says,

invalid party object type 10024

here the code

QueryExpression qe = new QueryExpression("lnkt_employee");
                //string[] cols2 = { "systemuserid", "domainname" };
                qe.Criteria = new FilterExpression();
                qe.Criteria.AddCondition("lnkt_codename", ConditionOperator.Equal, "ffatahillah");
                qe.ColumnSet = new ColumnSet(true);

                EntityCollection colect2 = _service.RetrieveMultiple(qe);

                EntityCollection toUserParty = new EntityCollection();
                toUserParty.EntityName = "lnkt_employee";

                foreach (Entity ent2 in colect2.Entities)
                {
                    string fullname = ent2.GetAttributeValue<String>("lnkt_codename");

                    Console.WriteLine("To : " + fullname);

                    Entity toParty = new Entity("activityparty");
                    EntityReference userParty = new EntityReference("lnkt_employee", ent2.Id);

                    toParty.Attributes.Add("partyid", userParty);

                    toUserParty.Entities.Add(toParty);

                }

                if (toUserParty.Entities.Count > 0)
                {
                    Email.Attributes.Add("to", toUserParty);
                }


Is it possible to fill the party with custom entity ?

How to get Push Notification in Field Service Mobile Application

$
0
0

Hi All,

I am trying to schedule a workorder to a resource and expecting to get notification on User's mobile device.

This feature is out for the public preview, i read the article on Microsoft site, but how to configure it, it is not given there.

Any help would be appreciated.

Thanks,

Shahbaaz

Version upgrade

$
0
0

Dear Team,

I have a clarification regarding version upgrade. 

we are going to upgrade current version to Dynamics 365 v9.1. 

When we do move to Dynamics v9.x, does Kingswaysoft connector require a minimal version of kingswaysoft? or which version of KWS opt for Dynamics v9.1

Please share your suggestions.

Thank you!

Pluggin code will not work getting a

$
0
0

Hi everyone,

Im trying to write the post images value of a field to another field once contact record is updated.

I get the following error

Unexpected exception from plug-in (Execute): ClassLibrary1.Class1: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. 

Below is my code 

ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService));
IPluginExecutionContext context = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext));
IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)serviceProvider.GetService(typeof(IOrganizationServiceFactory));
IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);

if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity)
{
Entity entity = (Entity)context.InputParameters["Target"];



string pretopic = string.Empty; string posttopic = string.Empty;

if (context.PreEntityImages.Contains("LeadTopicImage") && context.PreEntityImages["LeadTopicImage"] is Entity)
{

Entity preMessageImage = (Entity)context.PreEntityImages["LeadTopicImage"];
pretopic = (String)preMessageImage.Attributes["jobtitle"];

}
if (context.PostEntityImages.Contains("LeadTopicImage") && context.PostEntityImages["LeadTopicImage"] is Entity)

{

Entity postMessageImage = (Entity)context.PostEntityImages["LeadTopicImage"];
posttopic = (String)postMessageImage.Attributes["jobtitle"];

}

context.InputParameters.Contains("spousesname");
entity.Attributes.Add("spousesname",posttopic);


Plugins - Setting Subject lookup field in incident entity

$
0
0

Hi,

I had a lot of searching on how to set up incident entity subject lookup field in plugins, but unfortunately i didn't find what i want . Could you please refer a useful blog or something like that? or perhaps provide the answer here.

Thank you

How to set null in a option set attribute with the help of web API

$
0
0

Hi All,

I am using below code to update an entity.

function UpdateOrphan(_formContext) {
    var entityUpdate = {};
    var newAcademicLevel = GetNewAcademicLevel(_formContext),
        oldAcademicLevel = GetOldAcademicLevel(_formContext);
    if (newAcademicLevel) {
        entityUpdate[orphanFields.CurrentAcademicLevel] = newAcademicLevel;
    } else if (oldAcademicLevel) {
        entityUpdate[orphanFields.CurrentAcademicLevel] = null;
    }
    var orphan = GetOrphan(_formContext);
    UpdateAndReturnUpdateStatus(entityUpdate, orphan[0].id, globalVariables.WebAPIVersion, entitys.Orphans);
}

function UpdateAndReturnUpdateStatus(entity, recordID, webAPIVersion, entitysPluralName) {
    recordID = recordID.replace(/[{}]/g, "");

    var req = new XMLHttpRequest();
    req.open("PATCH", Xrm.Page.context.getClientUrl() + "/api/data/" + webAPIVersion + "/" + entitysPluralName + "(" + recordID + ")", false);//Sync
    req.setRequestHeader("OData-MaxVersion", "4.0");
    req.setRequestHeader("OData-Version", "4.0");
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.onreadystatechange = function () {
        if (this.readyState === 4) {
            req.onreadystatechange = null;
            if (this.status === 204) {
                globalVariables.UpdateStatus = true;
            }
            else {
                Xrm.Utility.alertDialog(this.statusText);
            }
        }
    };
    req.send(JSON.stringify(entity));
}

I am not able to set null with this code. I am receiving 204 in the return.

What is wrong in my code?

Thanks

Regards,

AW

Same mailbox across two environments

$
0
0
Hi all, We have a customer with two D365 environments, one is being used as a standalone environment for processing applications with an external portal, and the other is a Case Management System. All emails are sent from the Applications environment using a specific mailbox. In the Case Management environment, the customer would like to use this mailbox as a Queue for creating cases. Is it possible to use the same mailbox across two environments? We will obviously have to put in some sort of fix for tracking etc to avoid duplication or confusion between systems, but other than that would there be any further issues? Our alternative option is to create a forward mailbox if it doesn't work and operate that way. Any suggestions would be much appreciated.

TELL ME THE COMPARISONS BETWEEN CRM VS PORTALS

$
0
0

TELL ME THE COMPARISONS BETWEEN CRM  VS PORTALS

How to enable Articles in Security Role in MS Dynamics CRM v9.0?

$
0
0

Hi,

I have created a new Security Role. I want to show Article in Service --> Collateral tab. I have set Read rights but it doesn't display under Collateral in Service Tab. However, it is visible in System Administrator role.

Please suggest.

Managed Solutions in Dynamics 365 CRM

$
0
0

Hi,

In general , Managed solution can't be customized in dynamics CRM. But, recently I understood that , Managed solution in CRM can be customized. It totally depends on the Managed Properties of entity. In the managed properties , we can set properties according to our wish i.e. can be customized or not.

So, now my question  is, what's the difference between Managed and Un-managed solution when the properties of managed solution are set to customizable ?  

Thanks in advance for your response !!

Display Pop up when lead qualifies to ask information for qualifying opportunity

$
0
0

Hi everyone

I am new to CRM so please forgive my lack of knowledge. This requirement is for dynamics 365 2016 v9

I have a requirement then when a user clicks "Qualify Lead", A pop up should be displayed asking for a required "Opportunity Name" field. If the user inputs the value for opportunity name and click okay then the Qualifying Opportunity will be created with that name. If user clicks cancel then the lead should not be qualified.

What is the easiest way to achieve this? Please if anyone can explain step by step as I am new.

Thanks a lot. 

Syed Mohsin


Editable Subgrid on Custom Entity- Dynamics 365 Project Service.

$
0
0

Hi all.

I want to edit inline a subgrid on Custom Entity in Project Service App.

can i do that ?

sorry. my Enghlish not good.

Thank all.

How to get data from multiple entities combined to another one

$
0
0

In our CRM, we have a custom entity (let's say "Sub-client"), which is related to the Account entity. Multiple (1 to 99!) Sub-clients are related to each Account.
The data for the Sub-clients gets sync'ed from an external application via Scribe.

We have a second custom entity (let's say "Regulations") that has one field (say "Regulation Number") whose value corresponds with (but is not related to) the value of one of the Sub-client entity's fields, also called "Regulation Number".

We need to populate a field on the Account for each  Sub-client entity that the Account has. This data will need to come from a field (say "Regulation update") on the Regulations entity, based on the value of the Regulation Number field for each of the Sub-clients.

For example:
Account 1 has 4 Sub-clients: c01, c02, c03 and c04.
Each Sub-client has a different value in the field "Regulation": c01 = 123, c02 = 124, c03 = 125 and c04 = 126.
The Regulations entities' "Regulation update" fields each contain different data: 123 = yesterday, 124 = tomorrow, 125 = next month, 126 = last year.
Account 1 needs to get the data from these 4 Regulation update fields onto its own form in order for us be able to use this data for ClickDimensions.

Does anyone here know of a good way to get this done without adding fields for each Sub-client?

Navigate to entity/view with URL - sitemap/ribbon disappears

$
0
0

Hi all,

I would like to add URL's directing users to entities/views via an HTML web-resource. I can successfully do so using the URL example below, however, when i do this i lose my sitemap/ribbon. I have tried passing/modifying the query parameters but so far unsuccessful. Has anyone experienced this or know how to resolve? Thanks in advance!

Example:

MYORG.CRM.DYNAMICS.COM/main.aspx?etn=contact&pagetype=entitylist&viewid={00000000-0000-0000-00AA-000010001004}&viewtype=1039&navbar=off&cmdbar=false

JavaScript for hiding sections in Marketing List does not work

$
0
0

Hello,

I want to implement a JavaScript, which should hide a section within a tab in the Marketing Lists form.

To try to get this work, I made both sections in the form invisible. Also added it the JavaScript into the Form Properties / Event Handlers.

  • the "members section" is the default section by Microsoft
  • the "members_contacts" is my customized section
  • field "createdfromcode" is "Targeted At" in the form or "Marketing List Member Type" in the entity settings

The JavaScript basically should do:

  1. If the field Targeted At = Account, then show members section and hide members_contacts
  2. else Targeted At = Contact, then show members_contact section and hide members

But it doesn't work, when loading a Marketing List record, it only throws a "Script Error" message which is not every helpful.

What's wrong with that? Many thanks for any helpful advice!

function showHide() {

var createdfromcode =Xrm.Page.getAttribute("createdfromcode").getValue();

if (createdfromcode == Account) {
Xrm.Page.ui.tabs.get("Summary").sections.get("members").setVisible(true);
Xrm.Page.ui.tabs.get("Summary").sections.get("members_contacts").setVisible(false);
}

else if (createdfromcode == Contact) {
Xrm.Page.ui.tabs.get("Summary").sections.get("members_contacts").setVisible(true);
Xrm.Page.ui.tabs.get("Summary").sections.get("members").setVisible(false);
}

}

Portals : HTML validation on CRM editor (e.g. content snippet)

$
0
0

Hello,

I noticed that the HTML editor used in CRM (solution BaseHtmlEditor_portal within Dynamics portal) do some replacement automatically that can cause issues on the portal:

  • It replaces < by &lt; or > by &gt; (fetch XML / liquid condition are not working)
  • It clauses elements <element /> like <element></element> (but not always at the right place e.g. fetch XML)

Do you know if there is a way to avoid this kind of validation or autoreplacement ?

Thank you in advance

Viewing all 46379 articles
Browse latest View live


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