Different results when retrieving data from parent-form
Posted: 05 Nov 2021
We are getting different results in a parent-form that is called by “New entry” of an related item. Depending on the user we get different results when retrieving data from the parent form.
This is the code we use to access the data of the parent-form. RegAbt is a normal lookup, BUTeams1 is a simple textfield, Fachgebiet is a Plumsails-Lookup
console.info("Start");
var parentId = parseInt(window.top.GetUrlKeyValue('ID'));
var parentBerID = (window.top.fd.field('Title').value());
var parentRLSB = (window.top.fd.field('RegAbt').value());
var parentRBT = (window.top.fd.field('BuTeams1').value());
var parentFachgebietID = (window.top.fd.field('Fachgebiet').value());
var parentFachgebiet = (window.top.fd.field('Fachgebiet').control('data')['Title']);
var parentFG = (window.top.fd.field('Fachgebiet').control('getSelectedText'));
console.info("ParentId");
console.log(parentId);
console.info("ParentBerID");
console.log(parentBerID);
console.info("ParentRLSB");
console.log(parentRLSB);
console.info("ParentRBT");
console.log(parentRBT);
console.info("ParentFachgebietID");
console.log(parentFachgebiet);
console.info("ParentFG");
console.log(parentFG);
console.info("gesetzt");
The results are different. User-A has Admin-rights, User-B not. But even when we provided more rights to user B the results did not change. However, all 3 "real" Admins get the same results.
Console User A (Admin, everything is fine except "RegAbt") Console User B (no Admin, different error message, RegAbt is ok, but Buteams1 and Fachgebiet are undefined)
Thank you!
UDRO
This is the code we use to access the data of the parent-form. RegAbt is a normal lookup, BUTeams1 is a simple textfield, Fachgebiet is a Plumsails-Lookup
console.info("Start");
var parentId = parseInt(window.top.GetUrlKeyValue('ID'));
var parentBerID = (window.top.fd.field('Title').value());
var parentRLSB = (window.top.fd.field('RegAbt').value());
var parentRBT = (window.top.fd.field('BuTeams1').value());
var parentFachgebietID = (window.top.fd.field('Fachgebiet').value());
var parentFachgebiet = (window.top.fd.field('Fachgebiet').control('data')['Title']);
var parentFG = (window.top.fd.field('Fachgebiet').control('getSelectedText'));
console.info("ParentId");
console.log(parentId);
console.info("ParentBerID");
console.log(parentBerID);
console.info("ParentRLSB");
console.log(parentRLSB);
console.info("ParentRBT");
console.log(parentRBT);
console.info("ParentFachgebietID");
console.log(parentFachgebiet);
console.info("ParentFG");
console.log(parentFG);
console.info("gesetzt");
The results are different. User-A has Admin-rights, User-B not. But even when we provided more rights to user B the results did not change. However, all 3 "real" Admins get the same results.
Console User A (Admin, everything is fine except "RegAbt") Console User B (no Admin, different error message, RegAbt is ok, but Buteams1 and Fachgebiet are undefined)
Thank you!
UDRO