Forum Replies Created

Viewing 15 replies - 1 through 15 (of 19 total)
  • Thread Starter kimineko

    (@kimineko)

    Thank you – the simplified syntax worked for me.

    Thread Starter kimineko

    (@kimineko)

    That does not work either, unfortunately.

    Thread Starter kimineko

    (@kimineko)

    A very simple solution ?? thank you

    Thread Starter kimineko

    (@kimineko)

    Hi,

    [icds_twig]
    {{ request.params["id"] }}
    {{ request.params["ac"] }}
    [/icds_twig]

    used with the following URL:
    https://mywebsite.com/institut/kontakt/confirm?id=testid?ac=testac

    returns
    testid?ac=testac for id and nothing for ac.

    It seems like the second ? is for some reason converted to “%3Fac%3D” – see the results of the following:

    [icds_twig]
    <table>
    <tr><td style="wdith: 300px;">params</td><td style="overflow-wrap: anywhere;">{{ request.params |join }}</td></tr>
    <tr><td>params id</td><td>{{ request.params["id"] }}</td></tr>
    <tr><td>params ac</td><td>{{ request.params["ac"] }}</td></tr>
    <tr><td>path</td><td>{{ request.path }}</td></tr>
    <tr><td>path_and_query</td><td>"{{ request.path_and_query }}</td></tr>
    <tr><td>query</td><td>{{ request.query }}</td></tr>
    <tr><td>url</td><td>{{ request.url }}</td></tr>
    </table>
    [/icds_twig]

    returns

    
    params	{stamp:\'2yCBUwSIBd3Q4BK/vJyH1VYL2u/jFvkOMYdb9okBae9xm8RPAUIYDA==\',necessary:true,preferences:true,statistics:true,marketing:true,
    method:\'explicit\',ver:1,utc:1673555372631,region:\'de\'}44583ad0-beaa-4756-86e3-d51ae384bf41000cb5GA1.2.980823569.1678692787libraryContent=browse&ampampampeditor=html&ampampampeditor_expand=off&ampampampunfold=1&ampampampmfold=
    o&ampampampimgsize=thumbnail&ampampamped_size=487&ampampampposts_list_mode=excerpt&ampampamphidetb=0&imgsize=&mfold=o&unfold=1&posts_list_mode
    =excerpt&editor_expand=off&editor=html16786982561WP Cookie checki6003931|1679037413|MhnnJDZ9buVk4eY5ImpjmL5ThXeHkzbCTQWzlD4aaFI|99abaae5450195889f8a6dc86woo:QMoEVaoE0tPSImCI8yLL1GHe16486a82547087016eeecdce31a53e3991||1679037430||1679033830||e766579b11678867259.0.0.0testid?ac=testac
    params id	testid?ac=testac
    params ac	
    path	/institut/kontakt/confirm
    path_and_query	"/institut/kontakt/confirm?id=testid?ac=testac
    query	?id=testid%3Fac%3Dtestac
    url	https://mywebsite.com/institut/kontakt/confirm?id=testid%3Fac%3Dtestac
    • This reply was modified 1 year, 8 months ago by kimineko.
    • This reply was modified 1 year, 8 months ago by kimineko.
    Thread Starter kimineko

    (@kimineko)

    Thank you! That was excatly what I was looking for.

    Kind regards
    Kim

    Thread Starter kimineko

    (@kimineko)

    Hi,

    thank you for the quick reply.

    I implemented it as described, but that gives me the whole optionset as a dropdown. What I need is to just display the fields label as set on the record.

    To clarify I am not trying to display a form but the results of a FetchXML-query.

    The information is present in the dump of said query – e.g. [“udc_executionmode”]=> string(18) “virtuelle Pr?senz” where the string is what I need to output for each record.

    Could you help me with that?

    Best
    Kim

    • This reply was modified 2 years, 9 months ago by kimineko.
    Thread Starter kimineko

    (@kimineko)

    I managed to get it to work in two ways. Using a pure fetch for the first query and a view for the nested on as well as by only using fetchxmls instead of the views. So it seems that your suspicion, that system fields are not passed when using views, was right.

    Not sure if that is intended behavior. Either way I am happy with the solution and thank you very much for the help.

    For people interested in it, this is the working twig:
    final-result

    [msdyncrm_twig]{% fetchxml collection="seminare" cache="P1D" %}
    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
       <entity name="ud_tutorial">
          <attribute name="ud_name" />
          <order attribute="ud_startdatetime" descending="false" />
          <filter type="and">
             <condition attribute="udc_seminartypeid" operator="eq" uiname="BAM - Basic Agile Master" uitype="udc_seminartype" value="{69079430-E630-EB11-A813-000D3A201451}" />
             <condition attribute="statuscode" operator="eq" value="100000000" />
             <condition attribute="ud_startdatetime" operator="next-x-years" value="2" />
             <condition attribute="ineko_seminar_type" operator="ne" value="745500003" />
             <condition attribute="ud_companycoaching" operator="ne" value="1" />
          </filter>
          <attribute name="ud_startdatetime" />
          <attribute name="ud_enddatetime" />
          <attribute name="udc_executionmode" />
          <attribute name="ineko_booking_status" />
          <link-entity alias="a_adbc3862af6aea11a811000d3a20090f" name="udc_seminartype" from="udc_seminartypeid" to="udc_seminartypeid" link-type="outer" visible="false">
             <attribute name="udc_workshopsdays" />
          </link-entity>
          <attribute name="ud_tutorialid" />
       </entity>
    </fetch>
    {% endfetchxml %}
    <table class="crm-table-seminars striped">
       <thead class="">
          <tr class="crm-table-th">
             <th style="min-width:70px;">Kurs</th>
             <th style="padding-right:5px!important">Tage</th>
          </tr>
       </thead>
       <tbody>
          {% for ud_tutorial in seminare.results.entities %}
          {% set seminar_var = ud_tutorial.ud_tutorialid %}
          <tr>
             <td>{{ ud_tutorial.ineko_booking_status }}   {{ ud_tutorial.ud_name }}  {% if ud_tutorial.udc_executionmode == "virtuelle Pr?senz" %}&nbsp;<span class="p-grey"><i class="fa fa-desktop" aria-hidden="true"></i></span>{% else %}(Pr?senz){% endif %}</td>
             <td>
                {% fetchxml collection="seminartage" cache="P1D" %}
                <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
                   <entity name="ud_submodule">
                      <attribute name="ud_submodulename" />
                      <attribute name="ud_tutorialid" />
                      <attribute name="ud_seminarday" />
                      <order attribute="ud_submodulename" descending="false" />
                      <link-entity name="ud_tutorial" from="ud_tutorialid" to="ud_tutorialid" alias="aa">
                         <filter type="and">
                            <condition attribute="ud_tutorialid" operator="eq" uitype="ud_tutorial" value="{{ seminar_var }}" />
                         </filter>
                      </link-entity>
                      <attribute name="ineko_weekday" />
                      <attribute name="udc_topic" />
                      <attribute name="ineko_seminarday_start_hour" />
                      <attribute name="ineko_seminarday_start_minutes" />
                      <attribute name="ud_seminardaystart" />
                      <attribute name="ineko_seminarday_end_hour" />
                      <attribute name="ineko_seminarday_end_minutes" />
                      <attribute name="ud_seminardayend" />
                      <attribute name="ud_submoduleid" />
                   </entity>
                </fetch>
                {% endfetchxml %} 
                <table class="unstyled-table">
                   <tbody>
                      {% for ud_submodule in seminartage.results.entities %} 
                      <tr>
                         <td>{{ ud_submodule.ineko_weekday}}, {{ ud_submodule.ud_seminarday | date('d.m.Y') }} ({{ ud_submodule.ineko_seminarday_start_hour}}  – {{ ud_submodule.ineko_seminarday_end_hour}} Uhr)
                         </td>
                      </tr>
                      {% endfor %}
                   </tbody>
                </table>
             </td>
          </tr>
          {% endfor %}
       </tbody>
    </table>
    [/msdyncrm_twig]
    • This reply was modified 2 years, 9 months ago by kimineko.
    Thread Starter kimineko

    (@kimineko)

    I created a new view, as you suggested (screenshot attached). However, In that case I receive the following error:

    Unexpected error: An exception has been thrown during the rendering of a template ("An exception System.FormatException was thrown while trying to convert input value '{}' to attribute 'ud_tutorial.ud_tutorialid'. Expected type of attribute value: System.Guid. Exception raised: Expected hex 0x in '{0}'.") in "template_707649dd643caee35e9a5ce6461bc1935d3fe8cb" at line 1.

    fetchxmlsandresultswithlookup

    However, it seems that system added attributes are not passed to the view. If I replace ud_tutorial with another attribute from the view I receive the following error:

    Unexpected error: An exception has been thrown during the rendering of a template ("An exception System.FormatException was thrown while trying to convert input value '{BAM2203-III}' to attribute 'ud_tutorial.ud_tutorialid'. Expected type of attribute value: System.Guid. Exception raised: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).") in "template_01e083ecc4a6097e83fbbd717a11ab850ccfcda6" at line 1.

    Thread Starter kimineko

    (@kimineko)

    Hi George,

    the issue is not really with the ud_tutorialid, although I tried that first, but with the fact that I need to set a parameter of a view dynamically. That parameter could be ud_tutorialid (in which case it is a lookup field) or a simple text field.

    As it is easier to check, I decided to use the field ud_name from the first entity. It is set correctly as the variable for each row and if I hardcode it into the parameter also the subsequent view displays the correct resutls, just not when I set the variable as the parameter. Thus, I believe the issue is with either how I use the parameter or it is a general limitation with regard to dynamically setting a parameter for a view.

    For clarification I tried to write it down in Excel – here I used the id, but I have tested both.

    Screenshot-2022-02-08-120823<br /><br />

    • This reply was modified 2 years, 9 months ago by kimineko.
    Thread Starter kimineko

    (@kimineko)

    Hi George,

    sorry for the late reply. I’ll copy-in the twig, the dump as well as the fetchxml of the view below – the id is not part of the dump and is also not printed when I use the variable as you suggested. However, I believe even if it would work, this would not solve my issue that I cannot use the variable’s output in a subsequent view.

    ud_tutorialid for the record below would be 513600e0-8b38-ec11-8c64-000d3a2cdd5f

    FetchXML

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
      <entity name="ud_tutorial">
        <attribute name="ud_name" />
        <attribute name="ud_startdatetime" />
        <attribute name="ud_enddatetime" />
        <attribute name="udc_executionmode" />
        <attribute name="ineko_booking_status" />
        <attribute name="ud_tutorialid" />
        <order attribute="ud_startdatetime" descending="false" />
        <filter type="and">
          <condition attribute="udc_seminartypeid" operator="eq" uiname="BAM - Basic Agile Master" uitype="udc_seminartype" value="{69079430-E630-EB11-A813-000D3A201451}" />
          <condition attribute="statuscode" operator="eq" value="100000000" />
          <condition attribute="ud_startdatetime" operator="next-x-years" value="2" />
          <condition attribute="ineko_seminar_type" operator="ne" value="745500003" />
          <condition attribute="ud_companycoaching" operator="ne" value="1" />
        </filter>
        <link-entity name="udc_seminartype" from="udc_seminartypeid" to="udc_seminartypeid" visible="false" link-type="outer" alias="a_adbc3862af6aea11a811000d3a20090f">
          <attribute name="udc_workshopsdays" />
        </link-entity>
      </entity>
    </fetch>

    Twig

    [msdyncrm_twig]
    {% view entity="ud_tutorial" name="MyView" count="15" cache="PT60M" %}
    <table>
       <tbody>
         <th>Foo (ud_tutorialid)</th>
         <th>seminar_var (ud_name)</th>
         <th style="width:95%">Dump</th>
          {% set seminar_var = null %}
          {% for recordId, record in entityview.rows %}
          {% set foo = record.ud_tutorialid %}
          {% set seminar_var = record.ud_name %}
          <tr>
             <td>{{ foo.id }}</td><td>{{ seminar_var.value }}</td><td>{{ dump(record) }}</td>
          </tr>
          {% endfor %}
       </tbody>
    </table>
    {% endview %}
    [/msdyncrm_twig]

    Dump

    Foo (ud_tutorialid)	seminar_var (ud_name)	Dump
    BAM2203-III	array(6) { ["ineko_booking_status"]=> array(4) { ["head"]=> string(14) "Buchungsstatus" ["value"]=> string(4) "??" ["properties"]=> object(AlexaCRM\CRMToolkit\Entity\Attribute)#31276 (20) { ["logicalName"]=> string(20) "ineko_booking_status" ["label"]=> string(14) "Buchungsstatus" ["localizedLabel"]=> array(1) { [1031]=> string(14) "Buchungsstatus" } ["description"]=> string(0) "" ["format"]=> string(0) "" ["maxLength"]=> int(0) ["isCustom"]=> bool(true) ["imeMode"]=> string(0) "" ["isPrimaryId"]=> bool(false) ["isPrimaryName"]=> bool(false) ["type"]=> string(8) "Picklist" ["isLookup"]=> bool(false) ["isValidForCreate"]=> bool(true) ["isValidForUpdate"]=> bool(true) ["isValidForRead"]=> bool(true) ["requiredLevel"]=> string(4) "None" ["attributeOf"]=> string(0) "" ["optionSet"]=> object(AlexaCRM\CRMToolkit\Entity\OptionSet)#31275 (8) { ["name"]=> string(38) "ineko_ud_tutorial_ineko_booking_status" ["type"]=> string(8) "Picklist" ["displayName"]=> string(14) "Buchungsstatus" ["localizedDisplayName"]=> array(1) { [1031]=> string(14) "Buchungsstatus" } ["description"]=> string(0) "" ["options"]=> array(5) { [745500004]=> string(3) "?" [745500000]=> string(4) "??" [745500001]=> string(4) "??" [745500002]=> string(4) "??" [745500003]=> string(6) "??" } ["localizedOptions"]=> array(5) { [745500004]=> array(1) { [1031]=> string(3) "?" } [745500000]=> array(1) { [1031]=> string(4) "??" } [745500001]=> array(1) { [1031]=> string(4) "??" } [745500002]=> array(1) { [1031]=> string(4) "??" } [745500003]=> array(1) { [1031]=> string(6) "??" } } ["isGlobal"]=> bool(false) } ["lookupTypes"]=> NULL ["dateTimeBehavior"]=> NULL } ["formatted_value"]=> string(4) "??" } ["ud_name"]=> array(4) { ["head"]=> string(18) "Ausbildungskürzel" ["value"]=> string(11) "BAM2203-III" ["properties"]=> object(AlexaCRM\CRMToolkit\Entity\Attribute)#31301 (20) { ["logicalName"]=> string(7) "ud_name" ["label"]=> string(18) "Ausbildungskürzel" ["localizedLabel"]=> array(1) { [1031]=> string(18) "Ausbildungskürzel" } ["description"]=> string(34) "Der Name der angepassten Entit?t." ["format"]=> string(4) "Text" ["maxLength"]=> int(100) ["isCustom"]=> bool(true) ["imeMode"]=> string(4) "Auto" ["isPrimaryId"]=> bool(false) ["isPrimaryName"]=> bool(true) ["type"]=> string(6) "String" ["isLookup"]=> bool(false) ["isValidForCreate"]=> bool(true) ["isValidForUpdate"]=> bool(true) ["isValidForRead"]=> bool(true) ["requiredLevel"]=> string(19) "ApplicationRequired" ["attributeOf"]=> string(0) "" ["optionSet"]=> NULL ["lookupTypes"]=> NULL ["dateTimeBehavior"]=> NULL } ["formatted_value"]=> string(11) "BAM2203-III" } ["udc_executionmode"]=> array(4) { ["head"]=> string(28) "Durchführungsform (geplant)" ["value"]=> string(18) "virtuelle Pr?senz" ["properties"]=> object(AlexaCRM\CRMToolkit\Entity\Attribute)#31763 (20) { ["logicalName"]=> string(17) "udc_executionmode" ["label"]=> string(28) "Durchführungsform (geplant)" ["localizedLabel"]=> array(1) { [1031]=> string(28) "Durchführungsform (geplant)" } ["description"]=> string(0) "" ["format"]=> string(0) "" ["maxLength"]=> int(0) ["isCustom"]=> bool(true) ["imeMode"]=> string(0) "" ["isPrimaryId"]=> bool(false) ["isPrimaryName"]=> bool(false) ["type"]=> string(8) "Picklist" ["isLookup"]=> bool(false) ["isValidForCreate"]=> bool(true) ["isValidForUpdate"]=> bool(true) ["isValidForRead"]=> bool(true) ["requiredLevel"]=> string(4) "None" ["attributeOf"]=> string(0) "" ["optionSet"]=> object(AlexaCRM\CRMToolkit\Entity\OptionSet)#31698 (8) { ["name"]=> string(17) "udc_executionmode" ["type"]=> string(8) "Picklist" ["displayName"]=> string(18) "Durchführungsform" ["localizedDisplayName"]=> array(1) { [1031]=> string(18) "Durchführungsform" } ["description"]=> string(0) "" ["options"]=> array(3) { [752400000]=> string(8) "Pr?senz" [752400001]=> string(18) "virtuelle Pr?senz" [752400002]=> string(6) "Hybrid" } ["localizedOptions"]=> array(3) { [752400000]=> array(1) { [1031]=> string(8) "Pr?senz" } [752400001]=> array(1) { [1031]=> string(18) "virtuelle Pr?senz" } [752400002]=> array(1) { [1031]=> string(6) "Hybrid" } } ["isGlobal"]=> bool(true) } ["lookupTypes"]=> NULL ["dateTimeBehavior"]=> NULL } ["formatted_value"]=> string(22) "virtuelle Pr&auml;senz" } ["ud_startdatetime"]=> array(4) { ["head"]=> string(10) "Startdatum" ["value"]=> string(10) "1646265600" ["properties"]=> object(AlexaCRM\CRMToolkit\Entity\Attribute)#31822 (20) { ["logicalName"]=> string(16) "ud_startdatetime" ["label"]=> string(10) "Startdatum" ["localizedLabel"]=> array(1) { [1031]=> string(10) "Startdatum" } ["description"]=> string(0) "" ["format"]=> string(8) "DateOnly" ["maxLength"]=> int(0) ["isCustom"]=> bool(true) ["imeMode"]=> string(4) "Auto" ["isPrimaryId"]=> bool(false) ["isPrimaryName"]=> bool(false) ["type"]=> string(8) "DateTime" ["isLookup"]=> bool(false) ["isValidForCreate"]=> bool(true) ["isValidForUpdate"]=> bool(true) ["isValidForRead"]=> bool(true) ["requiredLevel"]=> string(4) "None" ["attributeOf"]=> string(0) "" ["optionSet"]=> NULL ["lookupTypes"]=> NULL ["dateTimeBehavior"]=> string(9) "UserLocal" } ["formatted_value"]=> string(10) "03.03.2022" } ["ud_enddatetime"]=> array(4) { ["head"]=> string(8) "Enddatum" ["value"]=> string(10) "1647475200" ["properties"]=> object(AlexaCRM\CRMToolkit\Entity\Attribute)#31254 (20) { ["logicalName"]=> string(14) "ud_enddatetime" ["label"]=> string(8) "Enddatum" ["localizedLabel"]=> array(1) { [1031]=> string(8) "Enddatum" } ["description"]=> string(0) "" ["format"]=> string(8) "DateOnly" ["maxLength"]=> int(0) ["isCustom"]=> bool(true) ["imeMode"]=> string(4) "Auto" ["isPrimaryId"]=> bool(false) ["isPrimaryName"]=> bool(false) ["type"]=> string(8) "DateTime" ["isLookup"]=> bool(false) ["isValidForCreate"]=> bool(true) ["isValidForUpdate"]=> bool(true) ["isValidForRead"]=> bool(true) ["requiredLevel"]=> string(4) "None" ["attributeOf"]=> string(0) "" ["optionSet"]=> NULL ["lookupTypes"]=> NULL ["dateTimeBehavior"]=> string(9) "UserLocal" } ["formatted_value"]=> string(10) "17.03.2022" } ["a_adbc3862af6aea11a811000d3a20090f.udc_workshopsdays"]=> array(4) { ["head"]=> string(26) "Anzahl der Ausbildungstage" ["value"]=> int(3) ["properties"]=> object(AlexaCRM\CRMToolkit\Entity\Attribute)#31585 (20) { ["logicalName"]=> string(17) "udc_workshopsdays" ["label"]=> string(26) "Anzahl der Ausbildungstage" ["localizedLabel"]=> array(1) { [1031]=> string(26) "Anzahl der Ausbildungstage" } ["description"]=> string(0) "" ["format"]=> string(4) "None" ["maxLength"]=> int(0) ["isCustom"]=> bool(true) ["imeMode"]=> string(0) "" ["isPrimaryId"]=> bool(false) ["isPrimaryName"]=> bool(false) ["type"]=> string(7) "Integer" ["isLookup"]=> bool(false) ["isValidForCreate"]=> bool(true) ["isValidForUpdate"]=> bool(true) ["isValidForRead"]=> bool(true) ["requiredLevel"]=> string(4) "None" ["attributeOf"]=> string(0) "" ["optionSet"]=> NULL ["lookupTypes"]=> NULL ["dateTimeBehavior"]=> NULL } ["formatted_value"]=> string(1) "3" } }
    BAM2203	array(6) { ["ineko_booking_status"]=> array(4) { ["head"]=> string(14) "Buchungsstatus" ["value"]=> string(4) "??" ["properties"]=> object(AlexaCRM\CRMToolkit\Entity\Attribute)#31276 (20) { ["logicalName"]=> string(20) "ineko_booking_status" ["label"]=> string(14) "Buchungsstatus" ["localizedLabel"]=> array(1) { [1031]=> string(14) "Buchungsstatus" } ["description"]=> string(0) "" ["format"]=> string(0) "" ["maxLength"]=> int(0) ["isCustom"]=> bool(true) ["imeMode"]=> string(0) "" ["isPrimaryId"]=> bool(false) ["isPrimaryName"]=> bool(false) ["type"]=> string(8) "Picklist" ["isLookup"]=> bool(false) ["isValidForCreate"]=> bool(true) ["isValidForUpdate"]=> bool(true) ["isValidForRead"]=> bool(true) ["requiredLevel"]=> string(4) "None" ["attributeOf"]=> string(0) "" ["optionSet"]=> object(AlexaCRM\CRMToolkit\Entity\OptionSet)#31275 (8) { ["name"]=> string(38) "ineko_ud_tutorial_ineko_booking_status" ["type"]=> string(8) "Picklist" ["displayName"]=> string(14) "Buchungsstatus" ["localizedDisplayName"]=> array(1) { [1031]=> string(14) "Buchungsstatus" } ["description"]=> string(0) "" ["options"]=> array(5) { [745500004]=> string(3) "?" [745500000]=> string(4) "??" [745500001]=> string(4) "??" [745500002]=> string(4) "??" [745500003]=> string(6) "??" } ["localizedOptions"]=> array(5) { [745500004]=> array(1) { [1031]=> string(3) "?" } [745500000]=> array(1) { [1031]=> string(4) "??" } [745500001]=> array(1) { [1031]=> string(4) "??" } [745500002]=> array(1) { [1031]=> string(4) "??" } [745500003]=> array(1) { [1031]=> string(6) "??" } } ["isGlobal"]=> bool(false) } ["lookupTypes"]=> NULL ["dateTimeBehavior"]=> NULL } ["formatted_value"]=> string(4) "??" } ["ud_name"]=> array(4) { ["head"]=> string(18) "Ausbildungskürzel" ["value"]=> string(7) "BAM2203" ["properties"]=> object(AlexaCRM\CRMToolkit\Entity\Attribute)#31301 (20) { ["logicalName"]=> string(7) "ud_name" ["label"]=> string(18) "Ausbildungskürzel" ["localizedLabel"]=> array(1) { [1031]=> string(18) "Ausbildungskürzel" } ["description"]=> string(34) "Der Name der angepassten Entit?t." ["format"]=> string(4) "Text" ["maxLength"]=> int(100) ["isCustom"]=> bool(true) ["imeMode"]=> string(4) "Auto" ["isPrimaryId"]=> bool(false) ["isPrimaryName"]=> bool(true) ["type"]=> string(6) "String" ["isLookup"]=> bool(false) ["isValidForCreate"]=> bool(true) ["isValidForUpdate"]=> bool(true) ["isValidForRead"]=> bool(true) ["requiredLevel"]=> string(19) "ApplicationRequired" ["attributeOf"]=> string(0) "" ["optionSet"]=> NULL ["lookupTypes"]=> NULL ["dateTimeBehavior"]=> NULL } ["formatted_value"]=> string(7) "BAM2203" } ["udc_executionmode"]=> array(4) { ["head"]=> string(28) "Durchführungsform (geplant)" ["value"]=> string(18) "virtuelle Pr?senz" ["properties"]=> object(AlexaCRM\CRMToolkit\Entity\Attribute)#31763 (20) { ["logicalName"]=> string(17) "udc_executionmode" ["label"]=> string(28) "Durchführungsform (geplant)" ["localizedLabel"]=> array(1) { [1031]=> string(28) "Durchführungsform (geplant)" } ["description"]=> string(0) "" ["format"]=> string(0) "" ["maxLength"]=> int(0) ["isCustom"]=> bool(true) ["imeMode"]=> string(0) "" ["isPrimaryId"]=> bool(false) ["isPrimaryName"]=> bool(false) ["type"]=> string(8) "Picklist" ["isLookup"]=> bool(false) ["isValidForCreate"]=> bool(true) ["isValidForUpdate"]=> bool(true) ["isValidForRead"]=> bool(true) ["requiredLevel"]=> string(4) "None" ["attributeOf"]=> string(0) "" ["optionSet"]=>
    

    Screenshot-2022-02-07-142827

    • This reply was modified 2 years, 9 months ago by kimineko.
    • This reply was modified 2 years, 9 months ago by kimineko.
    • This reply was modified 2 years, 9 months ago by kimineko.
    • This reply was modified 2 years, 9 months ago by kimineko.
    Thread Starter kimineko

    (@kimineko)

    Hi George,

    As it was wrapped in the “old” [msdyncrm_twig] tag I assumed the dump function would have been part of that plugin, but you are right – I also have the Dataverse plugin installed. Unfortunately I cannot extract the guid with either

    record.ud_tutorialid.Id
    record.ud_tutorialid.id
    record.ud_tutorialid.value
    {{ record[“ud_tutorialid”].value}}
    {{ record[“ud_tutorialid”].Id}}
    {{ record[“ud_tutorialid”].id}}

    I will try to get it to work with the parameter substitution instead (https://docs.alexacrm.com/wpcrm/twig/#parameters-substitution).

    However, here my issue is that the following will return the right records

    {% view entity=”ud_submodule” name=”My_View” parameters=[ “BAM2203” ] %} {% endview %}

    and in the for each, the variable “seminar_var” is correctly set to the record in question e.g. “BAM2203”, but using the var as a parameter returns “No records found.”

    {% view entity=”ud_submodule” name=”My_View” parameters=[ “{{ seminar_var.value }}” ] %} {% endview %}

    Best Kim

    Thread Starter kimineko

    (@kimineko)

    Hi George,

    I think I didn’t explain it right:

    I set the var (seminar_var) with a field and then used dump only to see if the var gets set – the dump function is working. If I set the var e.g. to a string field, the dump shows all of the field’s data.

    However, what I am really trying to do, is to set the var to the guid of the current record as I need the guid for a subsequent view, which would use it as a lookup-value (https://docs.alexacrm.com/wpcrm/twig/#lookups-substitution). The guid of the records would be in “ud_tutorialid”.

    Screenshot-2022-02-03-090739

    As an example, here’s the fetchxml of the view from which I am trying to get the “ud_tutorialid” attribute:

    `<fetch version=”1.0″ output-format=”xml-platform” mapping=”logical” distinct=”false”>
    <entity name=”ud_tutorial”>
    <attribute name=”ud_name” />
    <attribute name=”ud_tutorialid” />
    <order attribute=”ud_name” descending=”false” />
    </entity>
    </fetch>

    Hi George,

    that does in fact solve most of it – certainly enough for us to use it. Still if you are interested in digging deeper, I have uploaded you screenshots of the form as it is in D365 and how it renders in WP (I used the twig you provided only changing the name attribute). As well as a screenshot of one of the fields (emailadress1), which “does not have a label”.

    Links:
    https://ibb.co/RTDyTfJ
    https://ibb.co/XYsmkb7
    https://ibb.co/c1bfzm6

    Best
    Kim

    d365-form-lead
    field-emailadress11
    wp-form-lead<br />hochladen fotos<br />

    Good morning George,

    just checked: German is the base language – there are no other languages installed. We didn’t use the on-premise version before and our instance was first installed around early-2020.

    Here’s the info from the “About” tab:

    Ver?ffentlichungszyklus 2 im Jahr 2021 aktiviert
    Serverversion: 9.2.21123.00172
    Clientversion: 1.4.3750-2112.3

    Let me know if you have other questions with regard to our installation.

    With regard to the new plugin my first step was trying to get the views to work ??

    Best
    Kim

    Hi alexacrm,

    I am not sure if it is – if you can tell me where to look, I will check. As we are using it in German it might though.

    @salesnow Thank you for the suggestion. I tried it with the new plugin, but haven’t managed to get the twigs to render yet. I’ll give it another try this week.

    Best
    Kim

Viewing 15 replies - 1 through 15 (of 19 total)