-
ChatterFeed
-
7Best Answers
-
0Likes Received
-
0Likes Given
-
2Questions
-
21Replies
Hello. Is it possible to convert a drop down field on the contact page to a text field?
Hello.
Is it possible to convert a drop down field on the contact page to a text field?
- Calen Wilk
- January 05, 2017
- Like
- 0
- Continue reading or reply
- Ravindar Admin
- December 28, 2016
- Like
- 0
- Continue reading or reply
interview question plz answer
1.what is assert..? what the use..?
2.what is opportunity team...?
3..what force .com sites ..?
4.what is terrority mangement..?what the use..?
5.what is custom component..?
2.what is opportunity team...?
3..what force .com sites ..?
4.what is terrority mangement..?what the use..?
5.what is custom component..?
- sfdc start
- August 17, 2016
- Like
- 0
- Continue reading or reply
Where is the 'Opportunities Dashboard' in Chatter.
I'm new to Chatter & have searched but cannot identify the correct one! Can anyone provide the link to the correct page please?
- Clare Langley
- August 15, 2016
- Like
- 0
- Continue reading or reply
Missing Users
I do not have any users, other then the 3 that come with it plus myself. I don't have Allison Wheeler or any other that are used in the demos. Does anyone know why the users would be in there?
- Tom Halligan
- August 11, 2016
- Like
- 0
- Continue reading or reply
Error in module "Manipulating Records with DML"
Hi,
I have a problem with module "Manipulating Records with DML"
The 'insertNewAccount' method must accept an incoming string as a parameter, name the account after the parameter, insert it into the system and then return the account record.
My code is:
public class AccountHandler {
public static ID insertNewAccount(String nombre){
ID prueba =null;
Account cuent= new Account();
try {
cuent = new Account(Name=nombre);
insert cuent;
prueba = cuent.Id;
} catch (DmlException e) {
System.debug('A DML exception has occurred: ' +
e.getMessage());
}
System.debug('**********' +prueba);
System.debug('**********' +cuent.Name);
return prueba;
}
}
I would like you ayudaseis I find the error.
Thank you
I have a problem with module "Manipulating Records with DML"
The 'insertNewAccount' method must accept an incoming string as a parameter, name the account after the parameter, insert it into the system and then return the account record.
My code is:
public class AccountHandler {
public static ID insertNewAccount(String nombre){
ID prueba =null;
Account cuent= new Account();
try {
cuent = new Account(Name=nombre);
insert cuent;
prueba = cuent.Id;
} catch (DmlException e) {
System.debug('A DML exception has occurred: ' +
e.getMessage());
}
System.debug('**********' +prueba);
System.debug('**********' +cuent.Name);
return prueba;
}
}
I would like you ayudaseis I find the error.
Thank you
- Ruben Vasco
- August 10, 2016
- Like
- 0
- Continue reading or reply
Trigger Error:no viable alternative at character '"'
trigger AddRelatedCustomer on Account (after insert) {
I am new to salesforce and I am gett the no viable alternative at character '"' from this trigger. Can you tell me what I am doing wrong
List<Contact> cont = new List<Contact>();
for(Account acct: Trigger.new)
{
cont.add(New Contact(LastName = "Stitt",FirstName = "Sonny", AccountID = acct.ID));
insert cont;
}
}
I am new to salesforce and I am gett the no viable alternative at character '"' from this trigger. Can you tell me what I am doing wrong
List<Contact> cont = new List<Contact>();
for(Account acct: Trigger.new)
{
cont.add(New Contact(LastName = "Stitt",FirstName = "Sonny", AccountID = acct.ID));
insert cont;
}
}
- Charles McDowell
- August 09, 2016
- Like
- 0
- Continue reading or reply
Null Pointer Exception Help
Hello,
I am attempting to create a trigger that populates an empty Country Code field (on an Event) given that the Assigned to Country Code (the event is assigned to someone) field is populated. I receive the following error after running a test on my Trigger.
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, SVMXC.Event_Trigger1: execution of BeforeInsert
caused by: System.NullPointerException: Attempt to de-reference a null object
Trigger.SVMXC.Event_Trigger1: line 104, column 1: []
Here is my trigger
and Here is the test class
I am attempting to create a trigger that populates an empty Country Code field (on an Event) given that the Assigned to Country Code (the event is assigned to someone) field is populated. I receive the following error after running a test on my Trigger.
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, SVMXC.Event_Trigger1: execution of BeforeInsert
caused by: System.NullPointerException: Attempt to de-reference a null object
Trigger.SVMXC.Event_Trigger1: line 104, column 1: []
Here is my trigger
public class SVMX_PopulateActivityCountryCode extends TriggerAction { public Id eventRecordTypeId = Schema.SObjectType.Event.getRecordTypeInfosByName().get('PS WP CS').getRecordTypeId(); List<ID> eventIDList = new List<ID>(); public Event[] eventsToUpdate = new Event[]{}; public SVMX_PopulateActivityCountryCode() { //Call super to set batch variables and context super(); } public override Boolean shouldRun(){ if(this.isInsert()&&!this.hasRun()) { for(Event e: (List<Event>)Trigger.new) { if(e.RecordTypeId == eventRecordTypeId && e.SXWP_Country_Code__c==null&& e.OwnerId!=null&&e.SXWP_Assigned_To_Country_Code__c!=null) { eventIDList.add(e.Id); } } } return !eventIDList.isEmpty(); } public override void doAction() { this.markRun(); for(Event existingEvent:[SELECT id FROM event WHERE id IN:eventIDList]) { existingEvent.SXWP_Country_Code__c = existingEvent.SXWP_Assigned_To_Country_Code__c; eventsToUpdate.add(existingEvent); } update eventsToUpdate; } }
and Here is the test class
@isTest public class SVMX_PopulateActivityCCTest { private static Id techRecordTypeId = Schema.SObjectType.SVMXC__Service_Group_Members__c.getRecordTypeInfosByName().get('Technician').getRecordTypeId(); private static Id teamRecordTypeId = Schema.SObjectType.SVMXC__Service_Group__c.getRecordTypeInfosByName().get('Technician').getRecordTypeId(); private static Id eventRecordTypeId = Schema.SObjectType.Event.getRecordTypeInfosByName().get('PS WP CS').getRecordTypeId(); private static Event currentEvent = new Event(); private static User u = new User(); private static SVMXC__Service_Group__c team = new SVMXC__Service_Group__c(); private static SVMXC__Service_Group_Members__c technician = new SVMXC__Service_Group_Members__c(); private static void setUpData() { team.RecordTypeId = teamRecordTypeId; team.Name = 'Carnival'; insert team; u= TestUtil.createUser('00e120000019I9K'); u.GID__c = 'Z002SH0P'; insert u; technician.RecordTypeId = techRecordTypeId; technician.SVMXC__Service_Group__c = team.Id; technician.Name = 'Victor Hugo'; technician.SVMXC__Enable_Scheduling__c = True; technician.SVMXC__Active__c = True; //The meat of the trigger lies in the following line technician.SXWP_Country_Code__c = 'CA'; technician.SXWP_GID__c ='Z002SH0P'; insert technician; id userId = [Select id from User where GID__c ='Z002SH0P'].get(0).Id; String techCC = [SELECT SXWP_Country_Code__c from SVMXC__Service_Group_Members__c WHERE SXWP_GID__c ='Z002SH0P' limit 1][0].SXWP_Country_Code__c; currentEvent.SXWP_Country_Code__c= NULL; currentEvent.Record_Id__c = eventRecordTypeId; currentEvent.OwnerId = userId; currentEvent.Subject = 'Event Test'; currentEvent.Location = 'Location'; currentEvent.Description='description'; currentEvent.IsAllDayEvent=false; currentEvent.Start_Date__c= date.newInstance(1990, 11, 21); currentEvent.EndDateTime = date.newInstance(1990, 11, 22); insert currentEvent; } Static testmethod void updateEvent() { Test.startTest(); setUpData(); List<SVMXC__Service_Group_Members__c > sgm = [Select SXWP_Country_Code__c from SVMXC__Service_Group_Members__c Where Id = :technician.Id LIMIT 1]; system.assertEquals(1,[Select Count() from SVMXC__Service_Group_Members__c Where Id = :technician.Id]); List<Event> e = [Select SXWP_Assigned_To_Country_Code__c,SXWP_Country_Code__c from Event Where Id = :currentEvent.Id LIMIT 1]; system.assertEquals(1,[Select Count() from Event Where Id = :currentEvent.Id]); system.assertNotEquals(NULL,e[0].SXWP_Country_Code__c); system.assertEquals(e[0].SXWP_Assigned_To_Country_Code__c,e[0].SXWP_Country_Code__c); Test.stopTest(); } }
- Esther Onema
- December 28, 2016
- Like
- 0
- Continue reading or reply
How to launch another visualforce page upon the click of a button
Hello,
I am working on a visualforce page that asks the viewer to enter an email adress they are searching for within the salesforce system. Upon clicking a button, I would like the viewer to see a list of user emails that direcly match/simliar to the one entered on the previous page. How do I launch a new visualforce page upon the click of a button? And how do I create the second page as described prior?
Here is what I have so far.
I am working on a visualforce page that asks the viewer to enter an email adress they are searching for within the salesforce system. Upon clicking a button, I would like the viewer to see a list of user emails that direcly match/simliar to the one entered on the previous page. How do I launch a new visualforce page upon the click of a button? And how do I create the second page as described prior?
Here is what I have so far.
<apex:page standardController="User"> <apex:form > <apex:pageBlock title="User email search"> Please enter the email address of the user you are looking for: <p/> <apex:inputField value="{!user.email}"/> <p/> <apex:commandButton action="{!save}" value="Submit"/> </apex:pageBlock> </apex:form> </apex:page>
- Esther Onema
- August 12, 2016
- Like
- 0
- Continue reading or reply
Add a custom field to the Contact object
The field 'Prequalified_Amount__c' either does not exists on the Contact object or it is not of type currency.
i am getting this when i added Prequalified Amount as field under the object "Contact". Looked straightforward. Not sure what went wrong. I selected data type as currency and updated Prequalified Amount and field lable and PrequalifiedAmount as field name... got stuck in the first challange question of trailhead playground. Can anyone help..
i am getting this when i added Prequalified Amount as field under the object "Contact". Looked straightforward. Not sure what went wrong. I selected data type as currency and updated Prequalified Amount and field lable and PrequalifiedAmount as field name... got stuck in the first challange question of trailhead playground. Can anyone help..
- Divik Verma
- August 16, 2017
- Like
- 0
- Continue reading or reply
case alert issue
Hi,
whenever case is opened for account for particular region ( say WEST-WE), only inside rep ( it’s a rep) should get email alert for the concerned case of his account (not for the account for which he is not rep.)
How to do it?
whenever case is opened for account for particular region ( say WEST-WE), only inside rep ( it’s a rep) should get email alert for the concerned case of his account (not for the account for which he is not rep.)
How to do it?
- Dilip Kulkarni
- May 08, 2017
- Like
- 0
- Continue reading or reply
- jenny jade
- January 17, 2017
- Like
- 0
- Continue reading or reply
Hello. Is it possible to convert a drop down field on the contact page to a text field?
Hello.
Is it possible to convert a drop down field on the contact page to a text field?
- Calen Wilk
- January 05, 2017
- Like
- 0
- Continue reading or reply
Null Pointer Exception Help
Hello,
I am attempting to create a trigger that populates an empty Country Code field (on an Event) given that the Assigned to Country Code (the event is assigned to someone) field is populated. I receive the following error after running a test on my Trigger.
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, SVMXC.Event_Trigger1: execution of BeforeInsert
caused by: System.NullPointerException: Attempt to de-reference a null object
Trigger.SVMXC.Event_Trigger1: line 104, column 1: []
Here is my trigger
and Here is the test class
I am attempting to create a trigger that populates an empty Country Code field (on an Event) given that the Assigned to Country Code (the event is assigned to someone) field is populated. I receive the following error after running a test on my Trigger.
System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, SVMXC.Event_Trigger1: execution of BeforeInsert
caused by: System.NullPointerException: Attempt to de-reference a null object
Trigger.SVMXC.Event_Trigger1: line 104, column 1: []
Here is my trigger
public class SVMX_PopulateActivityCountryCode extends TriggerAction { public Id eventRecordTypeId = Schema.SObjectType.Event.getRecordTypeInfosByName().get('PS WP CS').getRecordTypeId(); List<ID> eventIDList = new List<ID>(); public Event[] eventsToUpdate = new Event[]{}; public SVMX_PopulateActivityCountryCode() { //Call super to set batch variables and context super(); } public override Boolean shouldRun(){ if(this.isInsert()&&!this.hasRun()) { for(Event e: (List<Event>)Trigger.new) { if(e.RecordTypeId == eventRecordTypeId && e.SXWP_Country_Code__c==null&& e.OwnerId!=null&&e.SXWP_Assigned_To_Country_Code__c!=null) { eventIDList.add(e.Id); } } } return !eventIDList.isEmpty(); } public override void doAction() { this.markRun(); for(Event existingEvent:[SELECT id FROM event WHERE id IN:eventIDList]) { existingEvent.SXWP_Country_Code__c = existingEvent.SXWP_Assigned_To_Country_Code__c; eventsToUpdate.add(existingEvent); } update eventsToUpdate; } }
and Here is the test class
@isTest public class SVMX_PopulateActivityCCTest { private static Id techRecordTypeId = Schema.SObjectType.SVMXC__Service_Group_Members__c.getRecordTypeInfosByName().get('Technician').getRecordTypeId(); private static Id teamRecordTypeId = Schema.SObjectType.SVMXC__Service_Group__c.getRecordTypeInfosByName().get('Technician').getRecordTypeId(); private static Id eventRecordTypeId = Schema.SObjectType.Event.getRecordTypeInfosByName().get('PS WP CS').getRecordTypeId(); private static Event currentEvent = new Event(); private static User u = new User(); private static SVMXC__Service_Group__c team = new SVMXC__Service_Group__c(); private static SVMXC__Service_Group_Members__c technician = new SVMXC__Service_Group_Members__c(); private static void setUpData() { team.RecordTypeId = teamRecordTypeId; team.Name = 'Carnival'; insert team; u= TestUtil.createUser('00e120000019I9K'); u.GID__c = 'Z002SH0P'; insert u; technician.RecordTypeId = techRecordTypeId; technician.SVMXC__Service_Group__c = team.Id; technician.Name = 'Victor Hugo'; technician.SVMXC__Enable_Scheduling__c = True; technician.SVMXC__Active__c = True; //The meat of the trigger lies in the following line technician.SXWP_Country_Code__c = 'CA'; technician.SXWP_GID__c ='Z002SH0P'; insert technician; id userId = [Select id from User where GID__c ='Z002SH0P'].get(0).Id; String techCC = [SELECT SXWP_Country_Code__c from SVMXC__Service_Group_Members__c WHERE SXWP_GID__c ='Z002SH0P' limit 1][0].SXWP_Country_Code__c; currentEvent.SXWP_Country_Code__c= NULL; currentEvent.Record_Id__c = eventRecordTypeId; currentEvent.OwnerId = userId; currentEvent.Subject = 'Event Test'; currentEvent.Location = 'Location'; currentEvent.Description='description'; currentEvent.IsAllDayEvent=false; currentEvent.Start_Date__c= date.newInstance(1990, 11, 21); currentEvent.EndDateTime = date.newInstance(1990, 11, 22); insert currentEvent; } Static testmethod void updateEvent() { Test.startTest(); setUpData(); List<SVMXC__Service_Group_Members__c > sgm = [Select SXWP_Country_Code__c from SVMXC__Service_Group_Members__c Where Id = :technician.Id LIMIT 1]; system.assertEquals(1,[Select Count() from SVMXC__Service_Group_Members__c Where Id = :technician.Id]); List<Event> e = [Select SXWP_Assigned_To_Country_Code__c,SXWP_Country_Code__c from Event Where Id = :currentEvent.Id LIMIT 1]; system.assertEquals(1,[Select Count() from Event Where Id = :currentEvent.Id]); system.assertNotEquals(NULL,e[0].SXWP_Country_Code__c); system.assertEquals(e[0].SXWP_Assigned_To_Country_Code__c,e[0].SXWP_Country_Code__c); Test.stopTest(); } }
- Esther Onema
- December 28, 2016
- Like
- 0
- Continue reading or reply
- Ravindar Admin
- December 28, 2016
- Like
- 0
- Continue reading or reply
interview question plz answer
1.what is assert..? what the use..?
2.what is opportunity team...?
3..what force .com sites ..?
4.what is terrority mangement..?what the use..?
5.what is custom component..?
2.what is opportunity team...?
3..what force .com sites ..?
4.what is terrority mangement..?what the use..?
5.what is custom component..?
- sfdc start
- August 17, 2016
- Like
- 0
- Continue reading or reply
Where is the 'Opportunities Dashboard' in Chatter.
I'm new to Chatter & have searched but cannot identify the correct one! Can anyone provide the link to the correct page please?
- Clare Langley
- August 15, 2016
- Like
- 0
- Continue reading or reply
- LOKESH BACHU
- August 14, 2016
- Like
- 0
- Continue reading or reply
Missing Users
I do not have any users, other then the 3 that come with it plus myself. I don't have Allison Wheeler or any other that are used in the demos. Does anyone know why the users would be in there?
- Tom Halligan
- August 11, 2016
- Like
- 0
- Continue reading or reply
Error in module "Manipulating Records with DML"
Hi,
I have a problem with module "Manipulating Records with DML"
The 'insertNewAccount' method must accept an incoming string as a parameter, name the account after the parameter, insert it into the system and then return the account record.
My code is:
public class AccountHandler {
public static ID insertNewAccount(String nombre){
ID prueba =null;
Account cuent= new Account();
try {
cuent = new Account(Name=nombre);
insert cuent;
prueba = cuent.Id;
} catch (DmlException e) {
System.debug('A DML exception has occurred: ' +
e.getMessage());
}
System.debug('**********' +prueba);
System.debug('**********' +cuent.Name);
return prueba;
}
}
I would like you ayudaseis I find the error.
Thank you
I have a problem with module "Manipulating Records with DML"
The 'insertNewAccount' method must accept an incoming string as a parameter, name the account after the parameter, insert it into the system and then return the account record.
My code is:
public class AccountHandler {
public static ID insertNewAccount(String nombre){
ID prueba =null;
Account cuent= new Account();
try {
cuent = new Account(Name=nombre);
insert cuent;
prueba = cuent.Id;
} catch (DmlException e) {
System.debug('A DML exception has occurred: ' +
e.getMessage());
}
System.debug('**********' +prueba);
System.debug('**********' +cuent.Name);
return prueba;
}
}
I would like you ayudaseis I find the error.
Thank you
- Ruben Vasco
- August 10, 2016
- Like
- 0
- Continue reading or reply
Trigger Error:no viable alternative at character '"'
trigger AddRelatedCustomer on Account (after insert) {
I am new to salesforce and I am gett the no viable alternative at character '"' from this trigger. Can you tell me what I am doing wrong
List<Contact> cont = new List<Contact>();
for(Account acct: Trigger.new)
{
cont.add(New Contact(LastName = "Stitt",FirstName = "Sonny", AccountID = acct.ID));
insert cont;
}
}
I am new to salesforce and I am gett the no viable alternative at character '"' from this trigger. Can you tell me what I am doing wrong
List<Contact> cont = new List<Contact>();
for(Account acct: Trigger.new)
{
cont.add(New Contact(LastName = "Stitt",FirstName = "Sonny", AccountID = acct.ID));
insert cont;
}
}
- Charles McDowell
- August 09, 2016
- Like
- 0
- Continue reading or reply
Test Class No coverage Help
HI am a newbee to SF. Kindly suggest what's wrong with the below test class.
@IsTest
public class testclassownerassignmanager{
static testmethod void metest(){
Profile pro = [SELECT Id FROM Profile WHERE Name='Standard User'];
User testUserA = new User(
Alias = 'standard', Email='standarduser@testorg.com',
EmailEncodingKey='UTF-8', LastName='Testing', LanguageLocaleKey='en_US',
LocaleSidKey='en_US', ProfileId = pro.Id,
TimeZoneSidKey='America/Los_Angeles',
UserName='testUserA@testorganise.com');
insert testUserA ;
User testUserB = new User(
Alias = 'standard', Email='standarduser@testorg.com',
EmailEncodingKey='UTF-8', LastName='Testing', LanguageLocaleKey='en_US',
LocaleSidKey='en_US', ProfileId = pro.Id,
TimeZoneSidKey='America/Los_Angeles',
UserName='testUserB@testorganise.com');
testUserB.ManagerID = testUserA.id;
insert testUserB;
List<Account> acclist= new List<Account>();
for(Integer i=0;i<=10;i++){
account a = new account(Name='Test' + i, ownerid=testUserB.id);
acclist.add(a);
List<Account> TobUpdateAcclist= new List<Account>();
for(Account ac: acclist){
if (ac.owner.isactive == false )
{
ac.ownerid=testUserB.managerid;
TobUpdateAcclist.add(a);
}
}
test.starttest();
if (Test.isRunningTest()) {
System.runAs(new User(Id = Userinfo.getUserId())) {
update TobUpdateAcclist;
}
} else {
update TobUpdateAcclist;
}
test.stoptest();
List<Account> updatedaccs = [select id,name from Account where ID IN: TobUpdateAcclist];
system.assertEquals(a.owner.Managerid, a.ownerid);
}}}
@IsTest
public class testclassownerassignmanager{
static testmethod void metest(){
Profile pro = [SELECT Id FROM Profile WHERE Name='Standard User'];
User testUserA = new User(
Alias = 'standard', Email='standarduser@testorg.com',
EmailEncodingKey='UTF-8', LastName='Testing', LanguageLocaleKey='en_US',
LocaleSidKey='en_US', ProfileId = pro.Id,
TimeZoneSidKey='America/Los_Angeles',
UserName='testUserA@testorganise.com');
insert testUserA ;
User testUserB = new User(
Alias = 'standard', Email='standarduser@testorg.com',
EmailEncodingKey='UTF-8', LastName='Testing', LanguageLocaleKey='en_US',
LocaleSidKey='en_US', ProfileId = pro.Id,
TimeZoneSidKey='America/Los_Angeles',
UserName='testUserB@testorganise.com');
testUserB.ManagerID = testUserA.id;
insert testUserB;
List<Account> acclist= new List<Account>();
for(Integer i=0;i<=10;i++){
account a = new account(Name='Test' + i, ownerid=testUserB.id);
acclist.add(a);
List<Account> TobUpdateAcclist= new List<Account>();
for(Account ac: acclist){
if (ac.owner.isactive == false )
{
ac.ownerid=testUserB.managerid;
TobUpdateAcclist.add(a);
}
}
test.starttest();
if (Test.isRunningTest()) {
System.runAs(new User(Id = Userinfo.getUserId())) {
update TobUpdateAcclist;
}
} else {
update TobUpdateAcclist;
}
test.stoptest();
List<Account> updatedaccs = [select id,name from Account where ID IN: TobUpdateAcclist];
system.assertEquals(a.owner.Managerid, a.ownerid);
}}}
- Siva Admin
- August 09, 2016
- Like
- 0
- Continue reading or reply
- Lakshmi S
- August 09, 2016
- Like
- 0
- Continue reading or reply