private void XMLChilddata(DmsTableFieldMapping _mapping,common _recordChild)
{
str strValue;
XmlAttribute labelAttribute;
//InventJournalTable InventJournalTableloc;
InventJournalTrans InventJournalTrans;
//SysDictField dict;
if(_recordChild.TableId == InventJournalTable.TableId)
{
while select ItemID
from InventJournalTrans
where InventJournalTrans.JournalId == InventJournalTable.JournalId
{
childNode = doc.createElement(fieldId2name(tableName2Id("InventJournalTrans"),6));//InventJournalTrans,ItemId));
labelAttribute = doc.createAttribute("Item ID");//error here because there is blankspace
labelAttribute.value(InventJournalTrans.ItemId);
childNode.attributes().setNamedItem(labelAttribute);
strValue = strFmt("%1",(_recordChild.(fieldnum(InventJournalTrans,ItemID))));
childNode.innerText(strValue);
parentNode.appendChild(childNode);
}
}
so it should be
private void XMLChilddata(DmsTableFieldMapping _mapping,common _recordChild)
{
str strValue;
XmlAttribute labelAttribute;
//InventJournalTable InventJournalTableloc;
InventJournalTrans InventJournalTrans;
//SysDictField dict;
if(_recordChild.TableId == InventJournalTable.TableId)
{
while select ItemID
from InventJournalTrans
where InventJournalTrans.JournalId == InventJournalTable.JournalId
{
childNode = doc.createElement(fieldId2name(tableName2Id("InventJournalTrans"),6));//InventJournalTrans,ItemId));
labelAttribute = doc.createAttribute("Item ID");//so no error now
labelAttribute.value(InventJournalTrans.ItemId);
childNode.attributes().setNamedItem(labelAttribute);
strValue = strFmt("%1",(_recordChild.(fieldnum(InventJournalTrans,ItemID))));
childNode.innerText(strValue);
parentNode.appendChild(childNode);
}
}
{
str strValue;
XmlAttribute labelAttribute;
//InventJournalTable InventJournalTableloc;
InventJournalTrans InventJournalTrans;
//SysDictField dict;
if(_recordChild.TableId == InventJournalTable.TableId)
{
while select ItemID
from InventJournalTrans
where InventJournalTrans.JournalId == InventJournalTable.JournalId
{
childNode = doc.createElement(fieldId2name(tableName2Id("InventJournalTrans"),6));//InventJournalTrans,ItemId));
labelAttribute = doc.createAttribute("Item ID");//error here because there is blankspace
labelAttribute.value(InventJournalTrans.ItemId);
childNode.attributes().setNamedItem(labelAttribute);
strValue = strFmt("%1",(_recordChild.(fieldnum(InventJournalTrans,ItemID))));
childNode.innerText(strValue);
parentNode.appendChild(childNode);
}
}
so it should be
private void XMLChilddata(DmsTableFieldMapping _mapping,common _recordChild)
{
str strValue;
XmlAttribute labelAttribute;
//InventJournalTable InventJournalTableloc;
InventJournalTrans InventJournalTrans;
//SysDictField dict;
if(_recordChild.TableId == InventJournalTable.TableId)
{
while select ItemID
from InventJournalTrans
where InventJournalTrans.JournalId == InventJournalTable.JournalId
{
childNode = doc.createElement(fieldId2name(tableName2Id("InventJournalTrans"),6));//InventJournalTrans,ItemId));
labelAttribute = doc.createAttribute("Item ID");//so no error now
labelAttribute.value(InventJournalTrans.ItemId);
childNode.attributes().setNamedItem(labelAttribute);
strValue = strFmt("%1",(_recordChild.(fieldnum(InventJournalTrans,ItemID))));
childNode.innerText(strValue);
parentNode.appendChild(childNode);
}
}
No comments:
Post a Comment