Unable to pass parent id to popup

edited January 27, 2017 in Questions
Hi,

We are extensively using popup functionality in our org for creating records or for displaying list of child records for any object. We are consolidating Opportunity creation into a common skuid page which will be invoked from popup. We are running into an issue when creating Opportunity from a custom object.
Here is the data model:
Call Report has parent lookup field for Account. For each call report, we can create an Opportunity (from row action). We need to pass account or broker id (AccountId, DBG_Broker__c refers to Account and Broker respectively for Opportunity). 

Out of all popup invocations, only this page is unable to pass account or broker id to our opportunity creation page. I have tried with different models to pass id to popup but none of the works. I have tried 
1. activate and set id of call report. query call report model and pass account id from call report model.
2. activate and set id of account model. query account model and pass account id to popup.
3. activate and set id of opportunity model. create opportunity model row and pass account id to popup.

Here is the code:
<skuidpage showsidebar="false" showheader="false" unsavedchangeswarning="" theme="Modern" personalizationmode="server">   <models>
      <model id="User" limit="1" query="true" createrowifnonefound="false" sobject="User" doclone="" type="" adapter="">
         <fields>
            <field id="DBG_SourceName__c"/>
         </fields>
         <conditions>
            <condition type="userinfo" value="" field="Id" operator="=" enclosevalueinquotes="true" userinfotype="userid"/>
         </conditions>
         <actions/>
      </model>
      <model id="CallReportUser" limit="20" query="true" createrowifnonefound="false" sobject="DBG_CallReportUser__c" adapter="" type="">
         <fields>
            <field id="Call_Report__r.OwnerId"/>
            <field id="Call_Report__r.Owner.Name"/>
            <field id="Call_Report__r.Id"/>
            <field id="Call_Report__r.CreatedDate"/>
            <field id="DBG_TeamMember__c"/>
            <field id="DBG_TeamMember__r.Name"/>
            <field id="Call_Report__c"/>
            <field id="Call_Report__r.Name"/>
         </fields>
         <conditions logic="1 and 2 and 3">
            <condition type="userinfo" value="" field="Call_Report__r.OwnerId" operator="!=" enclosevalueinquotes="true" userinfotype="userid"/>
            <condition type="fieldvalue" value="LAST_90_DAYS" enclosevalueinquotes="false" field="Call_Report__r.CreatedDate" operator="="/>
            <condition type="userinfo" value="" field="DBG_TeamMember__c" operator="=" enclosevalueinquotes="true" userinfotype="userid"/>
            <condition type="userinfo" value="" field="CreatedById" state="filterableoff" inactive="true" name="DBG_PrimaryParticipant__c" operator="=" enclosevalueinquotes="true" userinfotype="userid"/>
         </conditions>
         <actions/>
      </model>
      <model id="CallReport" limit="20" query="true" createrowifnonefound="false" sobject="DBG_CallReport__c" doclone="" type="" orderby="DBG_CallDate__c desc" adapter="">
         <fields>
            <field id="Name"/>
            <field id="DBG_Account__c"/>
            <field id="DBG_Account__r.Name"/>
            <field id="DBG_CallType__c"/>
            <field id="DBG_BrokerCallType__c"/>
            <field id="DBG_BrokerCallTopic__c"/>
            <field id="DBG_Topic__c"/>
            <field id="DBG_Notes__c"/>
            <field id="RecordTypeId"/>
            <field id="RecordType.Name"/>
            <field id="Is_Account__c"/>
            <field id="Id"/>
            <field id="Method__c"/>
            <field id="DBG_CallDate__c"/>
            <field id="RecordType.DeveloperName"/>
         </fields>
         <conditions logic="(1 AND 2) OR 3">
            <condition type="userinfo" value="" field="OwnerId" operator="=" enclosevalueinquotes="true" userinfotype="userid" state="" inactive="false"/>
            <condition type="fieldvalue" value="LAST_90_DAYS" enclosevalueinquotes="false" field="CreatedDate" operator="=" state="filterableon" inactive="false" name="CreatedDate"/>
            <condition type="modelmerge" value="" field="Id" operator="=" model="CallReportUser" enclosevalueinquotes="true" mergefield="Call_Report__c" novaluebehavior="deactivate"/>
         </conditions>
         <actions/>
      </model>
      <model id="Recordtype" limit="1" query="true" createrowifnonefound="false" sobject="RecordType">
         <fields>
            <field id="Id"/>
            <field id="DeveloperName"/>
         </fields>
         <conditions>
            <condition type="fieldvalue" value="Referral" field="DeveloperName" operator="=" novaluebehavior="deactivate" enclosevalueinquotes="true"/>
         </conditions>
         <actions/>
      </model>
      <model id="Task" limit="1" query="false" createrowifnonefound="true" sobject="Task">
         <fields>
            <field id="OwnerId"/>
            <field id="Owner.Name"/>
            <field id="Subject"/>
            <field id="ActivityDate"/>
            <field id="Description"/>
            <field id="Status"/>
            <field id="Priority"/>
            <field id="WhoId"/>
            <field id="Who.Name"/>
            <field id="Task_Type__c"/>
            <field id="Referred_Account__c"/>
            <field id="RecordTypeId"/>
            <field id="RecordType.Name"/>
            <field id="ReminderDateTime"/>
            <field id="IsReminderSet"/>
            <field id="IsRecurrence"/>
            <field id="DBG_Division__c"/>
            <field id="Referred_DUNS__c"/>
            <field id="WhatId"/>
            <field id="What.Name"/>
            <field id="Referred_Source_Code__c"/>
         </fields>
         <conditions>
            <condition type="blank" value="null" field="WhatId" operator="=" novaluebehavior="deactivate" mergefield="Id" enclosevalueinquotes="false" state="filterableoff" inactive="true" name="WhatId"/>
            <condition type="modelmerge" value="" field="RecordTypeId" operator="=" novaluebehavior="deactivate" mergefield="Id" state="" model="Recordtype" enclosevalueinquotes="true"/>
            <condition type="userinfo" value="" field="OwnerId" operator="=" enclosevalueinquotes="true" userinfotype="userid"/>
            <condition type="userinfo" value="" field="Owner.Name" operator="=" enclosevalueinquotes="true" userinfotype="name"/>
         </conditions>
         <actions/>
      </model>
      <model id="NewCallReport" limit="" query="false" createrowifnonefound="false" sobject="DBG_CallReport__c" doclone="" type="" adapter="">
         <fields>
            <field id="Name"/>
            <field id="DBG_CallType__c"/>
            <field id="DBG_Topic__c"/>
            <field id="RecordType.Name"/>
            <field id="DBG_Account__c"/>
            <field id="DBG_Account__r.Name"/>
            <field id="DBG_CallDate__c"/>
            <field id="Method__c"/>
            <field id="DBG_Notes__c"/>
            <field id="RecordTypeId"/>
            <field id="RecordType.DeveloperName"/>
            <field id="RecordType.NamespacePrefix"/>
            <field id="DBG_BrokerCallTopic__c"/>
            <field id="DBG_BrokerCallType__c"/>
            <field id="DBG_Account__r.DBG_DUNSNumber__c"/>
            <field id="DBG_Account__r.DBG_ProdNo__c"/>
            <field id="DBG_Account__r.ShippingCity"/>
            <field id="DBG_Account__r.ShippingCountry"/>
            <field id="DBG_Account__r.ShippingState"/>
            <field id="Is_Account_Call_Report__c"/>
            <field id="Id"/>
         </fields>
         <conditions>
            <condition type="fieldvalue" value="TODAY" enclosevalueinquotes="false" field="DBG_CallDate__c" state="" inactive="false"/>
            <condition type="fieldvalue" value="" field="Id" operator="=" mergefield="Id" novaluebehavior="deactivate" state="filterableoff" inactive="true" name="Id" enclosevalueinquotes="true"/>
            <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="DBG_Account__c" state="filterableoff" inactive="true" name="DBG_Account__c"/>
         </conditions>
         <actions/>
      </model>
      <model id="ProductNotes" limit="" query="false" createrowifnonefound="false" sobject="DBG_CallReportDivisionNotes__c" doclone="" type="">
         <fields>
            <field id="DBG_SourceCode__c"/>
            <field id="Division__c"/>
            <field id="Profit_Center_Segment__c"/>
            <field id="Aggregate_Product__c"/>
            <field id="Notes__c"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="Call_Report__c" operator="=" model="NewCallReport" enclosevalueinquotes="true" mergefield="Id" novaluebehavior="deactivate" state="" inactive="false"/>
            <condition type="modelmerge" value="" field="DBG_SourceCode__c" state="" inactive="false" operator="=" model="User" enclosevalueinquotes="true" mergefield="DBG_SourceName__c" novaluebehavior="deactivate"/>
         </conditions>
         <actions/>
      </model>
      <model id="CallReportParticipants" limit="" query="false" createrowifnonefound="false" sobject="DBG_CallReportClient__c" doclone="" type="" adapter="">
         <fields>
            <field id="DBG_Participant__c"/>
            <field id="DBG_Participant__r.Name"/>
            <field id="DBG_Status__c"/>
            <field id="DBG_Participant__r.Account.Name"/>
            <field id="DBG_Participant__r.Account.ShippingCity"/>
            <field id="DBG_Participant__r.Account.ShippingCountry"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="DBG_CallReport__c" operator="=" model="NewCallReport" enclosevalueinquotes="true" mergefield="Id" novaluebehavior="deactivate" state="" inactive="false"/>
         </conditions>
         <actions/>
      </model>
      <model id="CallReportAIGParticipants" limit="" query="false" createrowifnonefound="false" sobject="DBG_CallReportUser__c" doclone="" type="">
         <fields>
            <field id="DBG_TeamMember__c"/>
            <field id="DBG_TeamMember__r.Name"/>
            <field id="Picklist__c"/>
            <field id="DBG_PrimaryParticipant__c"/>
            <field id="DBG_TeamMember__r.Country"/>
            <field id="DBG_TeamMember__r.GDW_Department_Level2__c"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="Call_Report__c" operator="=" novaluebehavior="deactivate" model="NewCallReport" enclosevalueinquotes="true" mergefield="Id" state="" inactive="false"/>
         </conditions>
         <actions/>
      </model>
      <model id="NewContact" limit="" query="false" createrowifnonefound="false" sobject="Contact" doclone="" type="" adapter="">
         <fields>
            <field id="FirstName"/>
            <field id="LastName"/>
            <field id="Email"/>
            <field id="Phone"/>
            <field id="DBG_Active_Inactive__c"/>
            <field id="Same_As_Company_Address__c"/>
            <field id="MailingCountry"/>
            <field id="Name"/>
         </fields>
         <conditions>
            <condition type="fieldvalue" value="Active" enclosevalueinquotes="true" field="DBG_Active_Inactive__c"/>
            <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="AccountId" state="filterableoff" inactive="true" name="AccountId"/>
         </conditions>
         <actions/>
      </model>
      <model id="CallReportCampaigns" limit="" query="false" createrowifnonefound="false" sobject="DBG_CallReportInitiative__c" doclone="" type="" adapter="">
         <fields>
            <field id="DBG_Initiative__c"/>
            <field id="DBG_Initiative__r.Name"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="DBG_CallReport__c" operator="=" model="NewCallReport" enclosevalueinquotes="true" mergefield="Id" novaluebehavior="deactivate" state="" inactive="false"/>
         </conditions>
         <actions/>
      </model>
      <model id="Attachments" limit="" query="false" createrowifnonefound="false" sobject="Attachment" doclone="" type="" adapter="">
         <fields>
            <field id="ContentType"/>
            <field id="Body"/>
            <field id="Description"/>
            <field id="Name"/>
            <field id="ParentId"/>
            <field id="Parent.Name"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="ParentId" operator="=" model="NewCallReport" enclosevalueinquotes="true" mergefield="Id" novaluebehavior="deactivate" state="" inactive="false"/>
         </conditions>
         <actions/>
      </model>
      <model id="CallRepAccountCreate" limit="" query="false" createrowifnonefound="false" sobject="DBG_CallReportAccount__c" doclone="" type="" adapter="">
         <fields>
            <field id="DBG_Account__c"/>
            <field id="DBG_Account__r.Name"/>
            <field id="Aggregate_Products__c"/>
            <field id="DBG_Amount__c"/>
            <field id="Call_Date__c"/>
            <field id="Name"/>
            <field id="DBG_CallType__c"/>
            <field id="DBG_Comment__c"/>
            <field id="DBG_Division__c"/>
            <field id="DBG_EffectiveDate__c"/>
            <field id="Profit_Center_Segment__c"/>
            <field id="Programs_Sub_Divisions__c"/>
            <field id="Source_Code__c"/>
            <field id="DBG_Topic__c"/>
            <field id="DBG_Product__c"/>
            <field id="DBG_Account__r.ShippingCity"/>
            <field id="DBG_Account__r.ShippingCountry"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="Source_Code__c" operator="=" model="User" enclosevalueinquotes="true" mergefield="DBG_SourceName__c" novaluebehavior="deactivate" state="off" inactive="true"/>
         </conditions>
         <actions/>
      </model>
      <model id="CallRepAccountCreatePopup" limit="" query="false" createrowifnonefound="false" sobject="DBG_CallReportAccount__c" doclone="" type="" adapter="">
         <fields>
            <field id="DBG_Account__c"/>
            <field id="DBG_Account__r.Name"/>
            <field id="Aggregate_Products__c"/>
            <field id="DBG_Amount__c"/>
            <field id="Call_Date__c"/>
            <field id="Name"/>
            <field id="DBG_CallType__c"/>
            <field id="DBG_Comment__c"/>
            <field id="DBG_Division__c"/>
            <field id="DBG_EffectiveDate__c"/>
            <field id="Profit_Center_Segment__c"/>
            <field id="Programs_Sub_Divisions__c"/>
            <field id="Source_Code__c"/>
            <field id="DBG_Topic__c"/>
            <field id="DBG_Product__c"/>
            <field id="DBG_Account__r.ShippingCity"/>
            <field id="DBG_Account__r.ShippingCountry"/>
         </fields>
         <conditions>
            <condition type="modelmerge" value="" field="Source_Code__c" operator="=" model="User" enclosevalueinquotes="true" mergefield="DBG_SourceName__c" novaluebehavior="deactivate"/>
         </conditions>
         <actions/>
      </model>
      <model id="CallReportTemp" limit="1" query="false" createrowifnonefound="false" adapter="" type="" sobject="DBG_CallReport__c">
         <fields>
            <field id="Id"/>
            <field id="DBG_Account__c"/>
            <field id="DBG_Account__r.Name"/>
         </fields>
         <conditions>
            <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Id" state="filterableoff" inactive="true" name="Id"/>
         </conditions>
         <actions/>
      </model>
      <model id="AccountTemp" limit="1" query="false" createrowifnonefound="false" adapter="" type="" sobject="Account">
         <fields>
            <field id="Id"/>
         </fields>
         <conditions>
            <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="Id" state="filterableoff" inactive="true" name="Id"/>
         </conditions>
         <actions/>
      </model>
      <model id="OpportunityTemp" limit="1" query="false" createrowifnonefound="false" adapter="" type="" sobject="Opportunity">
         <fields>
            <field id="AccountId"/>
            <field id="Account.Name"/>
            <field id="DBG_Broker__c"/>
            <field id="DBG_Broker__r.Name"/>
         </fields>
         <conditions>
            <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="DBG_Broker__c" state="filterableoff" inactive="true" name="DBG_Broker__c"/>
            <condition type="fieldvalue" value="" enclosevalueinquotes="true" field="AccountId" state="filterableoff" inactive="true" name="AccountId"/>
         </conditions>
         <actions/>
      </model>
   </models>
   <components>
      <panelset type="custom" cssclass="mask" scroll="" uniqueid="sk-2f-zdK-87">
         <panels>
            <panel width="100%">
               <components>
                  <pagetitle model="CallReportUser" uniqueid="sk-2f-zdK-88">
                     <maintitle>My Call Reports</maintitle>
                     <actions/>
                  </pagetitle>
                  <panelset type="custom" scroll="" uniqueid="sk-2f-zdL-89">
                     <panels>
                        <panel width="100%">
                           <components>
                              <skootable showconditions="true" showsavecancel="false" searchmethod="server" searchbox="true" showexportbuttons="true" pagesize="10" createrecords="false" model="CallReport" buttonposition="left" mode="read" tokenizesearch="true" searchplaceholdertext="Enter Search Term" uniqueid="searchTable" emptysearchbehavior="query">
                                 <fields>
                                    <field id="Name" type="CUSTOM" snippet="NameFieldRenderer" valuehalign="" allowordering="true"/>
                                    <field id="DBG_Notes__c" valuehalign="" type="" readonly="true"/>
                                    <field id="DBG_CallDate__c" valuehalign="" type="" allowordering="true"/>
                                    <field id="Method__c" valuehalign="" type="" allowordering="true"/>
                                    <field id="RecordType.Name" valuehalign="" type="" allowordering="true">
                                       <label>Call Report Type</label>
                                    </field>
                                    <field id="Id" valuehalign="" type=""/>
                                 </fields>
                                 <rowactions>
                                    <action type="redirect" label="View Detail" url="/apex/c__AIG_Underwriter_Data_Detail?Id={{{Id}}}" icon="fa-arrow-circle-right" window="blank">
                                       <drawer title="Drawer Area" width="800" closehandle="true">
                                          <components/>
                                       </drawer>
                                    </action>
                                    <action type="multi" label="Create a Cross Sell" icon="fa-flag">
                                       <actions>
                                          <action type="blockUI"/>
                                          <action type="emptyModelData">
&nb

Comments

  • edited January 18, 2016
    For each call report record, there are 2 row actions to create target. Each action is rendered based on call report type. Create target has few actions to remove rows, activate and set value, query/create model row, and then invoke popup. standalone skuid page works fine when invoked separately with params or through other pages (account detail page or search page row action). 
  • edited January 22, 2016
    Hi,

    Any ideas or suggestions will be appreciated.

    thanks
  • edited January 25, 2016
    Anyone?
  • DaveDave 💎
    edited January 27, 2017
    Not sure I understood your scenario fully, but maybe u can try to do it via Page include

    So to create popup content as a separate Skuid page

    In Popup add component: Page Include linked to skuid page mentioned above

    and pass your ID through the Query String




  • edited January 25, 2016
    Hi Dave,

    Thanks for your reply. We have skuid page included within popup. Issue is that query string is unable to send parameters to popup page.
  • DaveDave 💎
    edited January 27, 2017
    In case you have not tried:

    If you are trying to pass the parameter from a model with 1 row, you can use that as a query:

    {{{$Model.YOURMODELNAME.data.0.FIELDNAME}}}

    replace yourmodelname and fieldname by appropriate values

  • edited January 26, 2016
    Already done that. Still unable to get value from model field.
  • edited January 12, 2017
    I wanted to copy your XML to test it by myself but it seems it's invalid.
  • edited January 26, 2016
    Hi,

    while copying page code, looks like code was truncated. 

    Good news is that i was able to resolve this issue with permutations and cobinations. final solution was just to
    - activate and set model condition Id for call report.
    - Query model
    - use call report id and account id and pass it on as query string to popup page include

    Thanks
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!