This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function myFunction() { | |
showURL("http://www.google.com"); | |
} | |
// | |
function showURL(href){ | |
var app = UiApp.createApplication().setHeight(50).setWidth(200); | |
app.setTitle("Show URL"); | |
var link = app.createAnchor('open ', href).setId("link"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<user> selectList=[SELECT ID ,ASI_OBIEE_Domain__c FROM USER WHERE CompanyName = 'Pernod Ricard Korea']; | |
for(user u: selectList){ | |
u.ASI_OBIEE_Domain__c='8622'; | |
} | |
update selectList; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<ASI_MFM_PO__c> List_View = [select id,ownerid from ASI_MFM_PO__c where ownerid = '005D00000023lLv' and id!='a9AD00000001Z8xMAE' | |
and id !='a9AD00000001Z3nMAE' and id!='a9AD00000001Z92MAE' | |
and id !='a9AD00000001Z3TMAU' and id!='a9AD00000001Z8sMAE' | |
and id !='a9AD00000001Z68MAE' and id !='a9AD0000000XaJDMA0' and id !='a9AD00000001Z97MAE' and id !='a9AD00000001Z63MAE' and id !='a9AD00000001Z3iMAE' | |
and id !='a9AD0000000XaItMAK' and id !='a9AD00000001iXzMAI' and id !='a9AD00000001fT6MAI']; | |
for (ASI_MFM_PO__c ListA : List_View) { | |
ListA.ownerid = '005D000000259Yq'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT ID,NAME,ASI_MFM_PO_Balance__c,CreatedDate FROM ASI_MFM_PO__c WHERE RecordType.DeveloperName LIKE 'ASI_MFM_SG%' and ASI_MFM_PO_Balance__c<0 order by CreatedDate |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> | |
<script src="https://code.jquery.com/jquery-1.10.2.js"></script> | |
<script> | |
$(document).ready(function(){ | |
$("#id1").keyup(function(){ | |
if(($('#id1').val().length > 0)){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Generate Blog Post Name quickly</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<ASI_MFM_Role_Prefix_Relationship__c> insertList= new List<ASI_MFM_Role_Prefix_Relationship__c>(); | |
ASI_MFM_Role_Prefix_Relationship__c temp = new ASI_MFM_Role_Prefix_Relationship__c (ASI_MFM_Prefix__c='a9FD0000000HPKs',ASI_MFM_Role_Name__c='ASI_JP_CW_L_Brand_Director'); | |
insertList.add(temp); | |
ASI_MFM_Role_Prefix_Relationship__c temp1= new ASI_MFM_Role_Prefix_Relationship__c (ASI_MFM_Prefix__c='a9FD0000000HPKs',ASI_MFM_Role_Name__c='ASI_JP_Marketing_Analyst_Manager'); insertList.add(temp1); | |
ASI_MFM_Role_Prefix_Relationship__c temp2= new ASI_MFM_Role_Prefix_Relationship__c (ASI_MFM_Prefix__c='a9FD0000000HPKs',ASI_MFM_Role_Name__c='ASI_JP_Marketing_Assistant'); insertList.add(temp2); | |
ASI_MFM_Role_Prefix_Relationship__c temp3= new ASI_MFM_Role_Prefix_Relationship__c (ASI_MFM_Prefix__c='a9FD0000000HPKs',ASI_MFM_Role_Name__c='ASI_JP_Trade_Marketing_Manager'); insertList.add(temp3); | |
ASI_MFM_Role_Prefix_Relationship__c temp4= new ASI_MFM_Role_Prefix_Relationship__c (ASI_MFM_Prefix__c='a9FD0000000HPKs',ASI_MFM_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<user> updateUserList = new List<user>(); | |
for(User u: [select id, name, ASI_OBIEE_Domain__c, CompanyName from User where CompanyName like '%Singapore%' and isActive = true]){ | |
u.ASI_OBIEE_Domain__c = '8624'; | |
updateUserList.add(u); | |
} | |
update updateUserList; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HttpRequest req = new HttpRequest(); | |
Http http = new Http(); | |
//req.setheader('accept','application/json'); | |
//https://tonyren-my.sharepoint.com/_api/v1.0/me/files/016EQYPSSQZ3I757WQYVALBAADZKWLQDTI/children?expand=thumbnails | |
req.setEndpoint('callout:Office365NamedCredential2/drive/root'); //me/drive/root/children' | |
req.setheader('accept','application/json'); | |
req.setHeader('Authorization', 'Bearer {!$Credential.OAuthToken}'); | |
//req.setHeader('Content-Type', 'application/json'); | |
req.setMethod('GET'); |
OlderNewer