Re: AIF Document Services... Setting Default Values?
I've attempted to add the logic to set the default values in the prepareForSaveExtended() method, but this doesn't seem to work. Maybe I am setting it in the wrong place? Below is an example of where I have tried to default the value of an the organization's name.
// ----------------------------------------------------------------------
// Process Organization records
// ----------------------------------------------------------------------
case #Organization_DataSourceName:
axbc_Organization_DirOrganization = _axBcStack.top();
//TODO Put validating code for DirOrganization here
//Default value of Organization Name
axbc_Organization_DirOrganization.parmName("NameSetByService");
switch (_recordProcessingContext)
{
// Ensure Organization record is saved before any of its dependent child records
case AxdRecordProcessingContext::BeforeChildRecordProcessed:
switch (_childRecord.dataSourceName())
{
case #PartyLocation_DataSourceName:
if (!axbc_Organization_DirOrganization.isProcessed())
{
return true;
}
break;
}
return false;
// Ensure Organization record is saved
case AxdRecordProcessingContext::AfterAllChildRecordsProcessed:
if (!axbc_Organization_DirOrganization.isProcessed())
{
return true;
}
return false;
}
return false;