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

Error: Attempt by method SendMessage () to access method GetQueueManager() failed.

$
0
0

Hi Folks,

I am facing below error when I try to access external IBM MQ method from plugin in D365 Onprem.

Error: Attempt by method SendMessage to access method GetQueueManager failed.

We have IMqConnect with SendMessage method.

Here SendMessage method is part of MqConnect external class implementing IMqConnect interface,

In the same class we have GetQueueManager method, all method access modifer is public.

All external classes added as shared link in plugin assembly folder structure.

Please help me to resolve this issue.


Show only related records in d365 sales

$
0
0

Hi,

I have two custom entity 'Fund' and 'Allocation', with list of imported data. 


I have created a 1->N relationship between them, Fund(1)-> Allocation (Many). I am showing all the list of fund records in fund entity form, when I open one fund records I have a tab which shows all the Allocation related to the fund, based on the fund ID.

As there is already a relationship under funds I created a subgrid with only related records to Allocation, but the subgrid shows nothing

Global Search in CRM not Working Since Yesterday

$
0
0

I am not able to search through Global Search in CRM Customer Service Hub App.

Please find the screenshot.

Could any one have any idea ?

i'm Unable to register assembly in plugin registration tools

$
0
0

I have tried to register new assembly through plugin registration tool . But i'm unable to see any popout window to load my dll file 

Pricelist developing

$
0
0

Hi guys,

I would like to know how to do the next things before I start developing Pricelist logic:

  1. Is it possible by Design that I can have only 1 pricelist but depend on the valid-dates (valid from to) different valid-date for every customer?
  2. Is it possible that we can select for a customer a follow-up list that will be effective after the valid-date from Pricelist 1 has been exceeded. It means that in the list we will have 2 different pricelists but the 1 become disabled after it expires and the second one active

Also, if you have helpful resources related to Pricelist - add them for me

Thanks in advance.

Creating additional schemas and views in Data Export Service

$
0
0

is there any impact or limitation on the azure SQL database, where data and entities from CRM dynamics have been replicated using data export service, if an additional schema and views are created in that azure sql database?

e.g. 

CRM replicates dbo.contact, dbo.account and other tables into the Azure sql database, using the data export service.

and

we also create a separate schema [e.g. call 'MyDummySchema", and a view "CRMContactView") where we can build a specific query on dbo.contact, as example; and query from that MyDummySchema.CRMContactView object instead of the dbo.contact.

Is there any documentation stating that impact or no impact? 

Many thanks 

Juan

How to update the record using jscript in d365 for use of crm rest builder? How can i get the value of update record ?

$
0
0

How to update the record using jscript in d365 for use of crm rest builder? How can i get the value of update record ?

I have a table name (po) and (pl) and dfc and po confirm

i have create record for dfc from pl and in next web RESOURCE i fetch the data from dfc(table) and create into po confirm and then i will delete the data for dfr and at lat i want to udate the po confirm record into pl record 

Can we use Online Marketing with Dynamics CRM in prem 2016 8.1 version? Hybrid allowed ?

$
0
0

Dears,

Can we use CRM on premise 2016 v8.1 with Markeitng cloud ? We have acquired Marketing license but unable to sync the data from Data gatewway to Online instance of Marketing


Not able to Activate the Routing Rule, says workflow ID does not exist

$
0
0

Hi All,

I have moved my PRD routing rule into Dev it got imported but not able to Activate as it shows an error that workflow Id xxxxx does not exist.

The same Workflow which gets created in the background is imported from Prd to Dev, i have also tried updating the CRM solution xml with the GUID in error but solution is getting failed.

I have removed the Flow from processes but still its the same.

Please advise??

CRM 2016 version 8.1 on premise

{Portal} Liquid Error retrieving optionset value

$
0
0

I have a content snippet accessing the contact record via the user variable.

let currentMembershipLabel = '{{ user.abc_membershiptype.label}}';

let currentMembership = '{{ user.abc_membershiptype.value}}';

The currentMembershipLabel has the correct text for the option set value selected, however the .value gets a type conversion error:

'Liquid error: Object of type 'System.Int32' cannot be converted to type 'System.String'.';

I have tried:

  • let currentMembership = '{{ user.abc_membershiptype.value | string }}';
  • let currentMembership = {{ user.abc_membershiptype.value}};

however i get the same error.

Thanks in advance for your assistance.

Word template unexpected error

$
0
0

I have a word template on that can be exported for all records except one record . when trying to export it the following err occurs :

things that i have tried :

- Populating currency field

- Rebuild the word template and remap the entity fields in the word template 

- Enable security role for everyone 

please help ! this is an urgent case  

Why associate message is called when I create a record from related tab in a form even if it is a 1:N relationship?

$
0
0

Just like I wrote in the subject. Let's say I have a table called "Scaffold". This table has a relationship 1:N with another table called "Position". If I go in the Scaffold's form, navigate through "related" link and click in "new", I can create a new record in the Position's table. My problem is that when I do this, the CRM call the "associate" message, calling both create and update message togheter. So if I have different control in my plugin between create and update, I have many problem when update message is called in creation.
I read on many forum that associate message is called in an N:N relationship, so I would like to understand if it is a common behavior that it is called also in an 1:N relationship. If so, who I can avoid to call the update message on create?
I found this problem in any new record created through related tab. No problem at all if I create new record in any other way, even if I valorize lookup

Customizable default value for a field

$
0
0

Hello,

I'm looking for the way to allow specified user to set default value for a lookup field, it should be accessible from form view so it can be easily changed. Is it even possible? 

I thought about some workflow, but could it be customized by user?

Thank you for any help,

Henryk

Sharepoint Folder to Dynamics

$
0
0

Hello,

How is it possible to link Sharepoint to Dynamics. We aready have the sharepoint Folder but We can't match it together.

Exemple

mysharepoint.com/Vente/Shared files/folder_X

How can I link the folder_x to a specifik opportunity. ?

I put The SharePoint site in Dynamics 365 > settings >Sharepoint Site  with the correct url: mysharepoint.com/Vente/ it's have been validate by dynamics.

How can I add mysharepoint.com/Vente/shared file like a SharePoint site?  

share file is part of the content site, if I try to add "share file" in the SharePoint sites I have an error.

I can't add to Dynamics>settings> SharePoint Document Location in the Relatives URL because Relatives URL want a folder name

I didn't find a good solution to resolve this.

Thanks in advance

The type initializer for 'IBM.WMQ.Nmqi.UnmanagedNmqiMQ' threw an exception.

$
0
0

Hi,

i am facing below error while trying to connect to IBM MQ QueueManager class methods from D365 OnPrem Plugin isolation mode is none.

The type initializer for 'IBM.WMQ.Nmqi.UnmanagedNmqiMQ' threw an exception.

Please do the needful asap.

Thanks.


How do I Autopopulate a field based on the lookup selection?

$
0
0

Hello All,

I am new to D365, currently I am trying to write a JS code to Auto populate a Company name Text field if the respective Company Name (Existing Client) is chosen in lookup by the user in the Custom entity. I can write this as a workflow but it happens only on Save. So I am looking to write JS code to achieve this change. So whenever users change the value in Existing Client Field then the respective company name should be populated from the Existing Client.

Can you kindly help here please?

Best Regards

Gowtham

Customise the data stream in a dashboard

$
0
0

Hello,

I have a question regarding customising interactive dashboards based on the unified user interface.

As shown in the screenshot below, when a data stream is displayed in a dashboard, the Cases entity displays selected information such as the name of the case.
Is it possible to customise this to show, for example, the customer or custom columns instead?

Thank you very much in advance!
Kind regards,
Daniel

OnLoad script after businsess rule?

$
0
0

Hi,

I have the script that make field 'name' required on form load. This field is set to optional in CRM. There is also business rule, which changes 'name' to optional in some cases. (it wasn't me who set this like this)

Sometimes I have the problem that in the case in which business rule should make the field optional it's still required, is it possible that sometimes js script i loaded after business rule or maybe business isn't called at all?

Thank you for any help,

Henryk

Plugin to capture Export details

$
0
0

Hello All,

We have a requirement to capture the logging information when anyone export data and generate notifications.

We need to know what entity was exported, how many records, and columns detail.

Is this possible via Plugin or Custom WF or any third party tool ?

Kind Regards,

Abhilash Reddy

open record after its line items have been created via web api

$
0
0

hi I have some javascript code which is used to take contract pieces of information and items and create an invoice with those very items.

Though I am not quite sure whether this approach is the best for creating a new record from one entity into another.

My code:

    var currentYear = new Date().getFullYear();
    var currentStart = new Date(currentYear, 0, 1);
    //currentStart.setHours(0,0,0,0);
    var currentEnd = new Date(currentYear, 11, 31);
    //currentEnd.setHours(0,0,0,0);
function start() {
  var ID = parent.Xrm.Page.data.entity.getId().substring(1, 37); 
    var fetchxml = `<fetch distinct="false" mapping="logical" output-format="xml-platform" version="1.0"><entity name="contractdetail"><attribute name="title"/><attribute name="productid"/><attribute name="allotmentsremaining"/><attribute name="contractdetailid"/><attribute name="net"/><attribute name="activeon"/><attribute name="serviceaddress"/><attribute name="initialquantity"/><attribute name="customerid"/><attribute name="expireson"/><attribute name="uomid"/><attribute name="discount"/>   <attribute name="new_ortfirma"/><attribute name="new_thisstart"/><attribute name="new_thisend"/><order descending="false" attribute="title"/><link-entity name="contract" alias="ab" to="contractid" from="contractid"><filter type="and"><condition attribute="contractid" value="{` + ID + `}" uitype="contract" operator="eq"/></filter></link-entity></entity></fetch>`;

    var encodedFetchXML = encodeURIComponent(fetchxml);
    var queryPath = "/api/data/v8.2/contractdetails?fetchXml=" + encodedFetchXML;
    var requestPath = parent.Xrm.Page.context.getClientUrl() + queryPath;

    var req = new XMLHttpRequest();
    req.open("GET", requestPath, true);
    req.setRequestHeader("Accept", "application/json");
    req.setRequestHeader("Content-Type", "application/json; charset=utf-8");
    req.setRequestHeader("Prefer", "odata.include-annotations=\"*\"");
    req.onreadystatechange = function ()

    {

        if (this.readyState === 4)

        {

            this.onreadystatechange = null;
            if (this.status === 200)

            {
                var returned = JSON.parse(this.responseText);
                var results = returned.value;
                
                getContractInfo(results);
            } else

            {

                alert(this.statusText);

            }

        }

    };

    req.send();
}

function test(data, newInvoiceID) {
    var data = data;
    var ID = newInvoiceID;

    for (var i = 0; i < data.length; i++) {
        var existingProduct = data[i];
       if(Date.parse(existingProduct.activeon) < Date.parse(currentStart)) {
           if(Date.parse(existingProduct.expireson) > Date.parse(currentEnd)) {
               var lineitem = {};
        lineitem["productid@odata.bind"] = "/products(" + existingProduct._productid_value + ")";
        lineitem["uomid@odata.bind"] = "/uoms(" + existingProduct._uomid_value + ")";
        lineitem["new_contractactiveon"] = currentStart;
        lineitem["new_contractexpireson"] = currentEnd;
        lineitem["new_ortfirma@odata.bind"] = "/accounts(" + existingProduct._new_ortfirma_value + ")";
        lineitem.quantity = existingProduct.initialquantity;
        lineitem["invoiceid@odata.bind"] = "/invoices("+ ID +")";
        lineitem["manualdiscountamount"] = existingProduct.discount;
        test3(lineitem, ID);
           }
           if(Date.parse(existingProduct.expireson) < Date.parse(currentEnd)) {
               var lineitem = {};
        lineitem["productid@odata.bind"] = "/products(" + existingProduct._productid_value + ")";
        lineitem["uomid@odata.bind"] = "/uoms(" + existingProduct._uomid_value + ")";
        lineitem["new_contractactiveon"] = currentStart;
        lineitem["new_contractexpireson"] = existingProduct.expireson;
        lineitem["new_ortfirma@odata.bind"] = "/accounts(" + existingProduct._new_ortfirma_value + ")";
        lineitem.quantity = existingProduct.initialquantity;
        lineitem["invoiceid@odata.bind"] = "/invoices("+ ID +")";
        test3(lineitem, ID);
           }
       } else if(Date.parse(existingProduct.activeon) > Date.parse(currentStart)) {
           if(Date.parse(existingProduct.expireson) > Date.parse(currentEnd)) {
                var lineitem = {};
        lineitem["productid@odata.bind"] = "/products(" + existingProduct._productid_value + ")";
        lineitem["uomid@odata.bind"] = "/uoms(" + existingProduct._uomid_value + ")";
        lineitem["new_contractactiveon"] = existingProduct.activeon;
        lineitem["new_contractexpireson"] = currentEnd;
        lineitem["new_ortfirma@odata.bind"] = "/accounts(" + existingProduct._new_ortfirma_value + ")";
        lineitem.quantity = existingProduct.initialquantity;
        lineitem["invoiceid@odata.bind"] = "/invoices("+ ID +")";
        lineitem["manualdiscountamount"] = existingProduct.discount;
        test3(lineitem, ID);
           }
           if(Date.parse(existingProduct.expireson) < Date.parse(currentEnd)) {
                var lineitem = {};
        lineitem["productid@odata.bind"] = "/products(" + existingProduct._productid_value + ")";
        lineitem["uomid@odata.bind"] = "/uoms(" + existingProduct._uomid_value + ")";
        lineitem["new_contractactiveon"] = existingProduct.activeon;
        lineitem["new_contractexpireson"] = existingProduct.expireson;
        lineitem["new_ortfirma@odata.bind"] = "/accounts(" + existingProduct._new_ortfirma_value + ")";
        lineitem.quantity = existingProduct.initialquantity;
        lineitem["invoiceid@odata.bind"] = "/invoices("+ ID +")";
        test3(lineitem, ID);
           }
       }
        }
    }         

function test3(data, invoiceID) {
    var req = new XMLHttpRequest();
req.open("POST", parent.Xrm.Page.context.getClientUrl() + "/api/data/v8.2/invoicedetails", false);
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) {
            var uri = this.getResponseHeader("OData-EntityId");
            var regExp = /\(([^)]+)\)/;
            var matches = regExp.exec(uri);
            var newEntityId = matches[1];
        } else {
            parent.Xrm.Utility.alertDialog(this.statusText);
        }
    }
};
req.send(JSON.stringify(data));
setTimeout(50000, Xrm.Utility.openEntityForm("invoice", invoiceID).then(
    function (success) {
        console.log(success);
    },
    function (error) {
        console.log(error);
    }));
}



//info from contract that is going to be used in the invoice
function getContractInfo(data) {
    var ID = parent.Xrm.Page.data.entity.getId().substring(1, 37);

    var req = new XMLHttpRequest();
    req.open("GET", parent.Xrm.Page.context.getClientUrl() + "/api/data/v8.2/contracts(" + ID + ")?$select=activeon,_customerid_value,expireson,_serviceaddress_value,title&$expand=contract_line_items($select=activeon,expireson,initialquantity,price,title,new_thisstart, new_thisend)", true);
    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.setRequestHeader("Prefer", "odata.include-annotations=\"*\"");
    req.onreadystatechange = function () {
        if (this.readyState === 4) {
            req.onreadystatechange = null;
            if (this.status === 200) {
                var result = JSON.parse(this.response);
                var activeon = result["new_thisstart"];
                var _customerid_value = result["_customerid_value"];
                var expireson = result["new_thisend"];
                var title = result["title"];

                createInvoice(_customerid_value, title, data, activeon, expireson, ID);
            } else {
                parent.Xrm.Utility.alertDialog(this.statusText);
            }
        }
    };
    req.send();
}
//create the invoice
function createInvoice(customer, title, data, activeon, expireson, contractID) {

    var entity = {};
    entity["customerid_account@odata.bind"] = "/accounts(" + customer + ")";
    entity["pricelevelid@odata.bind"] = "/pricelevels(be2084c3-1e50-eb11-bc99-00155db20709)";
    entity.name = title;
    entity["transactioncurrencyid@odata.bind"] = "/transactioncurrencies(59f3fa86-385a-ea11-bc6a-00155db20709)";
    entity["new_VertragId@odata.bind"] = "/contracts("+contractID+")";
    entity.new_contractactiveon = activeon;
    entity.new_contractexpireson = expireson;

    var req = new XMLHttpRequest();
    req.open("POST", parent.Xrm.Page.context.getClientUrl() + "/api/data/v8.2/invoices", true);
    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) {
                var uri = this.getResponseHeader("OData-EntityId");
                var regExp = /\(([^)]+)\)/;
                var matches = regExp.exec(uri);
                var newEntityId = matches[1];
                var invoiceID = this.getResponseHeader("OData-EntityId").substring(67,103); 
                test(data, invoiceID);

                
                
            } else {
                parent.Xrm.Utility.alertDialog(this.statusText);
            }
        }
    };
    req.send(JSON.stringify(entity));

}





I believe this part is at fault here:

setTimeout(50000, Xrm.Utility.openEntityForm("invoice", invoiceID).then(
function (success) {
console.log(success);
},
function (error) {
console.log(error);
}));

I'd like to open my freshly created invoice record after all of its line items are created. As of now line item creation is incomplete and yet it jumps to the record

I would appreciate your feedback and solutions as I am not too well-versed in coding. Overall improvements to my code would be very welcome as well :)

Viewing all 46379 articles
Browse latest View live