-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
3Questions
-
2Replies
Accessibility Mode for a User Record
Hi,
Im currently working on code for a custom notes object. I have inline editing enabled, however some user can use inline editing because they have accessibility mode enabled. Im trying to query the field, or find some way to determine (through apex) if a user has accesibility mode checked so I can create a work around. Does anyone have any solutions?
Im currently working on code for a custom notes object. I have inline editing enabled, however some user can use inline editing because they have accessibility mode enabled. Im trying to query the field, or find some way to determine (through apex) if a user has accesibility mode checked so I can create a work around. Does anyone have any solutions?
- DMario Lewis
- December 12, 2017
- Like
- 0
- Continue reading or reply
How to Avoid DML 50000 LIMIT please help
Im currently writing a trigger handler to add a parent id to an account based on a variable called DUNS Number. When I add a new record I run into a DML Error 50001 limit reached.
/******************************************************************************************************
* @NAME : OnBeforeInsert
* @DESCRIPTION : Catch any missing data before inserting a Account record
* @PARAMETER : List of Accounts to affect
******************************************************************************************************/
public void BeforeInsert(Account[] newAccounts){
Map<String, Id> dunsMap = getDUNSMap(newAccounts);
try{
FOR(Account acct : newAccounts){
//acct.Sales_Region__c = region.getCorrectAccountRegionSingle(acct);
if(acct.Parent_DUNS_Number__c != null){
acct.ParentId = dunsMap.get(acct.Parent_DUNS_Number__c);
}
}
}catch(Exception ex){}
}
/******************************************************************************************************
* @NAME : getDUNSMap
* @DESCRIPTION : Gets the Id of the Parent Account based on the DUNS Number
* @PARAMETER : Account List to search for
* @RETURN : Map<String, Id> of the Queried Parent Account with their duns numbers
******************************************************************************************************/
private Map<String, Id> getDUNSMap(List<Account> accountList){
Map<String, Id> dunsMap = new Map<String, Id>();
List<String> parentDunsList = new List<String>();
For(Account a : accountList){
parentDunsList.add(a.Parent_DUNS_Number__c);
}
List<Account> parentList =[SELECT id, DUNS_Number__c FROM Account WHERE DUNS_Number__c In : parentDunsList];
FOR(Account a1 : parentList){
dunsMap.put(a1.DUNS_Number__c, a1.Id);
}
return dunsMap;
}
/******************************************************************************************************
* @NAME : OnBeforeInsert
* @DESCRIPTION : Catch any missing data before inserting a Account record
* @PARAMETER : List of Accounts to affect
******************************************************************************************************/
public void BeforeInsert(Account[] newAccounts){
Map<String, Id> dunsMap = getDUNSMap(newAccounts);
try{
FOR(Account acct : newAccounts){
//acct.Sales_Region__c = region.getCorrectAccountRegionSingle(acct);
if(acct.Parent_DUNS_Number__c != null){
acct.ParentId = dunsMap.get(acct.Parent_DUNS_Number__c);
}
}
}catch(Exception ex){}
}
/******************************************************************************************************
* @NAME : getDUNSMap
* @DESCRIPTION : Gets the Id of the Parent Account based on the DUNS Number
* @PARAMETER : Account List to search for
* @RETURN : Map<String, Id> of the Queried Parent Account with their duns numbers
******************************************************************************************************/
private Map<String, Id> getDUNSMap(List<Account> accountList){
Map<String, Id> dunsMap = new Map<String, Id>();
List<String> parentDunsList = new List<String>();
For(Account a : accountList){
parentDunsList.add(a.Parent_DUNS_Number__c);
}
List<Account> parentList =[SELECT id, DUNS_Number__c FROM Account WHERE DUNS_Number__c In : parentDunsList];
FOR(Account a1 : parentList){
dunsMap.put(a1.DUNS_Number__c, a1.Id);
}
return dunsMap;
}
- DMario Lewis
- December 08, 2017
- Like
- 0
- Continue reading or reply
ShoreTel to Salesforce Itegration
Hi,
I'm having an issues with Salesforce to Shoretel Integration, when our users try to log a call with the status of, "No VM was left" logs say the task is successfully logged however, its not.
14:26:47.364 INFO : 914719622: Call 00030000-3358-58c8-b5bf-0010493209a9: >>> Salesforce Save Log
14:26:47.364 DEBUG : 914719622: Call 00030000-3358-58c8-b5bf-0010493209a9: Save Params: Subject=Call 8/1/2017 2:26 PM&Activitydate=2017-8-1&CallObject=00030000-3358-58c8-b5bf-0010493209a9&Phone=+1 (616) 888-3010&Description=&CallDurationInSeconds=13&CallType=Outbound&Status=completed&Type=Call&whoId=00Q0G00001AwZNz&whatId=&CallDisposition=No VM was Left
14:26:47.364 DEBUG : >>> SaveLog: "Task"
14:26:47.367 DEBUG : <<< SaveLog: "Task"
14:26:47.676 DEBUG : !!! SaveLog: "Task": Success
I'm having an issues with Salesforce to Shoretel Integration, when our users try to log a call with the status of, "No VM was left" logs say the task is successfully logged however, its not.
14:26:47.364 INFO : 914719622: Call 00030000-3358-58c8-b5bf-0010493209a9: >>> Salesforce Save Log
14:26:47.364 DEBUG : 914719622: Call 00030000-3358-58c8-b5bf-0010493209a9: Save Params: Subject=Call 8/1/2017 2:26 PM&Activitydate=2017-8-1&CallObject=00030000-3358-58c8-b5bf-0010493209a9&Phone=+1 (616) 888-3010&Description=&CallDurationInSeconds=13&CallType=Outbound&Status=completed&Type=Call&whoId=00Q0G00001AwZNz&whatId=&CallDisposition=No VM was Left
14:26:47.364 DEBUG : >>> SaveLog: "Task"
14:26:47.367 DEBUG : <<< SaveLog: "Task"
14:26:47.676 DEBUG : !!! SaveLog: "Task": Success
- DMario Lewis
- September 18, 2017
- Like
- 0
- Continue reading or reply
How to Avoid DML 50000 LIMIT please help
Im currently writing a trigger handler to add a parent id to an account based on a variable called DUNS Number. When I add a new record I run into a DML Error 50001 limit reached.
/******************************************************************************************************
* @NAME : OnBeforeInsert
* @DESCRIPTION : Catch any missing data before inserting a Account record
* @PARAMETER : List of Accounts to affect
******************************************************************************************************/
public void BeforeInsert(Account[] newAccounts){
Map<String, Id> dunsMap = getDUNSMap(newAccounts);
try{
FOR(Account acct : newAccounts){
//acct.Sales_Region__c = region.getCorrectAccountRegionSingle(acct);
if(acct.Parent_DUNS_Number__c != null){
acct.ParentId = dunsMap.get(acct.Parent_DUNS_Number__c);
}
}
}catch(Exception ex){}
}
/******************************************************************************************************
* @NAME : getDUNSMap
* @DESCRIPTION : Gets the Id of the Parent Account based on the DUNS Number
* @PARAMETER : Account List to search for
* @RETURN : Map<String, Id> of the Queried Parent Account with their duns numbers
******************************************************************************************************/
private Map<String, Id> getDUNSMap(List<Account> accountList){
Map<String, Id> dunsMap = new Map<String, Id>();
List<String> parentDunsList = new List<String>();
For(Account a : accountList){
parentDunsList.add(a.Parent_DUNS_Number__c);
}
List<Account> parentList =[SELECT id, DUNS_Number__c FROM Account WHERE DUNS_Number__c In : parentDunsList];
FOR(Account a1 : parentList){
dunsMap.put(a1.DUNS_Number__c, a1.Id);
}
return dunsMap;
}
/******************************************************************************************************
* @NAME : OnBeforeInsert
* @DESCRIPTION : Catch any missing data before inserting a Account record
* @PARAMETER : List of Accounts to affect
******************************************************************************************************/
public void BeforeInsert(Account[] newAccounts){
Map<String, Id> dunsMap = getDUNSMap(newAccounts);
try{
FOR(Account acct : newAccounts){
//acct.Sales_Region__c = region.getCorrectAccountRegionSingle(acct);
if(acct.Parent_DUNS_Number__c != null){
acct.ParentId = dunsMap.get(acct.Parent_DUNS_Number__c);
}
}
}catch(Exception ex){}
}
/******************************************************************************************************
* @NAME : getDUNSMap
* @DESCRIPTION : Gets the Id of the Parent Account based on the DUNS Number
* @PARAMETER : Account List to search for
* @RETURN : Map<String, Id> of the Queried Parent Account with their duns numbers
******************************************************************************************************/
private Map<String, Id> getDUNSMap(List<Account> accountList){
Map<String, Id> dunsMap = new Map<String, Id>();
List<String> parentDunsList = new List<String>();
For(Account a : accountList){
parentDunsList.add(a.Parent_DUNS_Number__c);
}
List<Account> parentList =[SELECT id, DUNS_Number__c FROM Account WHERE DUNS_Number__c In : parentDunsList];
FOR(Account a1 : parentList){
dunsMap.put(a1.DUNS_Number__c, a1.Id);
}
return dunsMap;
}
- DMario Lewis
- December 08, 2017
- Like
- 0
- Continue reading or reply