AnsweredAssumed Answered

Create view Dependent is not working

Question asked by Ragukumar Marimuthu on Apr 7, 2017

I want to create different (ex.3) create view in same drawer,I want to set the 3 different models in  my view, I have updated my model but dependent dropdown is missing after setting the new model, Can you please hep me out?

 

Here I have pasted my code,

From Here I have called the multiple create layout from my home page,

 

app.drawer.open({
layout: 'multiple-create',
context: {
create: true,
module: 'Calls',
model: callsModel
}
});

 

 

Here is the layout,

<?php

 

$viewdefs['Calls']['base']['layout']['multiple-create'] = array(
'components' =>
array(
array(
'layout' =>
array(
'components' =>
array(
array(
'layout' =>
array(
'components' =>
array(
array(
'view' => 'first-contact-log-create',
),
array(
'view' => 'second-contact-log-create',
),

 


),
'type' => 'simple',
'name' => 'main-pane',
'span' => 8,
),
),
array(
'layout' =>
array(
'components' =>
array(),
'type' => 'simple',
'name' => 'dashboard-pane',
'span' => 4,
),
),
array(
'layout' =>
array(
'components' =>
array(
array(
'layout' => 'preview',
),
),
'type' => 'simple',
'name' => 'preview-pane',
'span' => 8,
),
),
),
'type' => 'default',
'name' => 'sidebar',
'span' => 12,
'last_state' => array(
'id' => 'create-default',
),
),
),
),
'type' => 'create',
'name' => 'base',
'span' => 12,
);

here is my js file first-contact-log-create.js

 

pushViewInLayout: function()
{

var self=this;
var offer_id="334eead8-0fb3-11e7-abcd-080027788ef9";
var patron_id="d906fc46-a2db-8837-f886-58381312d5b2";
var patron_code="10101209";
var quickCreateView = this.layout.getComponent('second-contact-log-create');
console.log(quickCreateView);
if(quickCreateView)
{
var OfferBean = app.data.createBean('module', {id:334eead8-0fb3-11e7-abcd-080027788ef9});
OfferBean.fetch({

success: function(model){

console.log(model);
var parentRecord = app.data.createBean('Contacts', {id:"334eead8-0fb3-11e7-abcd-080027788ef9"});
var callsModel = app.data.createBean('Calls', {
name: "Contact Log with"10101209",
contact_calls_name:"10101209",
name:"10101209",
contact_calls_id:"d906fc46-a2db-8837-f886-58381312d5b2",
parent_id:offer_id,
parent_name:model.get('name'),
parent_type:"ParentModule",
});
quickCreateView.model=callsModel;

 

},
});

 

}

 

 


},

 

Other model fields are behaving correctly, Except dependent dropdown,

 

All the labels were comingContact Type is my  dependent dropdown field

 

 

How to call the model with dependent fields?

Outcomes