2

I am new to sugarcrm. I need to make a create and edit drawer view for a sugar module from another view. so i worked with drawer. i implemented the create view but i am struggling with the record view. Any suggestions would be helpful.

Code for create view :

var meetingsBean = {
        'name': name
    }
    , meetingsModel = app.data.createBean('Meetings', meetingsBean)
    , self = this;

app.drawer.open({
    layout: 'create',
    context: {
        create: true,
        module: 'Meetings',
        model: meetingsModel
    }
}, function(meetingsModel) {
    // Need to know how to check meetings note added correctly then show error here
    if (!meetingsModel) {
        return;
    }
});

My scenario is that i will have the meetings module in another module(kind of calendar) rendering all the meetings for specific month/day/year. so the user can create a meeting by selecting the date or can edit the meeting by clicking on the existing meeting.

Parithiban
  • 1,656
  • 11
  • 16
  • Slightly confused by your question. When you say you're "struggling with the record view", what exactly is the problem? Does it not show? Where in the file structure have you placed the above code, and what have you attempted in implementing the record view equivalent? – Reisclef Jun 03 '17 at 08:56
  • i am able to get the meetings record in my calendar after i create it my problem is that i could not able to edit the specific record using drawer function? – Parithiban Jun 08 '17 at 05:12

1 Answers1

0
app.drawer.open({
    layout: 'my-layout', //you can set what layout you want
    context: {
        myData: data
    },
},
Gabriel
  • 89
  • 1
  • 5