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
/** | |
* TriggerName : copyOppLineItems | |
* @description : Whenever order is created, | |
* This needs to copy related opportunity line items to order line items. | |
*/ | |
trigger copyOppLineItems on Order (after insert) { | |
List<OrderItem> orderItemList = new List<OrderItem>(); | |
List<Order> orderList = [SELECT Id, OpportunityId, EffectiveDate, EndDate, IsDeleted, | |
IsReductionOrder, Name, OrderNumber, OrderReferenceNumber, |
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
public class copyOppItemHelper { | |
public static List<Id> getOppIds(List<Order> orderList) { | |
List<Id> oppIds = new List<Id>(); | |
for(Order newOrder: orderList) { | |
oppIds.add(newOrder.OpportunityId); | |
} | |
return oppIds; | |
} | |
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
public class metaDataUtils { | |
public static Map<String, Schema.DescribeFieldResult> getFieldMetaData(String obj) { | |
Map<String,Schema.DescribeFieldResult> finalMap = new Map<String, Schema.DescribeFieldResult>(); | |
Map<String, Schema.SObjectField> objectFields = Schema.getGlobalDescribe().get(obj).getDescribe().fields.getMap(); | |
// getting a specific object fields | |
for(String fieldName: objectFields.keySet()){ | |
finalMap.put(fieldName, objectFields.get(fieldName).getDescribe()); | |
} | |
return finalMap; | |
} |
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
// SalesForce Apex Code | |
List<Schema.SObjectType> AllSobjects = Schema.getGlobalDescribe().Values(); // Getting All sObjects available. | |
List<String> AllSobjectsNames = new List<String>(); | |
for(Schema.SObjectType sObj : AllSobjects) { | |
AllSobjectsNames.add(sObj.getDescribe().getName()); | |
} // Getting All sObjects Names available. |
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
# reNamer - By Nithesh. Customize the Name part as you like to rename your bulk files in a directory | |
import os | |
os.chdir("D:/filerename") | |
i=0 | |
for f in os.listdir(): | |
name, ext = os.path.splitext(f) | |
i = i + 1 | |
print(f) | |
hname, extra = name.split('_') |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- | |
Basic Color Palette for Android | |
Nithesh C Nekkanti | |
https://github.com/nithesh1992 | |
--> | |
<resources> |
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
import java.util.ArrayList; | |
import java.util.Scanner; | |
/** | |
* Created by Nithesh on 8/9/2016. | |
* Get an Integer Compliment. | |
*/ | |
public class Main { | |
public static void main(String[] args) { |
NewerOlder