SHARE
TWEET

Untitled

a guest Mar 20th, 2017 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var conn = new jsforce.Connection({accessToken: getCookie('sid')});
  2.  
  3. conn.metadata.read('Profile', profile_name, function (err, metadata) {
  4.   if (err) {
  5.     return console.error(err);
  6.   }
  7.  
  8.   // set the permissions you want in the metadata object
  9.  
  10.   conn.metadata.update('Profile', metadata, function (err, results) {
  11.     if (err) {
  12.       return console.error(err);
  13.     }
  14.  
  15.     console.log('Done');
  16.   });
  17. });
RAW Paste Data
Top