I’ve created a Signature custom component with jSignature (based heavily on Peter’.s work here - thanks, Peter!).
The problem I’m running into is that I want to be able to run updateRow on save, so that I can store the value from jSignature in SFDC appropriately.
When a save happens, I need to run something like this:
//Save signature var sigData = element.jSignature("getData", "base30").join(",");<br>var sigName = signatureModel.getFieldValue(signatureRow,'Name') || defaultName;<br> <br>// update signature text field in database and save<br>signatureModel.updateRow(signatureRow, {<br> Name: sigName,<br> Signature_Date__c: skuid.time.getSFDateTime(new Date()),<br> Signature__c: sigData<br>});<br>signatureModel.save();
However, if I throw that into the handleSave function on my component, I’m going to get an infinite loop of saves.
Can anyone think of a good way to handle this?