Reputation: 400
I want to check the name of a global subject. It tried it with getText()
, getName()
and other methods from here.
Isn't it an attribute?
function CheckSubject()
{
var texter = Xrm.Page.getAttribute("subjectid").getValue();
alert(texter); // output: [object Object]
alert(texter.getText()); // output: Fehler im benutzerdefinierten Ereignis dieses Felds. Feld:subjectid Ereignis:onchange Fehler:undefined
if(texter=="Incident")
{
// DO something
}
}
Best
Upvotes: 0
Views: 969
Reputation: 2507
The subjectid return a lookup object. You this options in a lookup object:
var name = texter[0].name;
var guid = texter[0].id;
var entType = texter[0].entityType;
Upvotes: 1