Skip to main content
Paresh Joshi (Salesforce.com) 님이 Salesforce Files에 글을 올렸습니다

Does Salesforce files have support for vesion control?

What about check-in check-out to prevent overwriting?

If not now, is it on the roadmap with an ETA?

@Adam Wegel
댓글 10개
  1. 2015년 1월 15일 오후 9:58

    The trigger is courtesy of James. It involves creating a custom field check named "lock". As mentioned above, the logic can be expanded. This trigger will currently apply to files in Content and Chatter, but it can be restricted to just one area if desired.

    trigger ContentVersionStop_trigger on ContentVersion (before update) {

    for (ContentVersion cv : Trigger.new) {

    ContentVersion oldVersion = Trigger.oldMap.get(

    cv.ID

    );

    if (oldVersion.lock__c && cv.lock__c) {

    cv.addError('Updates can\'t be made while the version is locked');

    }

    }

    }

0/9000