I have created a form to add data to an (custom) entity in Dataverse. As part of this I want to link the record being updated to another record in another entry via a many-to-many relationship (already existing between the two entities).
I have tried adapting the code below as linking records in a lookup (one-to-many) relationship. But this has not worked. Can you advise: is this possible? Should I use another reference?
<form tag with update to the cutom entity>
<input type=”hidden” name=”xxxx_NameOfManyToManyRelationship” value=”{ “LogicalName”: “contact”, “Id”: “00000000-0000-0000-0000-000000000000″ }”>
]]>Hello.
I found conflict with Filebird Pro plugin. When I have both of the plugins enabled I can’t use Filebird functionalities, while trying to add Media.
Filebird gives an error TypeError: jQuery(…).droppable is not a function. If I disable Dataverse Integrations plugin, everything works fine, therefore I think the issue on your side.
Could you please check it?
]]>Hi, I’m having some issues connecting to my environment with version 2.64. Rolling back to version 2.62 and I am able to connect again. Thanks!
[php:error] PHP Fatal error: Declaration of AlexaCRM\Cache\NullCacheItem::expiresAt(?DateTimeInterface $expiration): static must be compatible with Psr\Cache\CacheItemInterface::expiresAt($expiration) in /var/www/dev.mysite.com/wp-content/plugins/integration-cds/vendor/alexacrm/dynamics-webapi-toolkit/src/Cache/NullCacheItem.php on line 115, referer: https://dev.mysite.com/wp-admin/admin.php?page=integration-cds
2024-08-21 04:37:42 ERROR integration-cds Failed retrieving addon data from the server: cURL error 6: Could not resolve host: wpab.alexacrm.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://wpab.alexacrm.com/release/solution.manifest.json
{
"addon": {
"manifest": "https://wpab.alexacrm.com/release/solution.manifest.json",
"title": "Dataverse solution",
"description": "Managed solution providing support of premium features in Dataverse instance.",
"version": "1.2.9.10",
"url": "https://wpab.alexacrm.com/release/WordPressIntegration_1_2_9_10_managed.zip",
"isWpPlugin": false
},
"error": "[object] (GuzzleHttp\\Exception\\ConnectException(code: 0): cURL error 6: Could not resolve host: wpab.alexacrm.com (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://wpab.alexacrm.com/release/solution.manifest.json at /var/www/prod.mysite.com/wp-content/plugins/integration-cds/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210)"
}
web-server-name Apache
php-version 8.3.9
php-memory-limit 256M
php-upload-max-filesize 512M
php-post-max-size 512M
php-max-execution-time 300
php-allow-url-fopen yes
php-allow-url-include yes
php-display-errors no
db-version 8.0.39
db-charset utf8mb4
db-collate utf8mb4_unicode_520_ci
session-save-path /var/lib/php/sessions
tmp-path
mbstring-enabled yes
site-url https://www.mysite.com
site-domain www.mysite.com
wp-version 6.4.5
wp-table-prefix wp_
curl-enabled yes
curl-details
version_number 476160
age 5
features http2, ipv6, ssl, libz
ssl_version_number 0
version 7.68.0
host x86_64-pc-linux-gnu
ssl_version OpenSSL/1.1.1f
libz_version 1.2.11
protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtmp, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
ares
ares_num 0
libidn 2.3.0
iconv_ver_num 0
libssh_version libssh/0.9.3/openssl/zlib
brotli_ver_num 16781312
brotli_version 1.1.0
Resource Usage
Memory Usage 27M / 256M
Disk Usage 30.18G / 38.58G
]]>
I’m trying to use the ‘integration-cds/forms/fields’ filter, but I don’t know how to dynamically pass it the field names that have been “touched”/”changed”. I’ve tried putting the add_filter inside of an ajax handler which passes the “columns to update” to the ‘my_icds_filter_function’ all within the in the functions.php file, but I don’t think that I can add_filter after the page has been rendered… Any suggestions?
I’d like to avoid using the twig “{{lead.firstname}}” etc to populate the form fields with the existing data if possible.
add_filter('integration-cds/forms/fields','my_icds_filter_function',1);
]]>
Just wondering if there is a recommended way for creating a multi-step form, where the next form steps are added based on the previous input. So say my initial form asks
“What are you interested in?”
A) Fruit
B) Meat
[Submit]
Then the lead is either displayed the Fruit form or the Meat form.
I could just hide/show the fields, but we would like to capture data along the way, rather than wait until the entire set of forms are complete.
I am currently building this out with multiple forms that “redirect” to the same page and then using twig if statements to display the form based on the lead’s answers to previous form submissions.
I’m wondering if there is a cleaner, suggested way to do it?
Thanks!
Hi,
is there an equvialent to the deprecated “lookupviews=”{parentcustomerid:Active Contacts}”? I tried
<select name=”_ud_countryid_value “>
{% for ud_country in countries.results.entities %}
<option value=”{{ ud_country.ud_countryid }}”>{{ud_country.ud_name }}</option>
{% endfor %}
??????</select>#
which gives me the GUIDSas values and the right labels, but I am not sure about the column name and/or if this approach can work at all.
From Dynamics:
[email protected] Finnland
_ud_countryid_value@Microsoft.Dynamics.CRM.associatednavigationproperty ud_countryid
[email protected] ud_country
_ud_countryid_value 246b864b-694d-ee11-be6e-6045bd8c5bf9
Thank you in advance.
Best
Kim
]]>Hi,
Sorry I’m new to wordpress and dataverse integrations.
I’m trying to do a test fetching from one table in dataverse:
The field I’m trying to pull is called EmpID with name of cr10b_EmpID. The table name is TestTable
The code I used as shown below:
{% fetchxml collection="usersfetched" cache="PT30M" %}
<fetch mapping='logical' returntotalrecordcount='true'>
<entity name='TestTable'>
<attribute name='cr10b_EmpID'/>
</entity>
</fetch>
{% endfetchxml %}
{% if usersfetched.results.entities|length > 0 %}
<ul>
{% for customer in usersfetched.results.entities %}
<li>{{usersfetched["cr10b_EmpID"]}}</li>
{% endfor %}
</ul>
{% else %}
<p>No usersfetched found.</p>
{% endif %}
It does not prompt anything however I have inserted two records for testing.
Any hints?
Kind regards,
Eric
]]>Hi guys! We have this issue when Dataverse Integration is enabled.
We have this couple of really simple Pods CPTs, with just one custom field for each, a file loader on one, and an URL field on another, but when your plugin is enable, these don’t load properly.
I uploaded some screenshot on this Drive folder:
https://drive.google.com/drive/folders/1KfkaH7PUvtDd0XSPOlOhW8v4vwpZxjpv?usp=sharing
We also found that this issue affects the way this custom fields values are handled on frontend, preventing some buttons to get its values dinamically.
I notified this error to Pods support too.
Hope you can help me on this!
]]>hi need help with the plugin. As soon as you install the plugin the entire site gets corrupted after installing plugin. We have to reset & restore to make it work again
]]>Hi Alexa team,
I have configured a power apps form, and showing lookup fields as Select list. Issue is that there is no empty (like “Select …. “) or null option, once user selects any option then we are not able to unset/empty the lookup (select) field. Can you please suggest any fix for this?
I tried following code, first I added an empty option, and then on submit of the form Im unsetting the select fields, but not working in any case.
//adding an empty option
jQuery(document).ready(function ($) {
$('[id="icds_dropdown_simple"]').each(function () {
var newOption = $("<option>/option>").val("-1").text("– Select –");
$(this).prepend(newOption);
});
});
// the was not working when I select the empty option, then I tried below to unset the select list, on click of the form submit button.
$('[id="icds_dropdown_simple"]').each(function () {
if( $(this).val()=="-1")
{
$(this).prop("selectedIndex", -1);
}
});
Below error is showing when I tried with empty (- Select – ) option
“responseBody”: “[object] (stdClass: {\”error\”:{\”code\”:\”0x80040265\”,\”message\”:\”{\\\”code\\\”:763010003,\\\”status\\\”:0,\\\”message\\\”:\\\”View School Lookup View not found\\\”}\”}})”
]]>I needed to add a file uploader in a custom form, and want to save the file in notes (annotation) entity in CRM. any example please.
{% form entity="contact" mode="create" %}
<form>
<div class="form-group">
<label>
First Name:
<input class="form-control" name="firstname">
</label>
</div>
<div class="form-group">
<label>
Last Name:
<input class="form-control" name="lastname">
</label>
</div>
<div class="form-group">
<label>
Upload a file:
<input type="file" class="form-control" name="file1" >
</label>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">Send</button>
</div>
</form>
{% endform %}
]]>
I needed to place a lookup field on a custom form, and want to show the lookup dialog window as well. is this possible? any example please
{% form entity="contact" mode="create" %}
<form>
<div class="form-group">
<label>
First Name:
<input class="form-control" name="firstname">
</label>
</div>
<div class="form-group">
<label>
Last Name:
<input class="form-control" name="lastname">
</label>
</div>
<div class="form-group">
<label>
Account:
<input class="form-control" name="account" >
</label>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">Send</button>
</div>
</form>
{% endform %}
]]>
THe below code is not working, any help please
[msdyncrm_twig]
<select>
{% for optionMeta in metadata['contact'].Attributes['gendercode'].OptionSet.Options %}
<option value="{{ optionMeta.Value }}">
{{ optionMeta.Label.UserLocalizedLabel.Label }}
</option>
{% endfor %}
</select>
[/msdyncrm_twig]
]]>
Hey I am just getting started, and I am able to write to core tables and managed fields,
In the first case i am trying to write to a custom table called lead:
{% form entity="zwp1_lead" mode="create" recaptcha=false %}
<form>
<div class="form-group">
<label>
First Name:
<input class="form-control" name="zwp1_firstname">
</label>
</div>
</form>
{% endform %}
I then just get the error ‘zwp1_lead’ not supported.
When I try to write to a custom field in the contacts table called x it doesnt write to that field, but all the other standard fields:
{% form entity="contact" mode="create" recaptcha=false message = "Thank for submiting we will get back to you soon" %}
<form>
<div class="form-group">
<label>
First Name:
<input class="form-control" name="firstname">
</label>
</div>
<div class="form-group">
<label>
Last Name:
<input class="form-control" name="lastname">
</label>
</div>
<div class="form-group">
<label>
X:
<input class="form-control" name="cr212_x">
</label>
</div>
<div class="form-group">
<recaptcha>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">Send</button>
</div>
</form>
{% endform %}
Assistance would be appreciated, really like the plugin.
Is there a way of refreshing the connection to DataVerse?
I have two scenarios where it would be helpful: in one following a form entry I really would like to be able to update the data from the connections. In another situation, I make changes to the data in a model driven app and would like a WordPress website user to be able ‘refresh’ the connection/data.
]]>Hi,
when I try to activate the plugin WordPress admin console go down because of a critical error
]]>Hi there,
how would I go about to use multiple parameters passed from an URL. In my case I would have an URL like this:
https://website?id=firstparameter?ac=secondparameter
According to the documentation request.query should contain all queries. However, I am unable to access each parameter individually, as the object contains the query as a string. So it always outputs firstparameter?/ac=secondparameter.
Do I need another delimiter or what would be the correct schema for the url and the twig?
Best
Kim
Hi there,
I am having troubles setting the reCAPTCHA key and secret. Upon entering and clicking on verify it shows the spinner, but never verifies or saves the input.
In another thread I saw that you suggested to check the network info in the browser inspection tools:
I can post the request headers as well, if you tell me, which one would be of interest.
When trying to use the reCAPTCHA in a form and submitting it, it states the following error “Failed to submit the form. Try again later, please.
No secret provided”.
Hope you can help.
Best
Kim
Can this plugin be used to push a live table from PowerBI or DataVerse into WooCommerce and create WooCommerce products?
]]>If I am creating a custom form for updating purposes and want to have it show a yes/no field, do I use this:
{% set options = metadata["contact"].Attributes["gendercode"].OptionSet.Options %}
{% for option in options %}
<li>{{option.Value}} - {{option.Label.UserLocalizedLabel.Label}}</li>
{% endfor %}
Or do I do something else to have it show the “Yes” or “No” in the form field when the form loads?
Thank you.
Joe
When I am creating a new record using a custom form, is there a way to get the ID of the new record once it is created? Am I able to use it with the redirect parameter of the form?
Thank you.
Joe
Is this allowed when creating a custom update form?
{% form entity='contact' mode='update' record='{{ user.reference.Id }}' %}
I keep receiving an error and it’s always having an issue on the record parameter of the form tag.
Something like this:
Failed to submit the form.
Update request failed: Client error: PATCH https://naturebase.crm.dynamics.com/api/data/v9.1/contacts(%7B%7B%20user.reference.Id%20%7D%7D)
resulted in a 400 Bad Request
response with the following message: Bad Request - Error in query syntax.
Thank you.
Joe
I am attempting to understand the user binding feature a bit better.
How exactly do the WordPress users and Dataverse contacts work with each other? Does the WordPress user have to get created to trigger a contact record to be created in Dataverse? Does it only work in that direction or can it work in the other direction?
In regards to the synchronization, if Dataverse the is master system, are changes to first name, last name, full name and email synced back to WordPress when saved?
In the application I am creating, a contact is getting created in Dataverse and when created I’d like to be able to trigger WordPress to create a new user.
Is that possible?
Thank you.
Joe
As part of this project I’m working on, the user would like to be able to upload pictures when creating a new project.
Thinking about this growing over time and hitting the Dataverse size limitations of the database, is there a way to upload pictures to the WordPress file system instead and somehow connect them to the Dataverse record?
Thank you.
Joe
If I am passing a GUID in a querystring, how can I use it in a form field to create a new record?
My scenario is passing a project ID to another page. I want to use that project’s GUID in a form field to create a new record.
I created the form and set the default value to the GUID from the querystring. When I submit the form, I receive a fatal error.
It feels like the premium plugin would just handle this for me, but I am working on this as a demo and can’t purchase the plugin just yet.
Thank you.
Joe
Do I need to use the premium version of the plugin to be able to pass a GUID from a list of records to a detail page?
I was reading previous forum posts and I feel like it’s possible, but when I try it, I just get a blank page back.
My FetchXML is correct — since it runs in FetxhXML Builder just fine — but even hard coding the GUID in the condition returns no results.
This is all of my Twig and HTML:
{% set projectid = request.params['id'] %}
{% fetchxml collection="project" %}
<fetch mapping="logical" returntotalrecordcount="true">
<entity name="jcma_project">
<attribute name="jcma_projectid" />
<attribute name="jcma_name" />
<attribute name="jcma_difficulty" />
<attribute name="jcma_projectdescription" />
<attribute name="jcma_requiredpreferredskills" />
<attribute name="jcma_city" />
<attribute name="jcma_stateprovince" />
<filter type="and">
<condition attribute="jcma_projectid" operator="eq" value="{{ projectid }}" />
</filter>
</entity>
</fetch>
{% endfetchxml %}
{% for projectdetail in project.entities.results %}
<div>
<h1>{{ projectdetail["jcma_name"] }}</h1><br>
<i>{{ projectdetail["jcma_city"] }}, {{ projectdetail | formatted_value(["jcma_stateprovince"]) }}</i>
</div>
<div>
<h3>Description</h3><br>
<p>{{ projectdetail["jcma_projectdescription"] }}</p>
</div>
<div>
<h3>Required or Preferred Skills</h3><br>
<p>{{ projectdetail["jcma_requiredpreferredskills"] }}</p>
</div>
{% endfor %}
Any assistance would be appreciated.
Joe
I am creating records in Dataverse from functions.php, but I am not understanding how to actually UPDATE a record that was just created.
After WooCommerce completes an order, I create the account record in Dataverse:
$order = wc_get_order($order_id);
$client = ConnectionService::instance()->getClient();
$account = new Entity( ‘account’ );
$account[‘name’] = $order->get_billing_company();
$account[‘address1_line1’] = $order->get_billing_address_1();
$account[‘address1_line2’] = $order->get_billing_address_2();
$account[‘address1_city’] = $order->get_billing_city();
$account[‘address1_stateorprovince’] = $order->get_billing_state();
$account[‘address1_postalcode’] = $order->get_billing_postcode();
$account[‘address1_country’] = $order->get_billing_country();
$account[‘telephone1’] = $order->get_billing_phone();
$accountId = $client->Create( $account );
Then I create a contact:
$contact = new Entity( ‘contact’ );
$contact[‘firstname’] = $order->get_billing_first_name();
$contact[‘lastname’] = $order->get_billing_last_name();
$contact[’emailaddress1′] = $order->get_billing_email();
*** $contact[‘parentcustomerid’] = $accountId; ***
$contactId = $client->Create( $contact );
It all works great (thanks George and team!) — except for the starred line above. I want to link the contact to the account just created. Then I also want to update the Account to have the primary contact be the contact just created.
I don’t understand how to do those two things.
Any guidance would be really helpful.
Thank you.
Joe
I am making some modifications to WooCommerce pages and need to use functions.php to do it.
I know I can use echo do_shortcode('[icds_twig]');
and echo do_shortcode('[/icds_twig]');
but then how can I put the other twig code between that?
Am attempting to add pages to the My Account page of WooCommerce, but I need to pull some data from Dataverse in these pages.
Alternatively, can I create the pages I need using the block editor and then somehow call those pages from functions.php?
Thank you.
Joe
I am getting this type of error. How can resolved it?
Unexpected error: An error occurred when processing the security tokens in the message:You are using Ws-Trust authentication which has been deprecated and no longer supported in your environment. Please use OAuth2.0 authentication and refer https://aka.ms/dvwsdep.
I hardcoded a variable “user” as a guid which is equal to logged in user. When i use the hardcoded variable the data gets just fine, however, when i try using the userlogin variable, it fails. However, it shows the same value when i print both variables.
{% set user = “b5f6d824-c8a6-ec11-983f-00224884c115” %}
//essentially the user_login method is getting the same guid so userlogin and user variables should be the same
{% set userlogin = “[user_login]” %}
{% if userlogin is same as user %}
the variables are the same {% else %} the variables are different
{% endif %}
{% fetchxml collection=’communications’ cache=’PT3S’ %}<fetch mapping=’logical’ returntotalrecordcount=’true’><entity name=’ps_websitecommunication’><filter> <condition attribute=’ps_cou_contact’ operator=’eq’ value = ‘{{“#{userlogin}”}}’/></filter></entity></fetch>
{% endfetchxml %}
{% if communications.results.entities|length > 0 %} <table width=’100%’ border=’1′ style=’border-collapse:collapse;width=100%;table-layout:fixed’><tbody><tr style=’background-color:Green;color:white;’><th width=’25%’>Type</th><th width=’25%’>Date</th><th width=’25%’>Reference </th><th width=’25%’>Download Link</th></tr>{% for communication in communications.results.entities %} <tr><td>{{communication[‘ps_communicationtype’]}}</td><td>{{communication[‘createdon’]|date(‘d F Y’)}}</td><td>{{communication[‘cre6e_communicationreference’]}}</td><td> Click to open </td></tr>{% endfor %}</tbody></table>{% else %}<p>No communications found.</p>{% endif %}
]]>