Menu

AttributeExternalKey on User Portal

2023-01-19
2023-02-09
  • Luis Felipe Sierra Yañez

    Hi, i created a class called QV_customer and inherit from contact and i make a field called customer , which is an attributeExternalField and its from the ticket class

    but when i want to display my customers on user portal it dont works

    Im making it on the ticket-create form

    Definition of the field in a extension
    "<class id="Ticket" _delta="if_exists">
    <fields>
    <field id="customer" xsi:type="AttributeExternalKey" _delta="define">
    <sql>cliente</sql>
    <is_null_allowed>true</is_null_allowed>
    <on_target_delete>DEL_AUTO</on_target_delete>
    <target_class>qv_customer</target_class>
    </field>
    </fields>
    </class>"

    Definition of the form

    "

    <form id="ticket-create" _delta="redefine">
    <class>Ticket</class>
    <properties>
    <navigation_rules>
    <submit>
    <default>go-to-open-requests</default>
    </submit>
    </navigation_rules>
    </properties>
    <fields>
    <twig>

                                      //comments because its not displayed on the forum
                                           /* <div class="row">
                                          /<div class="col-sm-6">
                                          /   <div class="form_field" data-field-id="service_id" data-field-flags="mandatory">
                                          /   </div>
                                          /</div>
                                          /<div class="col-sm-6">
                                          /   <div class="form_field" data-field-id="servicesubcategory_id" data-field-flags="mandatory">
                                          /   </div>
                                          /</div>
                                      /</div>
                                      /<div id="service_details_placeholder">
                                      /</div>
                                      /<div class="row">
                                          /<div class="col-sm-6">
                                          /   <div class="form_field" data-field-id="impact">
                                          /   </div>
                                          /</div>
                                          /<div class="col-sm-6">
                                          /   <div class="form_field" data-field-id="urgency">
                                          /   </div>
                                          /</div>
                                          /<div class="col-sm-6">
                                          /   <div class="form_field" data-field-id="project_name">
                                          /   </div>
                                          /</div>
                                          /<div class="col-sm-6">
                                          /   <div class="form_field" data-field-id="company_acronym">
                                          /   </div>
                                          /</div>
                                      /</div>
                                      /<div>
                                      /   <div class="form_field" data-field-id="title">
                                      /   </div>
                                      /   <div class="form_field" data-field-id="customer">
                                      /   </div>
                                      /   <div class="form_field" data-field-id="description">
                                      /   </div>
                                      /   <div class="form_field" data-field-id="contacts_list">
                                      /   </div>
                                      /</div>
                                  /</twig>
                                    <modes>
                                        <!-- mode id can among create / edit / view -->
                                        <mode id="create"/>
                                    </modes>
                                </form>"
    

    And the first photo is how it is displayed when i join to the User portal

    And the second how its displayed when i join to the Administrator portal

    Also, if i set the profile to the administrator it works in the portal user, but i cant bring to all my users administrator profiles, so what is happening here?

    </twig></fields></form>
     

    Last edit: Luis Felipe Sierra Yañez 2023-01-19
  • Pierre Goiffon

    Pierre Goiffon - 2023-02-09

    Hello,
    In the console, the rights on iTop objects are defined by the user profiles.
    But on the user portal, there are also the scopes.
    As you added a new class, you need to add the corresponding scopes !

    See Changing what can be seen on Portal [iTop Documentation]

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.