Create custom records using recmach function in script

The word recmach is attached to the custom records id when the record is attached into another record.

We can use this function to create custom records instead of using record.create function. So, the governance limit is controlled.

  newRecord.selectNewLine({ sublistId: ‘sublistid’ });

                    newRecord.setCurrentSublistValue({

                        sublistId: ‘sublistid’,

                        fieldId: ‘field id’,

                        value: ‘value’

                    });

                    newRecord.setCurrentSublistValue({

                        sublistId: ‘sublistid’,

                        fieldId: ‘field id’,

                        value: ‘value’

                    });

                    newRecord.commitLine({ sublistId: ‘sublist id });

after that save the newrecord.

newRecordObj.save({

                    enableSourcing: true,

                    ignoreMandatoryFields: true

                });

Leave a comment

Your email address will not be published. Required fields are marked *