You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Support,
I have some issue . I am creating control like set relationship between the entities. I have also attached the screenshot about control. In this control user select Foreign Entity after selection Foreign Attribute fill behalf of FE.
Problem : The problem is that user can select multiple FE and behalf of these FA will fill. But FA need unique behalf of FE. As you know we can only set single data-source. It contain last collection for all FA. Below is my code. Please give me solution to resolve this issue ASAP. I will very thankful to you do the same. I hope you will give best solution.
Template.SalesForceTablesPopup.onCreated(function () {
var _self = this;
var defaultValue = [];
defaultValue.push(1);
_self.JoinLoop = new ReactiveVar([]);
_self.CurrentOptions = new ReactiveVar();
_self.JoinLoop.set(defaultValue);
})
The text was updated successfully, but these errors were encountered:
Hi Support,
I have some issue . I am creating control like set relationship between the entities. I have also attached the screenshot about control. In this control user select Foreign Entity after selection Foreign Attribute fill behalf of FE.
Problem : The problem is that user can select multiple FE and behalf of these FA will fill. But FA need unique behalf of FE. As you know we can only set single data-source. It contain last collection for all FA. Below is my code. Please give me solution to resolve this issue ASAP. I will very thankful to you do the same. I hope you will give best solution.
Meteor Template Code (TablesPopup)
{{#with JoinLoop}} {{#each this}}========================TablesPopup===========================
Template.SalesForceTablesPopup.helpers({
, Primarysfobjects: function () {return Session.get("Primarysfobjects");}
, GetSaleForceTablesName: function () {return Session.get("GetSaleForceTableName");}
, GetSaleForceTablesFields: function () {
return Session.get("GetSaleForceTableFields");
}
, SelectedSalesForceTablesFields: function () {return Session.get("GetSaleForceTableFields").fields;}
, JoinLoop: function () {
debugger;
var joinedRows = Template.instance().JoinLoop.get();
var lastRow = joinedRows[joinedRows.length - 1];
setTimeout(function () {
Meteor.typeahead.inject("#Attribute" + lastRow);
Meteor.typeahead.inject("#ForeignEntity" + lastRow);
Meteor.typeahead.inject("#ForeignAttributeKey" + lastRow);
}, 3000)
return joinedRows;
}
, IsMultipleJoinRow: function () {
return Template.instance().JoinLoop.get().length > 1;
}
, SalesForceTables: function () {
return Session.get("GetSaleForceTableName").map(function (key, index) {
return { "name": key.name, "tableId": key._id };
});
}
, SfTablesForeignAtt: function () {
var _CurrentOptions = Session.get("CurrentOptions");
var currentObjects = Session.get("SfTablesForeignAtt") || {};
if (typeof _CurrentOptions != "undefined") {
setTimeout(function () {
Meteor.typeahead.inject("#" + _CurrentOptions.ForeignAttributeId);
}, 3000);
return currentObjects[_CurrentOptions.TableName];
// return currentObjects;
} else {
return currentObjects;
}
}
, selected: function (event, suggestion, datasetName) {
if (event.target.dataset.key == "ForeignEntity") {
var array = Session.get("SfTablesForeignAtt") || {};
array.randomno = Random.id(10);
if (typeof array[suggestion.name] == "undefined") {
app.sf().GetSalesForceLocalTableFields(suggestion.tableId, function (data, status) {
if (status) {
array[suggestion.name] = data.fields.map(function (key, index) {
return { "name": key.name, "tableId": key._id };
});
Session.set("SfTablesForeignAtt", array);
Session.set("CurrentOptions", { "ForeignAttributeId": event.target.dataset.relationalid, "TableName": suggestion.name });
}
});
}
Session.set("SfTablesForeignAtt", array);
Session.set("CurrentOptions", { "ForeignAttributeId": event.target.dataset.relationalid, "TableName": suggestion.name });
}
}
})
Template.SalesForceTablesPopup.onRendered(function () {
// Meteor.typeahead.inject();
})
Template.SalesForceTablesPopup.onCreated(function () {
var _self = this;
var defaultValue = [];
defaultValue.push(1);
_self.JoinLoop = new ReactiveVar([]);
_self.CurrentOptions = new ReactiveVar();
})
The text was updated successfully, but these errors were encountered: