Hello Expert,
So we started getting the error message: "No access possible via a 'NULL' data reference." after the 2308 update on a TextContent.Create() line. It is working fine before the update and I am not sure why it is suddenly not creating an object.
Any input will be a big help.
Here is the code in question under Opportunity Extended Object - Root-Event-BeforeSave.absl:
var textCollection;
var textBody = "Test Opportunity Note Body";
var textCollectionInst = this.TextCollection;
if(textCollectionInst.IsSet())
{
textCollection = textCollectionInst;
}
else
{
textCollection = this.TextCollection.Create();
}
if(textCollection.IsSet())
{
var textCount = textCollection.Text.Count();
var textEle: elementsof textCollection.Text;
textEle.TypeCode.content ="10001"; // Additional External Comment for Opportunity Note
var text = textCollection.Text.Create(textEle); // var text not set after Create
var textContent;
var textContentInst = text.TextContent;
if(textContentInst.IsSet()){
textContent= textContentInst;
}else{
var textContentEle : elementsof text.TextContent;
textContentEle.FormattedText.content = textBody;
textContent = text.TextContent.Create(textContentEle); // this is the line causing the dump
}
textContent.Text.content = textBody;
}