mbrewer
03/21/2024, 3:03 PMrecord.attach
to attach a file to a sales order does not actually attach the file to the transaction.
the function gets evaluated, log lines immediately before and after indicate no error is encountered. including incorrect variables, syntax, or format yields the expected error. ultimately, the file just does not attach. changing back to 2.0 works fine. i've also recreated a series of scripts and libraries which perform the same core functions in an attempt to reproduce, but cannot reproduce the behavior (2.1 attaches files fine in the rebuild - whether the file id and record id are hardcoded or not). anyone else encountered something similar? i'm crafting a support case now.Shawn Talbert
03/21/2024, 3:06 PMmbrewer
03/21/2024, 3:10 PMmbrewer
03/21/2024, 3:11 PMmbrewer
03/21/2024, 3:13 PMmbrewer
03/21/2024, 3:14 PMmbrewer
03/21/2024, 3:17 PMmbrewer
03/21/2024, 3:18 PMmbrewer
03/21/2024, 3:20 PMmbrewer
03/21/2024, 3:21 PMmbrewer
03/21/2024, 3:22 PMmbrewer
03/21/2024, 3:24 PMmbrewer
03/21/2024, 3:25 PMerictgrubaugh
03/21/2024, 3:36 PMmbrewer
03/21/2024, 4:01 PMmbrewer
03/21/2024, 4:01 PMmbrewer
03/29/2024, 7:35 PMmbrewer
03/29/2024, 7:35 PMmbrewer
03/29/2024, 7:35 PMmbrewer
03/29/2024, 7:36 PMmbrewer
03/29/2024, 7:45 PMerictgrubaugh
03/29/2024, 8:06 PMmbrewer
04/03/2024, 1:53 PMmbrewer
04/03/2024, 1:54 PMvar transactionRecord = record.load({type: 'salesorder', id: 31252});
record.attach({record: {type: 'file', id: 58865}, to: {type: 'salesorder', id: 31252}});
does not work:
var transactionRecord = record.load({type: 'salesorder', id: 31252});
transactionRecord.save()
record.attach({record: {type: 'file', id: 58865}, to: {type: 'salesorder', id: 31252}});
works:
var transactionRecord = record.load({type: 'salesorder', id: 31252});
record.attach({record: {type: 'file', id: 58865}, to: {type: 'salesorder', id: 31252}});
transactionRecord.save()
the weirdest part is it's not like normal record edit behavior, because this rule applies even if my record.attach call is attaching two records which are entirely unrelated to the record i loaded and plan to savembrewer
04/03/2024, 1:55 PMmbrewer
04/03/2024, 1:55 PMerictgrubaugh
04/03/2024, 1:59 PMMatt Carter
04/08/2024, 4:35 PMmbrewer
04/09/2024, 5:52 PMmbrewer
04/09/2024, 5:53 PMmbrewer
04/16/2024, 6:36 PMmbrewer
04/16/2024, 6:37 PM