Turn a single partylist field into multiple - dynamics-crm

Is there a way to transform a partylist field like Customer in a Campaign Response to allow for multiple Contacts/Accounts/Leads?
Although unsupported, I now from Jian Wang that some attributes of the lookup can be modified in the onload() event like this:
crmForm.all.customer.setAttribute("lookuptypes", "1,2");
Is there a similiar attribute that would turn this into a field that allows multiple participants like the To field in an e-mail?
Thank you

I finally found an easy (though unsupported) way of doing this. It doesn't require Javascript code, by the way. I just exported the entity CampaignResponse and edited the XML. Then searched the attribute (Customer) and element LookupStyle
<attribute PhysicalName="Customer">
...
<LookupStyle>single</LookupStyle>
...
</attribute>
Changed the value to multi
<attribute PhysicalName="Customer">
...
<LookupStyle>multi</LookupStyle>
...
</attribute>
Reimported, and it worked!

Related

admin-on-rest CreateButton doesn't pass record id of form

I am using ReferenceManyField to show the items in an order, the typical master/detail database pattern. I am able to edit existing detail records, but can't find a way to add new detail records. I tried the following, but doesn't receive {id} like does. I notice that admin-on-rest-demo allows editing of detail records (reviews of products), but does not allow adding of reviews. Is there a pattern or workaround to do this?
<SimpleForm>
<ReferenceManyField label="ITEMS" reference="orderitems" target="orderId">
<Datagrid>
// fields removed for clarity...
<CreateButton/> <===== does not pass {id} of form record
<EditButton/> <===== passes {id} of form record
</Datagrid>
</ReferenceManyField>
</SimpleForm>
I answered this question here:
Example: https://codesandbox.io/s/pp0o4x40p0
The relevant code parts are:
the CreateCommentButton component inside src/posts.js
the CommentCreate component inside src/comments.js (note how we set the defaultValue prop on SimpleForm)

Mapping existing resource to hl7-fhir response

Trying to understand the concept of the code datatype in hl7-fhir. Looking at the appointment (https://www.hl7.org/fhir/appointment.html) resource as an example it has a status parameter with suggested values of "proposed | pending | booked" etc.
Given an existing database with it's own custom status' (Attended, Confirmed, Attended but late) what is the correct way to handle a hl7-fhir response to a consumer?
If the "code" data type is used, then the FHIR binding strength is always "required" - which means you are required to use the FHIR-defined list of codes and no others.
It appears that two of your statuses - "Attended" and "Attended but late" aren't actually statuses of the appointment - the booking, but are instead commentary about the resulting encounter. So I would capture those as extensions. "confirmed" sounds similar to "booked", though I'd need to know the definition to know for sure. Do you have any appointment statuses for appointments that are not yet confirmed (let alone attended)?
To extend on Lloyds notes, you will want to put the extension under the status property, and map your existing values to the provided FHIR values, and put your local actual value in the extension underneath.
This way when other systems read the resource and don't know about your extension status values, they will still be able to act sensibly based on the core values.
<status value="fulfilled">
<extension url="http://yourorg.com/fhir/.../ExtendedAppointmentStatuses">
<valueCoding>
<code value="abl" />
<display value="Attended but late" />
</valueCoding>
</extension>
</status>

Retrieve data from Dynamics CRM Online custom report through API

I am trying to read data from a custom report in CRM Online through the API.
I have no problem fetching data like competitors, accounts using
OrganizationService.RetrieveMultiple()
But when it comes to custom reports, I can't find a way. The report I would like to read is found in the CRM web interface under Dashboard -> (My organization) -> Reports.
I hope someone can point me in the right direction. Thanks!
I am also interested in this. Did you ever figure it out?
Sorry about not leaving this as comment, but apparently I don't have permissions.
Actually, I may have stumbled on the solution.
I noticed that when you download the report definition it has a field called d:CustomReportXml. In my custom reports this field contains XML code.
<d:CustomReportXml><CustomReport><Language>1033</Language><Query><fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"><entity name="appointment"><attribute name="createdby" alias="createdby" /><attribute name="createdon" alias="createdon" /></entity></fetch></Query><Groupings /><Columns><Column ID="createdby0" Field="createdby" Width="100" /><Column ID="createdon0" Field="createdon" Width="100" AddRawValueColumn="true" /></Columns><TableLayout Display="Normal" /></CustomReport></d:CustomReportXml>
inside the XML is a fetch tag
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false"><entity name="appointment"><attribute name="createdby" alias="createdby" /><attribute name="createdon" alias="createdon" /></entity></fetch>
I have been able to parse this out and pass it back to dynamics via the api and get back results. I am using http://www.xrmtoolbox.com/ to test the results and so far things look promising.
I can also add a filter to the fetchXML so I don't end up with too much data.
I hope it helps you.

How to specify composite action variables in magento dataflow xml profiles

I have created some custom actions to use inside a Magento Dataflow profile. I would like to pass in composite parameter values (arrays or dictionaries) to the action, similar to the map var you can pass to the default parser actions. I.e., I would like to do something like this:
<var name="attribute_map">
<map name="sColore"><![CDATA[colore]]></map>
<map name="sMarca"><![CDATA[marca]]></map>
<map name="sFornitore"><![CDATA[fornitore]]></map>
</var>
The variable turns out as null in this case, although, upon fiddling with the xml and skimming through the code, it seems that this pattern only works with <var name="map">. Puzzling and disappointing. I also have not been able to find even the slightest hint about the relevant xml schema in any documentation whatsoever...
Any idea on this? Thanks!
(I am working with Community Edition version 1.7.0.2)
If i understand right what you ask, you could overwrite the system/convert/profile/wizard.phtml from admin and add another section similar to existing map but the form elements should have name="gui_data[attribute_map]...[]".
Then you should overwrite the _parseGuiData method from Mage_Dataflow_Model_Profile to form the correct profile actions xml.
Hope that helps.
You can't, using the core implementation.
The var elements can only contain simple text, unless the element has the attribute name="map", in which case the profile parser will search for children map elements and use them to populate a php associative array.
The relevant code is inside the importProfileXml method of the Mage_Dataflow_Model_Convert_Profile_Collection class:
if ($varNode['name'] == 'map') {
$mapData = array();
foreach ($varNode->map as $mapNode) {
$mapData[(string)$mapNode['name']] = (string)$mapNode;
}
$container->setVar((string)$varNode['name'], $mapData);
}
To extend this behavior you should override this class with a custom (sub)class through the usual magento class override methods.

How to sort data from DropDownList component?

I'm developing a simple Web App which has a simple data from some employees, such as ID, NAME and so on. Thus, I'm using a XML file as my database. Yet, my XML file is sorted by the Employees' ID.
However, I'm using a to select the Employee's Name and show some informations about him/her, but when I created the bindable data through my spark component (I just "drag-and-drop" my XML file into the component), I'd like to show those names sorted by Name and this is my problem.
It's suppose to be a simple code, but I'm in trouble with it... lol!
<s:DropDownList id="ddNome"
labelField="NomeFuncionario" <!-- Employees' Name -->
textAlign="justify"
width="240" height="25"
top="30" horizontalCenter="0"
initialize="sortName(event)" <!-- Trying to create it now... -->
creationComplete="cbNome_creationCompleteHandler(event)"
change="cbNome_changeHandler(event)">
<s:AsyncListView list="{getDataResult2.lastResult}"/>
</s:DropDownList>
I'd be really grateful for any help with this code.
you can try something like this
<mx:XMLListCollection id="xmlListColl"
source="{getDataResult2.lastResult}">
<mx:sort>
<mx:Sort>
<mx:fields>
<mx:SortField id="sortField"
name="#NomeFuncionario"
caseInsensitive="true" />
</mx:fields>
</mx:Sort>
</mx:sort>
</mx:XMLListCollection>
...
<s:AsyncListView list="{xmlListColl}"/>
...

Resources