-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
15Questions
-
8Replies
get datetime based on time zone
how can we know or display datetime based on timezone. I have a time zone id of timezone-x, then how can i display datetime using that timezone Id. Pls help me on this.
- tulasi ram 1
- November 01, 2018
- Like
- 0
- Continue reading or reply
How to include catch block in code coverage
I am using below code
Unable to include catch block in code coverage. How can we include this catch blocks in code coverage.
global static String updateContact(Contact objContact) { try{ if(isContactUpdateable() || Test.isRunningTest()) { update objContact; return 'Contact updated successfully!'; } else { return 'Insufficient access to update contact, please contact system admin for more information'; } }catch(Exception ex) { return '' + ex.getMessage(); } }
Unable to include catch block in code coverage. How can we include this catch blocks in code coverage.
- tulasi ram 1
- September 20, 2018
- Like
- 0
- Continue reading or reply
how to disable a button click when page is reloaded/refreshed
There is a button, when the document is loaded if username password are remembered then it automatically fires sign in button. The problem here is when somebody manually refreshes the page or page is redirected to some where else then that button click is firing. How can i stop that button click when a page is refreshed manually or redirected.
- tulasi ram 1
- August 29, 2018
- Like
- 0
- Continue reading or reply
What will happen if i unchecked Disable Protocol Security checkbox in Remote site settings
Hi, we are using some Remote site settings in my org for establishing the connection. There is a checkbox named as Disable Protocol Security. What will happen if i unchecked that checkbox. I read those documents provided by salesforce, those are talking about some security implications. I didnt understood what are those, can anyone explain me what are those security implications.
- tulasi ram 1
- August 20, 2018
- Like
- 0
- Continue reading or reply
What is SSl Encryption in managed package
I Have created a managed package, when i am trying to install that package in some other orgs like Dev/ Sandbox/ Produsction we are getting below popup. What is it i didnt understand.
How can i make those check boxes to be checked.
How can i make those check boxes to be checked.
- tulasi ram 1
- August 16, 2018
- Like
- 0
- Continue reading or reply
How to decrypt some value in Apex which is coming as encrypted value from Javascript using btoa function
Hi we are using javascript remoting in visualforce pages. There is a method in javascript that is passing a password in encrypted form using btoa function. Then this data is recieving by one Apex method which is annotated by @remoteAction. But how i can decrypt that password in Apex. Please help in this.
- tulasi ram 1
- August 13, 2018
- Like
- 0
- Continue reading or reply
how to hide password in inspect or DOM elements
<input id="pwd" name="pwd" placeholder="Password" type="password" value="abc123" aria-invalid="false" class="valid">
Password is showing in different places like network preserve log, inspect elements.
this is the situation which i am facing in inspect elements. How to hide the password element or value in DOM elements. Please help me in this
Password is showing in different places like network preserve log, inspect elements.
this is the situation which i am facing in inspect elements. How to hide the password element or value in DOM elements. Please help me in this
- tulasi ram 1
- August 10, 2018
- Like
- 0
- Continue reading or reply
How to assign jobids to techincian ids in round robin process
Hi There are List/Array of Jobids and List/Array of Technician ids. How to assign jobids to technician in round robin process and no technician should not get more than 5 jobids. How we do that logic. Please help me on this.
- tulasi ram 1
- August 03, 2018
- Like
- 0
- Continue reading or reply
How to reference a method in anonymous window from a managed package components
I am calling a method from a class which is a component of managed package. I am getting an error like below. But it is working fine in normal org.
How we can reference variables and methods in managed package
How we can reference variables and methods in managed package
- tulasi ram 1
- August 02, 2018
- Like
- 0
- Continue reading or reply
what is the best practice to store username and password in visualforce login page
Hi,
There is a Login page implemented using visualforce pages. How to save Username and Password when user sets the check box as True. What is the best practice to follow ande where we can save those credentials. Please help me on this.
There is a Login page implemented using visualforce pages. How to save Username and Password when user sets the check box as True. What is the best practice to follow ande where we can save those credentials. Please help me on this.
- tulasi ram 1
- July 17, 2018
- Like
- 0
- Continue reading or reply
how query number of record types in javascript code
function add_Account(){
var rtsize = sforce.connection.query("SELECT Id,Name FROM RecordType WHERE SobjectType='Account'");
var records = rtsize.getArray("records");
if(records.length > 0){
window.open('/setup/ui/recordtypeselect.jsp?ent=Account&retURL=%2F001%2Fo&save_new_url=%2F001%2Fe%3FretURL%3D%252F001%252Fo', '_parent');
} else {
window.open('/001/e?retURL=%2F001%2Fo', '_parent'); }
}
there is a link on visual force page, when we click on that calls above javascript method. But it is not working, i dont know where i mistaken. Please help me
var rtsize = sforce.connection.query("SELECT Id,Name FROM RecordType WHERE SobjectType='Account'");
var records = rtsize.getArray("records");
if(records.length > 0){
window.open('/setup/ui/recordtypeselect.jsp?ent=Account&retURL=%2F001%2Fo&save_new_url=%2F001%2Fe%3FretURL%3D%252F001%252Fo', '_parent');
} else {
window.open('/001/e?retURL=%2F001%2Fo', '_parent'); }
}
there is a link on visual force page, when we click on that calls above javascript method. But it is not working, i dont know where i mistaken. Please help me
- tulasi ram 1
- July 12, 2018
- Like
- 0
- Continue reading or reply
how to query a lead based on Phone Number
1. What is the best way to find Lead record based on Phone number.
2. I have a phone number, Based on phone number i need to search a record in salesforce(I dont know which object it is). After that if that record belongs to
a. Contact it enters into first if loop
b. Lead it enters into second if loop
c. Account it enters into third if loop
What is the best way to achieve this. Please suggest me a solution.
2. I have a phone number, Based on phone number i need to search a record in salesforce(I dont know which object it is). After that if that record belongs to
a. Contact it enters into first if loop
b. Lead it enters into second if loop
c. Account it enters into third if loop
What is the best way to achieve this. Please suggest me a solution.
- tulasi ram 1
- July 10, 2018
- Like
- 0
- Continue reading or reply
upserting task is not working properly
@RemoteAction global static String createTask(String subject, String callID, String contactID, String phoneNumber) {
try{
if(!isTaskAccessible()) return 'Insufficient access to create Task, please contact system admin for more information';
List<Task> lstTask = [SELECT Id FROM Task WHERE Call_Id__c =:callID AND OwnerId =:UserInfo.getUserId() LIMIT 1];
Task objTask = lstTask.isEmpty() ? new Task(Subject = subject, Call_Id__c = callID, Nextiva_Call_Start__c = system.now(),
Nextiva_Phone_Number1__c = phoneNumber, TaskSubtype = 'Call')
: lstTask[0];
/* Id objId = contactID;
String sObjName = objId.getSObjectType().getDescribe().getName();
system.debug('=========Object name ======='+sObjName);
if(sObjName == 'Contact' || sObjName == 'Lead'){
objTask.WhoId = String.isEmpty(contactID) ? objTask.WhoId : contactID;
}
else if(sObjName == 'Account') {
objTask.WhatId = String.isEmpty(contactID) ? objTask.WhatId : contactID;
List<account> acc = [select id, (select id from contacts) from account where id=:objId];
for(account ac :acc){
for(contact con: ac.contacts){
objTask.whoid = con.id;
}
}
} else objTask.WhatId = String.isEmpty(contactID) ? objTask.WhatId : contactID; */
upsert objTask;
return objTask.Id;
}catch(Exception ex) { return '' + ex.getMessage(); }
}
If there is no contact id is found then it has to create a new task. If any contactId found it has to create a task with some WhatIds. Here if if condition fails then total try block is not working why i dont know. if no contactid found then it has to create an empty task. But it is not working. Please help me on this.
try{
if(!isTaskAccessible()) return 'Insufficient access to create Task, please contact system admin for more information';
List<Task> lstTask = [SELECT Id FROM Task WHERE Call_Id__c =:callID AND OwnerId =:UserInfo.getUserId() LIMIT 1];
Task objTask = lstTask.isEmpty() ? new Task(Subject = subject, Call_Id__c = callID, Nextiva_Call_Start__c = system.now(),
Nextiva_Phone_Number1__c = phoneNumber, TaskSubtype = 'Call')
: lstTask[0];
/* Id objId = contactID;
String sObjName = objId.getSObjectType().getDescribe().getName();
system.debug('=========Object name ======='+sObjName);
if(sObjName == 'Contact' || sObjName == 'Lead'){
objTask.WhoId = String.isEmpty(contactID) ? objTask.WhoId : contactID;
}
else if(sObjName == 'Account') {
objTask.WhatId = String.isEmpty(contactID) ? objTask.WhatId : contactID;
List<account> acc = [select id, (select id from contacts) from account where id=:objId];
for(account ac :acc){
for(contact con: ac.contacts){
objTask.whoid = con.id;
}
}
} else objTask.WhatId = String.isEmpty(contactID) ? objTask.WhatId : contactID; */
upsert objTask;
return objTask.Id;
}catch(Exception ex) { return '' + ex.getMessage(); }
}
If there is no contact id is found then it has to create a new task. If any contactId found it has to create a task with some WhatIds. Here if if condition fails then total try block is not working why i dont know. if no contactid found then it has to create an empty task. But it is not working. Please help me on this.
- tulasi ram 1
- July 04, 2018
- Like
- 0
- Continue reading or reply
custom setting records are not working in target org after installing managed package
Hi I am using Custom settings in visualforce page. And i am creating a managed package included both visualforce pages and custom settings. After installing managed package in target org i am creating custom setting records in target org. But those records are not working why i dont know. please somebody help me on this.
- tulasi ram 1
- June 06, 2018
- Like
- 0
- Continue reading or reply
sforce.one is not working in navigation from visualforce pages
I am using below code to navigate to different pages based on user is in lightning or classic. But every time return((typeof sforce != 'undefined') && sforce && (!!sforce.one)); is returning FALSE either in Lightning or Classic . Please help me in this
<apex:page > <script type="text/javascript"> function isLightningExperienceOrSalesforce1(){ return((typeof sforce != 'undefined') && sforce && (!!sforce.one)); } function popupwindow(){ if( isLightningExperienceOrSalesforce1() ) { window.open('/apex/customLightningLookup'); } else { window.open('/apex/testVFpage'); } } </script> <apex:form > <apex:commandButton value="Generate Report" onclick="popupwindow(this);"/> </apex:form> </apex:page>
- tulasi ram 1
- March 09, 2018
- Like
- 0
- Continue reading or reply
get datetime based on time zone
how can we know or display datetime based on timezone. I have a time zone id of timezone-x, then how can i display datetime using that timezone Id. Pls help me on this.
- tulasi ram 1
- November 01, 2018
- Like
- 0
- Continue reading or reply
How to include catch block in code coverage
I am using below code
Unable to include catch block in code coverage. How can we include this catch blocks in code coverage.
global static String updateContact(Contact objContact) { try{ if(isContactUpdateable() || Test.isRunningTest()) { update objContact; return 'Contact updated successfully!'; } else { return 'Insufficient access to update contact, please contact system admin for more information'; } }catch(Exception ex) { return '' + ex.getMessage(); } }
Unable to include catch block in code coverage. How can we include this catch blocks in code coverage.
- tulasi ram 1
- September 20, 2018
- Like
- 0
- Continue reading or reply
What is SSl Encryption in managed package
I Have created a managed package, when i am trying to install that package in some other orgs like Dev/ Sandbox/ Produsction we are getting below popup. What is it i didnt understand.
How can i make those check boxes to be checked.
How can i make those check boxes to be checked.
- tulasi ram 1
- August 16, 2018
- Like
- 0
- Continue reading or reply
How to reference a method in anonymous window from a managed package components
I am calling a method from a class which is a component of managed package. I am getting an error like below. But it is working fine in normal org.
How we can reference variables and methods in managed package
How we can reference variables and methods in managed package
- tulasi ram 1
- August 02, 2018
- Like
- 0
- Continue reading or reply
upserting task is not working properly
@RemoteAction global static String createTask(String subject, String callID, String contactID, String phoneNumber) {
try{
if(!isTaskAccessible()) return 'Insufficient access to create Task, please contact system admin for more information';
List<Task> lstTask = [SELECT Id FROM Task WHERE Call_Id__c =:callID AND OwnerId =:UserInfo.getUserId() LIMIT 1];
Task objTask = lstTask.isEmpty() ? new Task(Subject = subject, Call_Id__c = callID, Nextiva_Call_Start__c = system.now(),
Nextiva_Phone_Number1__c = phoneNumber, TaskSubtype = 'Call')
: lstTask[0];
/* Id objId = contactID;
String sObjName = objId.getSObjectType().getDescribe().getName();
system.debug('=========Object name ======='+sObjName);
if(sObjName == 'Contact' || sObjName == 'Lead'){
objTask.WhoId = String.isEmpty(contactID) ? objTask.WhoId : contactID;
}
else if(sObjName == 'Account') {
objTask.WhatId = String.isEmpty(contactID) ? objTask.WhatId : contactID;
List<account> acc = [select id, (select id from contacts) from account where id=:objId];
for(account ac :acc){
for(contact con: ac.contacts){
objTask.whoid = con.id;
}
}
} else objTask.WhatId = String.isEmpty(contactID) ? objTask.WhatId : contactID; */
upsert objTask;
return objTask.Id;
}catch(Exception ex) { return '' + ex.getMessage(); }
}
If there is no contact id is found then it has to create a new task. If any contactId found it has to create a task with some WhatIds. Here if if condition fails then total try block is not working why i dont know. if no contactid found then it has to create an empty task. But it is not working. Please help me on this.
try{
if(!isTaskAccessible()) return 'Insufficient access to create Task, please contact system admin for more information';
List<Task> lstTask = [SELECT Id FROM Task WHERE Call_Id__c =:callID AND OwnerId =:UserInfo.getUserId() LIMIT 1];
Task objTask = lstTask.isEmpty() ? new Task(Subject = subject, Call_Id__c = callID, Nextiva_Call_Start__c = system.now(),
Nextiva_Phone_Number1__c = phoneNumber, TaskSubtype = 'Call')
: lstTask[0];
/* Id objId = contactID;
String sObjName = objId.getSObjectType().getDescribe().getName();
system.debug('=========Object name ======='+sObjName);
if(sObjName == 'Contact' || sObjName == 'Lead'){
objTask.WhoId = String.isEmpty(contactID) ? objTask.WhoId : contactID;
}
else if(sObjName == 'Account') {
objTask.WhatId = String.isEmpty(contactID) ? objTask.WhatId : contactID;
List<account> acc = [select id, (select id from contacts) from account where id=:objId];
for(account ac :acc){
for(contact con: ac.contacts){
objTask.whoid = con.id;
}
}
} else objTask.WhatId = String.isEmpty(contactID) ? objTask.WhatId : contactID; */
upsert objTask;
return objTask.Id;
}catch(Exception ex) { return '' + ex.getMessage(); }
}
If there is no contact id is found then it has to create a new task. If any contactId found it has to create a task with some WhatIds. Here if if condition fails then total try block is not working why i dont know. if no contactid found then it has to create an empty task. But it is not working. Please help me on this.
- tulasi ram 1
- July 04, 2018
- Like
- 0
- Continue reading or reply
custom setting records are not working in target org after installing managed package
Hi I am using Custom settings in visualforce page. And i am creating a managed package included both visualforce pages and custom settings. After installing managed package in target org i am creating custom setting records in target org. But those records are not working why i dont know. please somebody help me on this.
- tulasi ram 1
- June 06, 2018
- Like
- 0
- Continue reading or reply