- Deepak Kumar Shyoran
- PRO
- 2314 Points
- Member since 2013
- Sr. Software Developer
- Briskminds Soft. Solutions
-
ChatterFeed
-
72Best Answers
-
2Likes Received
-
3Likes Given
-
2Questions
-
544Replies
how-to build selectList conditionally from a VF page using apex
I've asked similar question, but answer did not solve issue. Is this an order of execution thing or something like that???
See below, where I tried by ultimate goal of condition based on RecordType.Name, even tried a simple IF (1=2) and I still get ALL of the selectOption displayed.
What is the proper technique for this????
Thanks.
I am using this...
<apex:page standardController="MyCustom__c" sidebar="false">
.....
<apex:form >
....
<apex:pageBlockSection title="Build PickList">
......
<apex:selectList >
{ ! IF (1=2)
{
<apex:selectOption itemLabel="1=1" itemValue="1=1"/>
}
}
.....
ultimate goal is this conditional, but even the IF (1=2) does not seem to execute properly
I DO get the MyCustom__c.RecordType.Name A-OK.
However, the IF seems to fail, because I get ALL THREE selectOption displayed every time.
{ !IF
(CONTAINS (MyCustom__c.RecordType.Name,"Hiring"),
{
<apex:selectOption itemLabel="Initial Contact for Hiring Need" itemValue="Initial Contact"/>
<apex:selectOption itemLabel="Follow-up Contact for Hiring Need" itemValue="Followup Contact"/>}
,
{ <apex:selectOption itemLabel="NOT Hiring Need" itemValue="NOT Hiring Need"/>}
)
}
</apex:selectList>
- Carla Cook
- May 02, 2016
- Like
- 0
- Continue reading or reply
When save apex class problem appear like update api version for class.
- Mohan sharma
- November 11, 2014
- Like
- 0
- Continue reading or reply
difference between id ,accountid, parentid (in feed item) abd RelatedRecordId
- Chitral Chadda
- November 09, 2014
- Like
- 0
- Continue reading or reply
Help about maps
{
//Check it is user
if(objFeedItem.ParentId!=null && String.valueOf(objFeedItem.ParentId).startsWith('005'))
{
accIdSet.add(objFeedItem.ParentId);
}
}
Map<Id,User> userMap=null;
if(accIdSet.size()>0)
{
userMap = new Map<Id,User>([select Id,AccountId__c from User where Id in :accIdSet]);
IN this we did not put anoything in msp using map.put( someting,something);
we use query: userMap = new Map<Id,User>([select Id,AccountId__c from User where Id in :accIdSet]);
map<id,user> ====> serach value is id and what it wud return is user .
so i am not able to understand this statement
userMap = new Map<Id,User>([select Id,AccountId__c from User where Id in :accIdSet]);
are we putting anything inside the map and whats the use of writing query here?/
also,
if(objFeedItem.type=='QuestionPost')
{
objCase = new Case();
objCase.Subject=objFeedItem.Title;
objCase.Description=objFeedItem.Body;
objCase.Origin = 'Portal';
objCase.Type = 'Portal Enquiry';
Id accId = userMap.get(objFeedItem.ParentId).AccountId__c;
if(accId!=null)
{
objCase.AccountId = accId;
lstCase.add(objCase);
in this line
Id accId = userMap.get(objFeedItem.ParentId).AccountId__c;
it wud return the id of user? cz this is what we used in map<id,user>
- Chitral Chadda
- November 09, 2014
- Like
- 0
- Continue reading or reply
A custom object have a lookup of other custom object.
- Parteek Goyal 3
- November 09, 2014
- Like
- 0
- Continue reading or reply
Writing Test Class
I am new to SFDC and i have written one trigger but i'm not able to write test class for it someone please tell me how can i write test class for this trigger my Trigger is
trigger FetchVatvalue on Quote__c (before insert,before update)
{
//create reference table for lookup value
Map<String, Decimal> vatMap = new Map<String, Decimal>();
//build reference table for VAT rates
for (VAT__c vat : [SELECT Name,Vat_Rate__c FROM VAT__c])
vatMap.put(vat.Name, vat.Vat_Rate__c);
//update Quote__c with VAT rate
for (Quote__c q : trigger.new)
{
Decimal vatRate = vatMap.get(q.Country_Code__c);
q.VAT_Rate__c = vatRate;
}
}
this trigger is wrtten for automaticaly fetch value from another object using picklist
thank you,
Sam
- Samadhan Sakhale 3
- November 08, 2014
- Like
- 0
- Continue reading or reply
Error: Unknown constructor 'student.student()
public class student{
public Student__c lststudent{get;set;}
public String str{get;set;}
public student(ApexPages.StandardController sc){
String studentid=sc.getID();
if(studentid == null && studentid == ''){
lststudent=[SELECT id from student__c where id=:studentid];
}
else{
lststudent=new Student__c();
}
}
public PageReference savemethod(){
insert lststudent;
if(str =='new'){
lststudent=new Student__c();
str=null;
}
return null;
}
public List<Student__c> getrecord(){
List<Student__c> allrecord=[SELECT id,name__c,manager__c,address__c,email__c from Student__c];
return allrecord;
}
}
----------------------------------------
<apex:page Controller="student">
<apex:form >
<apex:pageBlock >
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!savemethod}"/>
<apex:commandButton value="Save and New" action="{!savemethod}"/>
<apex:param id="name" value="new" assignTo="{!str}"/>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="1">
<apex:inputField value="{!lststudent.name}"/>
<apex:inputField value="{!lststudent.Name__c}"/>
<apex:inputField value="{!lststudent.Email__c}"/>
<apex:inputfield value="{!lststudent.Phone__c}"/>
<apex:inputField value="{!lststudent.Manager__c}"/>
<apex:inputField value="{!lststudent.Address__c}"/>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
<apex:pageBlock title="Records">
<apex:dataTable value="{!record}" var="r">
<apex:column >
<apex:outputLabel title="hh">Name</apex:outputLabel>
{!r.Name__c}
</apex:column>
</apex:dataTable>
</apex:pageBlock>
</apex:page>
this will show an error:
Error: Unknown constructor 'student.student()
and please also tell me how to set header name of a column when we show a list record on a page.
please help me
- Parteek Goyal 3
- November 08, 2014
- Like
- 0
- Continue reading or reply
System.AssertException: Assertion Failed: Expected: 2.5, Actual: 0 this error
the below is my test class
@istest
public class myclass
{
static testMethod void veriflyStudentupdation()
{
Student__c student = new Student__c(Name='Sam',Roll_No__c=2.5,Address__c='silod');
{
insert student;
class__c newClass = new class__c(student__c = student.Id, Roll_No__c= '2');
test.startTest();
insert newClass;
System.debug('Test Started.,..');
test.stopTest();
System.debug('Test Completed.,..');
student__c upd_student = [Select Id,Roll_No__c from student__c where id = :student.Id];
system.assertEquals(2.5, upd_student.Roll_No__c );
}
}
}
- Devendra Hirulkar 3
- November 08, 2014
- Like
- 0
- Continue reading or reply
Customize Deployments isn't running
I have a problem here =/
I develop this simple page to start a Live Agent chat, but these functions isn't running:
liveagent.enableLogging();
liveagent.setChatWindowHeight(800);
liveagent.setChatWindowWidht(600);
Here is the complete code:
<script type="text/javascript">
if (!window._laq){ window._laq = []; }
window._laq.push(function(){
liveagent.showWhenOnline('573190000008OLY', document.getElementById('Online'));
liveagent.showWhenOffline('573190000008OLY', document.getElementById('Offline'));
});
</script>
<input type='button' name='liveagent' onclick='test()' id='Online' value='Iniciar Chat'>
<span id='Offline'>Support Offline </span>
<script type='text/javascript' src='https://c.la3-c2cs-chi.salesforceliveagent.com/content/g/js/32.0/deployment.js'></script>
<script type='text/javascript'>
liveagent.init('https://d.la3-c2cs-chi.salesforceliveagent.com/chat', '572190000008OK1', '00D19000000DMeE');
function test(){
liveagent.startChat("573190000008OLY");
liveagent.enableLogging();
liveagent.setChatWindowHeight(800);
liveagent.setChatWindowWidht(600);
}
</script>
Sorry my bad english, but what could be done?
- Alexander Rocha
- October 31, 2014
- Like
- 0
- Continue reading or reply
Before Trigger Referencing Custom Setting Not Updating Properly
When I run my trigger, the bolded system.debug show that the Contact Owner values is being set correctly (i.e. the User Id is the User Id mapped to the Billing Country in the Custom Setting), but the field is ulitmately not updated with the correct User Id. Based on field history tracking, it does not look like its being updated at all.
Am I missing something on this trigger?
trigger AssignContact on Contact (before insert, before update) {
Set<String> accountSet = new Set<String>();
Set<Id> contactIdSet = new Set<Id>();
List<Lead_Assignment__c> lstBillingOwner = [Select ID,Country__c, New_Owner_ID__c FROM Lead_Assignment__c];
Map<String,String> mpCountryOwner = new Map<String,String>();
for(Lead_Assignment__c l1 : lstBillingOwner) {
mpCountryOwner.put(l1.Country__c, l1.New_Owner_ID__c);
}
Map<Id,User> mpUser = new Map<Id,User>([Select ID FROM User Where ID IN :mpCountryOwner.values()]);
Set<Id> accIds = new Set<Id>();
for(Contact con : trigger.new){
accIds.add(con.AccountId);
}
Map<Id,Account> mpAcc = new Map<Id,Account>([Select ID, Name, BillingCountry FROM Account Where ID IN :accIds]);
for(Contact con : trigger.new){
Account act = mpAcc.get(con.AccountId);
if(con.AccountId != null && act.BillingCountry != null){
if(mpCountryOwner.get(act.BillingCountry) != null){
con.owner = mpUser.get(mpCountryOwner.get(act.BillingCountry) );
System.debug('***** - Updating Owner - New Owner - '+con.owner);
}
}
}
}
- Marie Kagay
- October 28, 2014
- Like
- 0
- Continue reading or reply
Custom Button
if click on Display 1.if any contacts is there went to contacts view page
2.no contacts show error msg
How to do it.
- NNR
- October 15, 2014
- Like
- 1
- Continue reading or reply
Modify Trigger
after creating a new trigger system does not allow me to change it.
Someone explain to me why?
- Tengroup Pierluigi Boari
- October 15, 2014
- Like
- 0
- Continue reading or reply
Can I Insert a Object with Lookup field to Salesforce
Another custom object named Product, it has a lookup field which has relationship with Event
Now, in my local web application, I want to insert a product to saleForce based on a existing event.
How can I create the relationship between the Event and Product by local code ?
in other words, what prameter for Product's lookup field should I pass ?
- Jerome Scola
- October 15, 2014
- Like
- 0
- Continue reading or reply
Current id get JavaScript
How to get the current record id in JavaScript without using visualforcepage. Is this possible means kindly give a example
Thanks...
- sundhar.mks1.3962649227519546E12
- October 15, 2014
- Like
- 0
- Continue reading or reply
Error: Unknown property 'String.DataCategoryName'
My Page:
<apex:page standardController="Core_Benefit__kav" extensions="GetURL" id="corebenefitpageid" applyBodyTag="false" sidebar="false" showHeader="true" >
<apex:outputText id="categoryname" value="{!Category.DataCategoryName}"/>
</apex:page>
My Controller:
public class GetURL {
public GetURL(ApexPages.KnowledgeArticleVersionStandardController controller) {
filterid=[SELECT Id FROM Core_Benefit__kav WHERE ArticleNumber = '{!Core_Benefit__kav.ArticleNumber}' AND PublishStatus = 'online' AND Language = 'en_US'].Id;
CatDetails= [Select DataCategoryName,DataCategoryGroupName from Core_Benefit__DataCategorySelection where ParentId =:'filterid'].DataCategoryName;
}
public string CatDetails;
public string filterid;
public string getCategory() {
return CatDetails;
}
}
- rebvijkum
- October 15, 2014
- Like
- 0
- Continue reading or reply
Retrieve all the data by object ID
Need some help here,
I want to retrieve all the field data of a particular object.
I see standard retrieve core call (http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_retrieve.htm" target="_blank) has three arguments (fieldList, sObjectType, ids).
How can I retrieve all the data in all the fields without passing in full field list?
Thanks in advance
Nadula
- Nadula
- October 15, 2014
- Like
- 0
- Continue reading or reply
Custom settings
I am using custom settings data in trigger to populate value in custom field.
I am using list custom settings and i have created field of datatype number in custom settings , My task is i have to use this value in trigger and every time trigger fired it has to be incremented. I have done this one but the issue is the number value is incremented like 1, 2, 3 ....., .
I want the number like 001,002,003.....
can any one suggest me.
Thanks,
Sarevsh.
- sarvesh001
- October 13, 2014
- Like
- 0
- Continue reading or reply
Unable to get Related List
If I put in the <apex:detail /> component. I see the related list for the child records. If I put in <apex:relatedList > I get a Visualforce Error that it is not a valid child relationship name for entity Produce Order. I have tried a dozen different options for <apex:relatedList list="Child LIst" > with always the same error.
Here is a snippet of my code.
<apex:page standardController="Produce_Order__c" sidebar="false" >
<apex:sectionHeader title="{!Produce_Order__c.Name} - {!Produce_Order__c.Pickup_Date__c}" subtitle="{!Produce_Order__c.Pickup_Site__r.Name}" />
<apex:pageBlock title="{!Produce_Order__c.Farmers_Market_Producer__r.Name}" >
<apex:pageblockSection columns="1">
<apex:relatedList list="Produce Order Items"/ >
</apex:pageblockSection>
</apex:pageBlock>
</apex:page>
Thanks!
- Allen Moy
- October 12, 2014
- Like
- 0
- Continue reading or reply
Mass merge Contact
Can anyone tell me how to perform mass merge contact?
Thanks in advance
Karthick
- SS Karthick
- October 11, 2014
- Like
- 0
- Continue reading or reply
VisualForce Page-Display Column in single row
I have created the visualforce page and i am using two different variables using PageBlock table.
Page Block tabl creates two different sections.
How can i show all the columns in single row.below is my VF page
<apex:page controller="callCampaignController">
<apex:form >
<apex:pageBlock title="Campaign Members Details" >
<apex:pageblocktable value="{! CampaignMembers}" var="cm">
<apex:column >
<apex:pageblocktable value="{!cm.ActivityHistories}" var="tm">
<apex:column headerValue="Subject">
<apex:outputfield value="{!tm.Subject}"/>
</apex:column>
</apex:pageblocktable>
<apex:pageblocktable value="{!cm.CampaignMembers}" var="cpm">
<apex:column headerValue="Member Status">
<apex:outputfield value="{!cpm.Status}"/>
</apex:column>
</apex:pageblocktable>
</apex:column>
</apex:pageblocktable>
</apex:pageBlock>
</apex:form>
</apex:page>
- Rajashri
- October 10, 2014
- Like
- 0
- Continue reading or reply
Case: Status Update
Hi All,
I have some records type on Case object each and also have some picklist type field on Case. I needed to change all picklist type field on and sandbox according to another sandbox for that I copy picklist type field and RecodType metadata from one to another. That's fine by doing this I'm able to change all my picklist type field according to the records type , but the value of Status on Case which is a standard field is not updated.
Please suggest me some solution so that I can updated Case:Status this field.
Any help is Appreciated
- Deepak Kumar Shyoran
- November 27, 2013
- Like
- 1
- Continue reading or reply
Problem in generating metadata WSDL from developer edition.
Hi All,
I trying to generate the metadata WSDL from my salesfroce for that I follow the following steps.
1- Login into my account with admin profile
2- Go to setup-->Develop-->Api-->Then click on Generate Metadata Api WSDL but it show this message
Check the current status of an asyncronous deploy call. Check the current status of an asyncronous deploy call. Check the current status of an asyncronous call. Creates new metadata entries asyncronously. Deletes metadata entries asyncronously. Deploys a zipfile full of metadata entries asynchronously. Describes features of the metadata API. Lists the available metadata components. Retrieves a set of individually specified metadata entries. Updates metadata entries asyncronously. Manage your Salesforce.com metadata
please suggest me the way so that i can generate WSDL
Any help will be appreciated
Thanks
Deepak Shyoran
- Deepak Kumar Shyoran
- June 27, 2013
- Like
- 1
- Continue reading or reply
Case: Status Update
Hi All,
I have some records type on Case object each and also have some picklist type field on Case. I needed to change all picklist type field on and sandbox according to another sandbox for that I copy picklist type field and RecodType metadata from one to another. That's fine by doing this I'm able to change all my picklist type field according to the records type , but the value of Status on Case which is a standard field is not updated.
Please suggest me some solution so that I can updated Case:Status this field.
Any help is Appreciated
- Deepak Kumar Shyoran
- November 27, 2013
- Like
- 1
- Continue reading or reply
Problem in generating metadata WSDL from developer edition.
Hi All,
I trying to generate the metadata WSDL from my salesfroce for that I follow the following steps.
1- Login into my account with admin profile
2- Go to setup-->Develop-->Api-->Then click on Generate Metadata Api WSDL but it show this message
Check the current status of an asyncronous deploy call. Check the current status of an asyncronous deploy call. Check the current status of an asyncronous call. Creates new metadata entries asyncronously. Deletes metadata entries asyncronously. Deploys a zipfile full of metadata entries asynchronously. Describes features of the metadata API. Lists the available metadata components. Retrieves a set of individually specified metadata entries. Updates metadata entries asyncronously. Manage your Salesforce.com metadata
please suggest me the way so that i can generate WSDL
Any help will be appreciated
Thanks
Deepak Shyoran
- Deepak Kumar Shyoran
- June 27, 2013
- Like
- 1
- Continue reading or reply
Update custom quote field checkbox checked if on specific Opportunity record type
trigger Trigger_MarkPrimaryQuote on Quote (before insert) { // List<String> oracleQuoteList = new List<String>(); for(Quote qRec : Trigger.new) { qRec.Primary_Quote__c = true; oracleQuoteList.add(qRec.Oracle_Quote__c); } // List<Quote> quoteListToUpdate = new List<Quote>(); for(Quote qRec : [SELECT id,Primary_Quote__c,Oracle_Quote__c,Opportunity.RecordType.Name from Quote WHERE Oracle_Quote__c IN : oracleQuoteList]) { qRec.Primary_Quote__c =false; qRec.Opportunity.RecordType.Name ='NA Opportunity Record Type'; quoteListToUpdate.add(qRec); } // if(quoteListToUpdate != null && quoteListToUpdate .size() > 0) { update quoteListToUpdate; } }
- Bob
- May 02, 2016
- Like
- 0
- Continue reading or reply
how-to build selectList conditionally from a VF page using apex
I've asked similar question, but answer did not solve issue. Is this an order of execution thing or something like that???
See below, where I tried by ultimate goal of condition based on RecordType.Name, even tried a simple IF (1=2) and I still get ALL of the selectOption displayed.
What is the proper technique for this????
Thanks.
I am using this...
<apex:page standardController="MyCustom__c" sidebar="false">
.....
<apex:form >
....
<apex:pageBlockSection title="Build PickList">
......
<apex:selectList >
{ ! IF (1=2)
{
<apex:selectOption itemLabel="1=1" itemValue="1=1"/>
}
}
.....
ultimate goal is this conditional, but even the IF (1=2) does not seem to execute properly
I DO get the MyCustom__c.RecordType.Name A-OK.
However, the IF seems to fail, because I get ALL THREE selectOption displayed every time.
{ !IF
(CONTAINS (MyCustom__c.RecordType.Name,"Hiring"),
{
<apex:selectOption itemLabel="Initial Contact for Hiring Need" itemValue="Initial Contact"/>
<apex:selectOption itemLabel="Follow-up Contact for Hiring Need" itemValue="Followup Contact"/>}
,
{ <apex:selectOption itemLabel="NOT Hiring Need" itemValue="NOT Hiring Need"/>}
)
}
</apex:selectList>
- Carla Cook
- May 02, 2016
- Like
- 0
- Continue reading or reply
How could salesforce work with Oracle.
- Total Lai
- March 22, 2016
- Like
- 0
- Continue reading or reply
Avoid for loop method having query? Causing Too many SOQL queries: 101
I have some methods one method for loop calling another method, that method having query and return values. some times causing error message like Too many SOQL queries: 101 . How to avoid this, my sample code is below. Guide me to Solve this issue . Where i have to change my code .
public List<MarkSheetDomain> getMarksheet(){
List<AggregateResult> subjectCodes = new List<AggregateResult>();
List<MarkSheet> marks = new List<MarkSheet>();
SemesterSelection = string.escapesinglequotes(SemesterSelection);
subjectCodes = [Select Subject_Code__c code from catalog__c where Paper__c ='Maths' And Subject_Code__c != null GROUP BY Subject_Code__c];
for (AggregateResult subjectcode : subjectCodes){
MarkSheet mark = new MarkSheet();
mark.SubjectCode = String.valueOf(subjectcode.get('code'));
mark.ExternalExam = getExternalExams(mark.SubjectCode);
marks.add(mark);
}
return marks;
}
public String getExternalExams(string Subjectcode) {
RollNo = string.escapesinglequotes(RollNo);
External_Exam__c ExtExm = new External_Exam__c();
ExtExm = [Select Title__c, Score__c from External_Exam__c where Sem__c=:SemesterSelection And Subject_Code__c =:Subjectcode and Student__r.Roll_No__c =:RollNo];
System.debug('Test on Mark' + ExtExm );
System.debug('Test on Mark' + ExtExm.Score__c);
return String.valueOf(ExtExm.Score__c);
}
Advance Thanks
Maheshwar
- Siva Sakthi
- September 10, 2015
- Like
- 0
- Continue reading or reply
System.LimitException: DML currently not allowed
But I get this error:
System.LimitException: DML currently not allowed
for (Pipeline_Item__c p : pl) { if (p.Actual_P1_MOR__c== null){ p.Actual_P1_MOR__c=0; } if (p.Pipeline__r.CurrencyIsoCode=='USD') { p.Rate_to_USD__c=1; } else { p.USD_MOR_1__c=morMap.get('January'); p.USD_MOR_2__c=morMap.get('February'); p.USD_MOR_3__c=morMap.get('March'); if (p.Pipeline__r.CurrencyIsoCode=='EUR') { String cic = 'EUR'; p.Rate_to_USD__c= bemap.get(cic); } else if (p.Pipeline__r.CurrencyIsoCode=='BRL') { String cic = 'BRL'; p.Rate_to_USD__c= bemap.get(cic); } else if (p.Pipeline__r.CurrencyIsoCode=='CAD') { String cic = 'CAD'; p.Rate_to_USD__c= bemap.get(cic); } else if (p.Pipeline__r.CurrencyIsoCode=='PLN') { String cic = 'PLN'; p.Rate_to_USD__c= bemap.get(cic); } else if (p.Pipeline__r.CurrencyIsoCode=='GBP') { String cic = 'GBP'; p.Rate_to_USD__c= bemap.get(cic); } } if (p.Estimate1__c != null) q.Estimate__c += p.Estimate1__c* p.Rate_to_USD__c; if (p.Op_P1__c != null) q.OP__c += p.Op_P1__c* p.Rate_to_USD__c; if (p.Op_P2__c != null) q.OP__c += p.Op_P2__c* p.Rate_to_USD__c; if (p.Op_P3__c != null) q.OP__c += p.Op_P3__c* p.Rate_to_USD__c; if (p.Actual_P1__c != null){ q.Month1__c += p.Actual_P1__c* p.Rate_to_USD__c; if (p.USD_MOR_1__c != null){ q.Month1MOR__c += p.Actual_P1__c*p.USD_MOR_1__c; p.Actual_P1_MOR__c += 100; } else { q.Month1MOR__c = q.Month1__c; } } if (p.Actual_P2__c != null){ q.Month2__c += p.Actual_P2__c* p.Rate_to_USD__c; if (p.USD_MOR_2__c != null){ q.Month2MOR__c += p.Actual_P2__c*p.USD_MOR_2__c; } else { q.Month2MOR__c = q.Month2__c; } } if (p.Actual_P3__c != null) { q.Month3__c += p.Actual_P3__c* p.Rate_to_USD__c; if (p.USD_MOR_3__c != null){ q.Month3MOR__c += p.Actual_P3__c*p.USD_MOR_3__c; } else { q.Month3MOR__c = q.Month3__c; } } } update pl; <---------------------------------
Any idea?
Thankyou!
- Deloitte IT Admin 2
- September 10, 2015
- Like
- 0
- Continue reading or reply
In a picklist, I want to display US, UK on the top and rest should be alphabetical order?
- Sunil S
- August 12, 2015
- Like
- 0
- Continue reading or reply
Remove the URL in Pop up window.
Could someone please let us know if it is possible to remove the message " This Page at https://salesforce.com Says" from the pop up page. this is the normal javascript alert message.
Thank you,
Regards,
Christwin
- uat_live1.3903047664538198E12
- January 24, 2015
- Like
- 1
- Continue reading or reply
Increase Custom button size in Listview
Could someone please let us know if it is possible to increase the width of the standard button "New" in the list view.
Thank you,
Regards,
Christwin
- uat_live1.3903047664538198E12
- January 24, 2015
- Like
- 0
- Continue reading or reply
When save apex class problem appear like update api version for class.
- Mohan sharma
- November 11, 2014
- Like
- 0
- Continue reading or reply
update VIN based on account name and contact name
can any one suggest we have a standard object called case.we have a field called VIn no in case object.
whenever new case is created with account name and contact name,based on account name and contact name VIN should be populated.
Can anyone suggest how can i do this to get VIN no populated and VIN field is lookup here
- Sravya Sadhu 4
- November 11, 2014
- Like
- 0
- Continue reading or reply
rerender visualforce component from visualforce page
- Tena Wolver
- November 11, 2014
- Like
- 1
- Continue reading or reply
Invalid Data Error
Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger OpportunityTriggers caused an unexpected exception, contact your administrator: OpportunityTriggers: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: Class.OpportunityTriggerHandler.closeOpportunitiesWithSameSpaceController: line 424, column 1.
Any suggestions on how to fix?
thanks in advance.
- Sonia Inverso
- November 11, 2014
- Like
- 1
- Continue reading or reply
Fiscal year starts first Thursday of each July
I have a requirement to assign a Q1/Q2/Q3/Q4 to an opportunity in a custom field for reporting purposes.
My finanical year and Quarter 1 start date is the first Thursday of each July (cinema company in Australia).
I'm completley new and although I have sifted through allot of discussions on here can't seem to find my solution.
Is anyone able to assist?
- Scott Ryan
- November 11, 2014
- Like
- 0
- Continue reading or reply
how to close the window after performing the action method on a page
I have a blank page with an action method that performs some database inserts and finally after that I need to close this window.
following is my code.my page has only the following code:
<apex:page action="{!generatePDF}" controller="VFC_ER_GeneratePDF" showheader="false" standardStylesheets="false" >
</apex:page>
In the controller 'VFC_ER_GeneratePDF' I have a method called generatePDF with the following code. and finally after that I want to close this window. How do I do that pls help...
public class VFC_ER_GeneratePDF {
public string sigID;
public string ERID;
public VFC_ER_GeneratePDF() {
sigID = System.currentPageReference().getParameters().get('sigID');
ERID = System.currentPageReference().getParameters().get('id');
}
public pageReference generatePDF() {
PageReference pdf = New PageReference ('/apex/'+ 'vf_SignatureCaptured');
// add parent id to the parameters for standardcontroller
pdf.getParameters().put('id',ERID);
pdf.getParameters().put('sigID',sigID);
// create the new attachment
Attachment attach = new Attachment();
// the contents of the attachment from the pdf
Blob body;
try {
// returns the output of the page as a PDF
body = pdf.getContentAsPDF();
}
catch (VisualforceException e)
{
// need to pass unit test -- current bug
body = Blob.valueOf('Some Text');
}
attach.Body = body;
attach.Name = ERId + '.pdf';
attach.IsPrivate = false;
attach.ParentId = ERId;
insert attach;
system.debug('Final Attachement' + attach);
//delete the signature attachment
List<Attachment> attachedFiles = [select Id from Attachment where id =:sigID limit 1];
if( attachedFiles != null && attachedFiles.size() > 0 )
{
delete attachedFiles;
}
//this is where I need to close this window.
}
}
- lali
- November 11, 2014
- Like
- 0
- Continue reading or reply
Why is user role displayed as mandatory filed?
Why is the user role displayed as a required field on the user detail page even though the validation is not enforced on the same?
- Sudha Krishna Sunkavalli
- November 09, 2014
- Like
- 0
- Continue reading or reply
difference between id ,accountid, parentid (in feed item) abd RelatedRecordId
- Chitral Chadda
- November 09, 2014
- Like
- 0
- Continue reading or reply
Writing Test Class
I am new to SFDC and i have written one trigger but i'm not able to write test class for it someone please tell me how can i write test class for this trigger my Trigger is
trigger FetchVatvalue on Quote__c (before insert,before update)
{
//create reference table for lookup value
Map<String, Decimal> vatMap = new Map<String, Decimal>();
//build reference table for VAT rates
for (VAT__c vat : [SELECT Name,Vat_Rate__c FROM VAT__c])
vatMap.put(vat.Name, vat.Vat_Rate__c);
//update Quote__c with VAT rate
for (Quote__c q : trigger.new)
{
Decimal vatRate = vatMap.get(q.Country_Code__c);
q.VAT_Rate__c = vatRate;
}
}
this trigger is wrtten for automaticaly fetch value from another object using picklist
thank you,
Sam
- Samadhan Sakhale 3
- November 08, 2014
- Like
- 0
- Continue reading or reply
rerender visualforce component from visualforce page
- Tena Wolver
- November 11, 2014
- Like
- 1
- Continue reading or reply
Invalid Data Error
Error: Invalid Data.
Review all error messages below to correct your data.
Apex trigger OpportunityTriggers caused an unexpected exception, contact your administrator: OpportunityTriggers: execution of AfterUpdate caused by: System.NullPointerException: Attempt to de-reference a null object: Class.OpportunityTriggerHandler.closeOpportunitiesWithSameSpaceController: line 424, column 1.
Any suggestions on how to fix?
thanks in advance.
- Sonia Inverso
- November 11, 2014
- Like
- 1
- Continue reading or reply
Custom Button
if click on Display 1.if any contacts is there went to contacts view page
2.no contacts show error msg
How to do it.
- NNR
- October 15, 2014
- Like
- 1
- Continue reading or reply