josephmarkovich
Forum Replies Created
-
Forum: Plugins
In reply to: [DataPress (Dataverse Integration)] Forms with yes/no fieldsSo am I essentially doing something like this?
{% set optionfalse = metadata["contact"].Attributes["jcma_showonexpertdirectory"].BooleanOptionSet.FalseOption %} {% set optiontrue = metadata["contact"].Attributes["jcma_showonexpertdirectory"].BooleanOptionSet.TrueOption %}And then to get the data in the form, this?
<option value=”{{ optionfalse.Value }}”>{{ optionfalse.Label }}</option>
Or do I need do a for loop like other option sets?
Thank you.
JoeForum: Plugins
In reply to: [DataPress (Dataverse Integration)] Get ID of record created with custom formHi George-
I am able to use the %s parameter to redirect to my page and it is the correct guid.
So, thank you!
JoeForum: Plugins
In reply to: [DataPress (Dataverse Integration)] Form updateI can’t believe it was that simple of a fix. Thank you!!!
Joe
Forum: Plugins
In reply to: [DataPress (Dataverse Integration)] GUID in querystring to use in formHi George-
Thanks for the help with that! That was part of it. The other part was the missing quotes around the GUID.
{ "LogicalName": "jcma_project", "Id": "9fee4671-5fca-ec11-a7b5-000d3a998753" }
{ "LogicalName": "contact", "Id": "258cc37a-2dd2-ec11-a7b5-0022481ce6f7" }It would help if I had read the documentation closer!
{ "LogicalName": "contact", "Id": "00000000-0000-0000-0000-000000000000" }Thank you!
JoeForum: Plugins
In reply to: [DataPress (Dataverse Integration)] GUID in querystring to use in formHi George-
Thanks for the guidance here. I’ve just been able to get back to this project again.
These are my two form fields:
{% form entity="jcma_projectvolunteer" mode="create" %} <form> <div class="form-group"> <input type="form-control" name="jcma_project" value='{ "LogicalName": "jcma_projectvolunteer", "Id": {{projectid}} }'> </div> <div class="form-group"> <input type="form-control" name="jcma_contact" value='{ "LogicalName": "jcma_projectvolunteer", "Id": {{contactid}} }'> </div> <div class="form-group"> <button type="submit" class="btn btn-primary">Join This Project</button> </div> </form> {% endform %}When I load the page and look at the two fields, this is what is filled in:
Project:
{ “LogicalName”: “jcma_projectvolunteer”, “Id”: 9fee4671-5fca-ec11-a7b5-000d3a998753 }Contact:
{ “LogicalName”: “jcma_projectvolunteer”, “Id”: 258cc37a-2dd2-ec11-a7b5-0022481ce6f7 }When I submit, it gives me this really nasty error:
Failed to submit the form.
There has been a critical error on this website.How can I look at some error checking or find out what is causing this to fail?
Thank you.
JoeForum: Plugins
In reply to: [DataPress (Dataverse Integration)] GUID in querystring to use in formI am trying to set a lookup field.
Joe
Forum: Plugins
In reply to: [DataPress (Dataverse Integration)] Fill in lookup field once record createdThank you George!
Joe
Forum: Plugins
In reply to: [DataPress (Dataverse Integration)] Fill in lookup field once record createdIf I’ve created the Account and the Contact — and then I need to update the Account to set the Primary Contact of the contact just created, how do I do that?
I tried this and not correct:
$account['primarycontactid'] = new EntityReference('contact', $contactId); $accountId = $client->Update( $accountId );$accountId is the account created previously in the code.
Thank you.
JoeForum: Plugins
In reply to: [DataPress (Dataverse Integration)] Passing GUID in querystringThanks for the reminder about permissions! This fixed another issue I was having and forgot about that.
Ran the FetchXML in FetchXML Builder that was generated from
<pre>{{ project.xml }}</pre>and it’s returning an error “expected non-empty string.”I don’t know what that means. I’ve recreated the FetchXML in FetchXML Builder and copy/pasted back to the WordPress page. Still blank.
I know this is something silly I am missing here.
Joe
Forum: Plugins
In reply to: [DataPress (Dataverse Integration)] Twig in functions.phpPerfect! Thank you so much!
JoeSomehow, I managed to get everything working and besides the line break thing, I removed all of the security to the application user in Power Apps and then put it all back. It’s reading the data now.
Thank you for all the help George.
Joe
Progress!
So, the Power App I am developing doesn’t using the Account table, but it uses the Contact table, so I changed your URL above to contacts instead. It returns the top 2.
In WordPress, it doesn’t return anything, but I made this change to the twig:
It was this:
{% fetchxml collection=”exhibits” cache=”PT30M” %}
<fetch top=”2″><entity name=”contact”><all-attributes/></entity></fetch>
{% endfetchxml %}Now it is this (all on one line):
{% fetchxml collection=”exhibits” cache=”PT30M” %}<fetch top=”2″><entity name=”contact”><all-attributes/></entity></fetch>{% endfetchxml %}
No more FetchXML errors! But it still doesn’t return any data.
Will the debug logs uncover anything else? I have downloaded them from the server.
Joe
I copy/pasted it to Notepad, took out all of the lines and put it all on one line.
<fetch><entity name=”bsdepot_exhibit”><all-attributes/></entity></fetch>
Even though it is showing the fancy quotes above, they are plain text quotes in WordPress.
Still get the error.
Is there possibly something wrong with my Power App?
Joe
I am really sorry to be a huge pain here…so my fetch looks like this:
<fetch distinct=”false” mapping=”logical” output-format=”xml-platform” version=”1.0″>
<entity name=”bsdepot_exhibit”>
<attribute name=”bsdepot_exhibitid”/>
<attribute name=”bsdepot_exhibitname”/>
<attribute name=”bsdepot_exhibittext”/>
<order descending=”false” attribute=”bsdepot_exhibitname”/>
</entity>
</fetch>Copy/pasted this from exporting the XML in Advanced Find and I still receive that error in the thread above.
Joe
Here is what it returns:
Malformed FetchXML query: could not locate the <entity/> element or entity name not specified
Joe