-
ChatterFeed
-
0Best Answers
-
0Likes Received
-
0Likes Given
-
8Questions
-
30Replies
how to hide a certain fields in a related list object<apex:relatedlist list="contacts"> in vf page.. sample code please
how to hide a certain fields in a related list object<apex:relatedlist list="contacts"> in vf page.. sample code please
-
- Valli K
- December 03, 2018
- Like
- 0
- Continue reading or reply
how to cover bellow boolean in test class
public static boolean validatemethod (Id acc,String str,Id rec){
boolean validatemethod = true;
List<custom__c> cus = new List<custom__c>();
if(rec==null){
/
cus = [Select id,name from custom__c where account__c =:acc and Product__c =:str];
}
else{
cus = [Select id,name from custom__c where account__c =:acc and Product__c =: str and id !=:rec];
}
if(!cus.isEmpty()){
return false;
}
return validatemethod;
}
boolean validatemethod = true;
List<custom__c> cus = new List<custom__c>();
if(rec==null){
/
cus = [Select id,name from custom__c where account__c =:acc and Product__c =:str];
}
else{
cus = [Select id,name from custom__c where account__c =:acc and Product__c =: str and id !=:rec];
}
if(!cus.isEmpty()){
return false;
}
return validatemethod;
}
-
- Valli K
- October 30, 2018
- Like
- 0
- Continue reading or reply
prepopulate lookup field in lightning:recordeditform with lightning:inputfield
prepopulate lookup field in lightning:recordeditform with lightning:inputfield
-
- Valli K
- October 17, 2018
- Like
- 0
- Continue reading or reply
i wan to fetch content from a zip file[json data] and dispaly it in lightning component. Json formatted zip file os uploaded standard files. that zip file content json data have to display it in lightning component. Any sample code for this.
i wan to fetch content from a zip file[json data] and dispaly it in lightning component. Json formatted zip file os uploaded standard files. that zip file content json data have to display it in lightning component. Any sample code for this.
-
- Valli K
- October 07, 2018
- Like
- 0
- Continue reading or reply
i want to create a lightning component same functionality as below existing vf page :
<apex:page standardController="Opportunity" extensions="Optydoc">
<script>
var i = 0;
window.onload = function(){
document.getElementById('hiddenform').submit();
}
function countalert(){
i++;
if(i===3){
window.parent.location.reload();
}
}
</script>
<form id="hiddenform" action="{!iframeURL}" target="JavaApplication" method="post" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="source" value="SFDC"/>
<input type="hidden" name="opportunityId" value="{!OppId}"/>
<input type="hidden" name="accountId" value="{!AccId}"/>
<input type="hidden" name="primaryAssociation" value="Opportunity"/>
</form>
<apex:pageblock id="upload">
<apex:pageBlockSection title="Upload Documents" columns="1">
<iframe id="JavaApplication" name="JavaApplication" style="display:block;width:100%;height:550px" scrolling="no" ></iframe>
</apex:pageBlockSection>
<apex:pageMessages ></apex:pageMessages>
</apex:pageblock>
</apex:page>
=====================
public with sharing class Optydoc {
public String iFrameURL { get; set; }
public Id OppID { get; set; }
public Id AccID {
get{
if(OppID!=null){
Opportunity opp = [select AccountId from Opportunity Where Id=: OppID];
return opp.AccountID;
}
return null;
}
set;
}
public Optydoc(ApexPages.StandardController stdController) {
OppID = stdController.getRecord().Id;
try{
iframeURL = CustomSetting__c.getInstance('JavaApplication').endPointURL__c;
System.debug('Exceptionrwrr'+iframeURL);
}catch(Exception e){
System.debug('Exception'+e);
}
}
<script>
var i = 0;
window.onload = function(){
document.getElementById('hiddenform').submit();
}
function countalert(){
i++;
if(i===3){
window.parent.location.reload();
}
}
</script>
<form id="hiddenform" action="{!iframeURL}" target="JavaApplication" method="post" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="source" value="SFDC"/>
<input type="hidden" name="opportunityId" value="{!OppId}"/>
<input type="hidden" name="accountId" value="{!AccId}"/>
<input type="hidden" name="primaryAssociation" value="Opportunity"/>
</form>
<apex:pageblock id="upload">
<apex:pageBlockSection title="Upload Documents" columns="1">
<iframe id="JavaApplication" name="JavaApplication" style="display:block;width:100%;height:550px" scrolling="no" ></iframe>
</apex:pageBlockSection>
<apex:pageMessages ></apex:pageMessages>
</apex:pageblock>
</apex:page>
=====================
public with sharing class Optydoc {
public String iFrameURL { get; set; }
public Id OppID { get; set; }
public Id AccID {
get{
if(OppID!=null){
Opportunity opp = [select AccountId from Opportunity Where Id=: OppID];
return opp.AccountID;
}
return null;
}
set;
}
public Optydoc(ApexPages.StandardController stdController) {
OppID = stdController.getRecord().Id;
try{
iframeURL = CustomSetting__c.getInstance('JavaApplication').endPointURL__c;
System.debug('Exceptionrwrr'+iframeURL);
}catch(Exception e){
System.debug('Exception'+e);
}
}
-
- Valli K
- May 28, 2018
- Like
- 0
- Continue reading or reply
i am trying to delete a row in data table (lightning component). Below is the JS controller & ape controller for this. But not able to fix this.
Lighnting component javascript controller:
deleteRecord : function(component,event,helper,recordId){
var action = component.get("c.deleteSelRecord");
action.setParams({"recordId":recordId});
action.setCallback(this,function(response){
var state = response.getState();
if(state === "SUCCESS"){
var result = response.getReturnValue();
//if(result ==="true"){
// toast message
alert("Requested Record Deleted");
component.set("v.isOpen", false);
// }
console.log(" result :: "+JSON.stringify(result));
}else{
console.log(" Error Occured");
}
});
$A.enqueueAction(action);
}
Apex controller:
@AuraEnabled
public static list<Quote> deleteSelRecord(String recordId){
// boolean result = true;
// if successs return true;
// return result;
System.debug('Quote got deleted');
List<quote> quotess = new List<quote>();
quotess= [Select Id, Name, QuoteNumber,Status,OpportunityId FROM quote where Id =:recordId ORDER BY QuoteNumber ];
if(quotess.size() > 0){
try{
delete quotess;
}catch(Exception e){
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Exception: '+e);
ApexPages.addMessage(myMsg);
return quotess;
}
}
deleteRecord : function(component,event,helper,recordId){
var action = component.get("c.deleteSelRecord");
action.setParams({"recordId":recordId});
action.setCallback(this,function(response){
var state = response.getState();
if(state === "SUCCESS"){
var result = response.getReturnValue();
//if(result ==="true"){
// toast message
alert("Requested Record Deleted");
component.set("v.isOpen", false);
// }
console.log(" result :: "+JSON.stringify(result));
}else{
console.log(" Error Occured");
}
});
$A.enqueueAction(action);
}
Apex controller:
@AuraEnabled
public static list<Quote> deleteSelRecord(String recordId){
// boolean result = true;
// if successs return true;
// return result;
System.debug('Quote got deleted');
List<quote> quotess = new List<quote>();
quotess= [Select Id, Name, QuoteNumber,Status,OpportunityId FROM quote where Id =:recordId ORDER BY QuoteNumber ];
if(quotess.size() > 0){
try{
delete quotess;
}catch(Exception e){
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.ERROR,'Exception: '+e);
ApexPages.addMessage(myMsg);
return quotess;
}
}
-
- Valli K
- May 25, 2018
- Like
- 0
- Continue reading or reply
not able to migrate my javascript button in lightning experience. please help me to convert the below button. I am new to Lightning. current onclick javascript action: window.location.href ='/apex/RequestType?&id={!Opportunity.Id}';
not able to migrate my javascript button in lightning experience. please help me to convert the below button. I am new to Lightning. current onclick javascript action: window.location.href ='/apex/RequestType?&id={!Opportunity.Id}';
-
- Valli K
- May 18, 2018
- Like
- 0
- Continue reading or reply
how to hide a certain fields in a related list object<apex:relatedlist list="contacts"> in vf page.. sample code please
how to hide a certain fields in a related list object<apex:relatedlist list="contacts"> in vf page.. sample code please
- Valli K
- December 03, 2018
- Like
- 0
- Continue reading or reply
how to cover bellow boolean in test class
public static boolean validatemethod (Id acc,String str,Id rec){
boolean validatemethod = true;
List<custom__c> cus = new List<custom__c>();
if(rec==null){
/
cus = [Select id,name from custom__c where account__c =:acc and Product__c =:str];
}
else{
cus = [Select id,name from custom__c where account__c =:acc and Product__c =: str and id !=:rec];
}
if(!cus.isEmpty()){
return false;
}
return validatemethod;
}
boolean validatemethod = true;
List<custom__c> cus = new List<custom__c>();
if(rec==null){
/
cus = [Select id,name from custom__c where account__c =:acc and Product__c =:str];
}
else{
cus = [Select id,name from custom__c where account__c =:acc and Product__c =: str and id !=:rec];
}
if(!cus.isEmpty()){
return false;
}
return validatemethod;
}
- Valli K
- October 30, 2018
- Like
- 0
- Continue reading or reply
prepopulate lookup field in lightning:recordeditform with lightning:inputfield
prepopulate lookup field in lightning:recordeditform with lightning:inputfield
- Valli K
- October 17, 2018
- Like
- 0
- Continue reading or reply
i wan to fetch content from a zip file[json data] and dispaly it in lightning component. Json formatted zip file os uploaded standard files. that zip file content json data have to display it in lightning component. Any sample code for this.
i wan to fetch content from a zip file[json data] and dispaly it in lightning component. Json formatted zip file os uploaded standard files. that zip file content json data have to display it in lightning component. Any sample code for this.
- Valli K
- October 07, 2018
- Like
- 0
- Continue reading or reply
i want to create a lightning component same functionality as below existing vf page :
<apex:page standardController="Opportunity" extensions="Optydoc">
<script>
var i = 0;
window.onload = function(){
document.getElementById('hiddenform').submit();
}
function countalert(){
i++;
if(i===3){
window.parent.location.reload();
}
}
</script>
<form id="hiddenform" action="{!iframeURL}" target="JavaApplication" method="post" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="source" value="SFDC"/>
<input type="hidden" name="opportunityId" value="{!OppId}"/>
<input type="hidden" name="accountId" value="{!AccId}"/>
<input type="hidden" name="primaryAssociation" value="Opportunity"/>
</form>
<apex:pageblock id="upload">
<apex:pageBlockSection title="Upload Documents" columns="1">
<iframe id="JavaApplication" name="JavaApplication" style="display:block;width:100%;height:550px" scrolling="no" ></iframe>
</apex:pageBlockSection>
<apex:pageMessages ></apex:pageMessages>
</apex:pageblock>
</apex:page>
=====================
public with sharing class Optydoc {
public String iFrameURL { get; set; }
public Id OppID { get; set; }
public Id AccID {
get{
if(OppID!=null){
Opportunity opp = [select AccountId from Opportunity Where Id=: OppID];
return opp.AccountID;
}
return null;
}
set;
}
public Optydoc(ApexPages.StandardController stdController) {
OppID = stdController.getRecord().Id;
try{
iframeURL = CustomSetting__c.getInstance('JavaApplication').endPointURL__c;
System.debug('Exceptionrwrr'+iframeURL);
}catch(Exception e){
System.debug('Exception'+e);
}
}
<script>
var i = 0;
window.onload = function(){
document.getElementById('hiddenform').submit();
}
function countalert(){
i++;
if(i===3){
window.parent.location.reload();
}
}
</script>
<form id="hiddenform" action="{!iframeURL}" target="JavaApplication" method="post" enctype="application/x-www-form-urlencoded">
<input type="hidden" name="source" value="SFDC"/>
<input type="hidden" name="opportunityId" value="{!OppId}"/>
<input type="hidden" name="accountId" value="{!AccId}"/>
<input type="hidden" name="primaryAssociation" value="Opportunity"/>
</form>
<apex:pageblock id="upload">
<apex:pageBlockSection title="Upload Documents" columns="1">
<iframe id="JavaApplication" name="JavaApplication" style="display:block;width:100%;height:550px" scrolling="no" ></iframe>
</apex:pageBlockSection>
<apex:pageMessages ></apex:pageMessages>
</apex:pageblock>
</apex:page>
=====================
public with sharing class Optydoc {
public String iFrameURL { get; set; }
public Id OppID { get; set; }
public Id AccID {
get{
if(OppID!=null){
Opportunity opp = [select AccountId from Opportunity Where Id=: OppID];
return opp.AccountID;
}
return null;
}
set;
}
public Optydoc(ApexPages.StandardController stdController) {
OppID = stdController.getRecord().Id;
try{
iframeURL = CustomSetting__c.getInstance('JavaApplication').endPointURL__c;
System.debug('Exceptionrwrr'+iframeURL);
}catch(Exception e){
System.debug('Exception'+e);
}
}
- Valli K
- May 28, 2018
- Like
- 0
- Continue reading or reply
not able to migrate my javascript button in lightning experience. please help me to convert the below button. I am new to Lightning. current onclick javascript action: window.location.href ='/apex/RequestType?&id={!Opportunity.Id}';
not able to migrate my javascript button in lightning experience. please help me to convert the below button. I am new to Lightning. current onclick javascript action: window.location.href ='/apex/RequestType?&id={!Opportunity.Id}';
- Valli K
- May 18, 2018
- Like
- 0
- Continue reading or reply
unable to delete/edit a post posted to discussion forum
hi all,
I urgently need to edit/delete a post made by me on this discussion forum...But its not allowing me to do so and pops up
saying that 'you cant delete this question as others are interested in it'.
There are no likes and no comments on it still i am unable to delete it
Any help would be highly appreciated
Its very urgent,
Thanks,
I urgently need to edit/delete a post made by me on this discussion forum...But its not allowing me to do so and pops up
saying that 'you cant delete this question as others are interested in it'.
There are no likes and no comments on it still i am unable to delete it
Any help would be highly appreciated
Its very urgent,
Thanks,
- SFDC coder
- August 14, 2014
- Like
- 0
- Continue reading or reply