when entering hours through the "Weekly Time Sheet" entry form I always get a '-1' as the "InternalId" from the call to nlapiGEtRecord. The code is from the example in the developers manual and is as follows:
function onCreateAfterSubmit(type) { var nInternalId = nlapiGetRecordId(); var strRecordType = nlapiGetRecordType(); // var objRecord = nlapiGetNewRecord(); // nInternalId = objRecord.getId(); nlapiLogExecution('DEBUG', 'Create After Submit Script1', 'type:' + type + ', RecordType: ' + strRecordType + ', Id:' + nInternalId); }And this is what is returned:[INDENT]Title Create After Submit Script1 Type Debug Date & Time 6/23/2009 8-21 Details type:create, RecordType: timebill, Id:-1 [/INDENT] My question would be is it possible to obtain the internal ids to timbeill records created through the "Weekly Time Sheet" entry form noting, I assume, that more than one record could be created based on a single line item and if so, what api functions could be used to find that information out.Note that the code works if you make an entry using the "Track Time" entry form. thanks in advance for your help,nick