-
ChatterFeed
-
8Best Answers
-
1Likes Received
-
1Likes Given
-
3Questions
-
47Replies
Unable to get the pick list values into controller
I am not able to get the results when I add the picklist values to controller.
Below is the code - Please sugget me the changes to get the desired results.
<apex:page controller="searchres">
<apex:form >
<apex:pageBlock >
<apex:sectionHeader title="Search Results"/>
<apex:pageBlockSection >
<apex:panelGrid columns="2">
<apex:outputText value="Country"/>
<apex:inputText value="{!country}"/>
Qualification<apex:inputField label="Qualification" value="{!ban.Qualification__c}"/>
</apex:panelGrid><br/>
<!--<apex:selectList title="Qualification" label="Qualification">
<apex:selectOptions value="{!TypeOptions}"/>
</apex:selectList>-->
<apex:commandButton value="Search" action="{!login}"/>
</apex:pageBlockSection>
<apex:pageBlockSection >
<apex:pageBlockTable value="{!bank}" var="bnk">
<apex:column headerValue="Country" value="{!bnk.Country__c}"/>
<apex:column headerValue="Qualification" value="{!bnk.Qualification__c}"/>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
///////////////Controller
public class searchres {
public string country{get;set;}
public string name{get;set;}
public string Qualification{get;set;}
public string quali{get;set;}
public list<SOV_Database__c> bank{get;set;}
Public SOV_Database__c ban{get;set;}
//this.stdAcctController = (SOV_Database__c)stdcontroller.getRecord();
public id sh;
public void login()
{
bank = [select id,country__c,qualification__c from SOV_Database__c where country__c=:country];
}
public List<SelectOption> TypeOptions
{
get
{
List<SelectOption> options = new List<SelectOption>();
Schema.DescribeFieldResult fieldResult = SOV_Database__c.country__c.getDescribe();
List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
for( Schema.PicklistEntry f : ple)
options.add(new SelectOption(f.getLabel(), f.getValue()));
return options;
}
}
}
- Prad Nethas
- November 20, 2015
- Like
- 0
- Continue reading or reply
How to call apex function on div tag in Visualforce page
FYI:
<apex:page standardController="Contact">
<style>
#header {
/*line-height:30px; text-transform: uppercase;*/
background-color:#fff000;
height:20px;
width:50px;
float:left;
padding:5px;
color: red;
font-family: "Times New Roman", Times, serif;
text-align: center;
border-radius: 15px;
}
#header:hover{
cursor:pointer;
background-color:#ff9933;
opacity:0.5;
}
</style>
<apex:form id="fm">
<apex:pageBlock>
<apex:pageBlockButtons>
<div id="header">
save
<apex:actionSupport event="onclick" action="{!save}" rerender="fm"/>
</div>
</apex:pageBlockButtons>
<apex:pageBlockSection>
<apex:inlineEditSupport>
<apex:outputField value="{!Contact.lastName}"/>
<apex:outputField value="{!Contact.firstName}"/>
</apex:inlineEditSupport>
</apex:pageBlockSection>
</apex:pageBlock
</apex:form>
</apex:page>
- sampath kumar 3
- November 20, 2015
- Like
- 0
- Continue reading or reply
Error when trying to implement toString method on a custom class
public String toString() { return csvCell; }
csvCell is defined as a private String.
- Doug Beltowski X
- November 19, 2015
- Like
- 0
- Continue reading or reply
VisualForce - Remove decimal from value pulled using !$User resource
<apex:outputText value="{!Math.Floor({!$User.Performance_Points_MTD_User__c})}"/><br/>
Any ideas?
- MattMet86
- November 17, 2015
- Like
- 0
- Continue reading or reply
Is it ok to call the action and onclick event on command button at a time in visualforce..?
<apex:commandbutton action="{!page2}" onclick="return conrimnew(event)" value="confirm"/>
but here i need to open one confirm box..if it is ok then i need to execute the apex method .please help me guys..for first time it's working good..but at first time if i cancel and then for next time if i ok..i am not able to call the apex method..please help me.guys..
Thanks
VamsiKrishna
- vamsi krishna 106
- November 16, 2015
- Like
- 0
- Continue reading or reply
lookup field in apex and report
I'm trying to create a report with some custom objects and I can't manage to do it, certainly because of an issue in my apex code...
To explain, I have created 3 custom objects : Quote, Items and Delivery.
The object « Quote » always has a record, and for 1 record in « Quote », there can be 0 to n records in Items and in Delivery.
So Quote is like a Parent with 2 children : Items ans Delivery.
I have added a lookup relation on Quote to Items and Delivery, and also created a Lookup on Items and Delivery to Quote.
Then I have created a new report, with Primary object : Quote, and in Edit layout, I have added fields of Items and Delivery thanks to « Add fields related via lookup ».
But now, when I run my report, it is empty… If I only display Quote fields I have some records, but when I add fields from Items or Delivery, I have no record in my report.
Maybe, I don’t insert data as it has to be done in Apex.
I do it like this :
Quote__c insertQuote = new Quote__c();
insertQuote.ECOM_CustomerId__c = ‘abcd’;
insert insertQuote;
Item__c insertQuoteItem = new Item__c();
insertQuoteItem.Quantity__c = 1;
insertQuoteItem.Quote__r = insertQuote;
insert insertQuoteItem;
But on different forums, I see as I need to use Quote__r, and sometimes Quote__c = Id…
Is there something wrong ? I completely lost, and can’t see what is wrong !!
I just begin with salesforce, and even with the help I found on forums, I didn't manage to fix my issue.
Don't hesitate to ask me if it is not clear !
Thank you very much for you help.
Regards,
- Arnaud Combes
- November 11, 2015
- Like
- 0
- Continue reading or reply
Need solution to execute trigger forcefully for all existing objects
Hello,
I have a Object 2 Objects like below, which has Master detail Relationship.
Object 1 (Master)
Field 1 (Number Type)
Object 2 (Detail)
Field 2 (Currency type)
I have a trigger which will calculate from Field 2(Field in Detail object) and put a calculated value on Field 1 (Of Master Object).
As this trigger is implemented now,
How is it possibel to execute the trigger for the already exsisting Objects, which are not gonna be updated.
Thank you for suggestion !
- Ab
- November 09, 2015
- Like
- 0
- Continue reading or reply
how make some lines of text as bold in textarea in vf page?
I have used html <textarea> tag. I want to show some lines of text as bold in vf page. Please any one can give help.
- vijaya kudupudi
- October 30, 2015
- Like
- 0
- Continue reading or reply
Dynamic sObject Lookup assignment
Schema.SObjectType quoType = Schema.getGlobalDescribe().get('quote'); sObject quo = quoType.newSObject(); //This works just fine quo.put('Email', 'generic@email.com'); //I've tried different variations of this, none seem to work quo.put('AccountId' , SOME_ID); quo.put('Account', SOME_ID);
Any help is greatly appreciated, thanks in advance!
- Antonio Manente
- November 19, 2015
- Like
- 0
- Continue reading or reply
Dynamic sObject problem
Schema.SObjectType quoType = Schema.getGlobalDescribe().get('quote'); sObject quo = quoType.newSObject(); //This works just fine quo.put('Email', 'generic@email.com'); //I've tried different variations of this, none seem to work quo.put('AccountId' , SOME_ID); quo.put('Account', SOME_ID);
Any help is greatly appreciated, thanks in advance!
- Antonio Manente
- November 19, 2015
- Like
- 0
- Continue reading or reply
Blank VF page in salesforce one
- Antonio Manente
- October 22, 2015
- Like
- 1
- Continue reading or reply
Blank VF page in salesforce one
- Antonio Manente
- October 22, 2015
- Like
- 1
- Continue reading or reply
SeeAllData does not seem to work on helper methods in test classes
I have following setup:
@isTest private class myTestClass { /** static helper variables to store data across different test classes to /* accelerate test speed */ Boolean isInitiated = false; // ... @isTest(SeeAllData=true) private static void init() { // create helper variable's values // ... } static testMethod void testStuff() { if ( !isInitiated ) { init(); } // test all the stuff to be tested } }Within the init method I use nother helper class I worte independatly to create different sObjects. One of them relies on a custom setting. Now I know that SeeAllData has to be set to true so that the method can access that data, but I do not understand why it doesn't work for the case above. In the documentations, it is not said that the isTest Annotation with the SeeAllData addition may only be used for the actual testMethods... I guess this must be where it fails because otherwise it seems to work correctly...
Any clarification on that?
- Roger Wicki
- December 09, 2015
- Like
- 0
- Continue reading or reply
Apex logic to calculate no. of business days between two date-time fields (not date fields)
I need apex logic to calculate no.of business days between two date-time fields. I have seen so many posts but everyone are mentioning only workflow logic but not apex logic.. (Assume Mon to Fri are business days)
Thanks in advance..
- DineshGupta
- December 09, 2015
- Like
- 0
- Continue reading or reply
Lightning PageReference redirect to external URL
- Sonya Imm
- December 07, 2015
- Like
- 0
- Continue reading or reply
Disable specific picklist in pageblocktable. Visualforce apex
I have a pageblock table contains picklist column. If the picklist in a column contains only one value it should be disabled .How can i achive this
Eg:
<apex:column header=' '>
<apex:selectList value="{!selectedCountry}" multiselect="false" > <apex:selectOptions value="{!CountriesOptions}"/> </apex:selectList>
</apex:column>
- Ram Manohar G
- December 06, 2015
- Like
- 0
- Continue reading or reply
Unable to get the pick list values into controller
I am not able to get the results when I add the picklist values to controller.
Below is the code - Please sugget me the changes to get the desired results.
<apex:page controller="searchres">
<apex:form >
<apex:pageBlock >
<apex:sectionHeader title="Search Results"/>
<apex:pageBlockSection >
<apex:panelGrid columns="2">
<apex:outputText value="Country"/>
<apex:inputText value="{!country}"/>
Qualification<apex:inputField label="Qualification" value="{!ban.Qualification__c}"/>
</apex:panelGrid><br/>
<!--<apex:selectList title="Qualification" label="Qualification">
<apex:selectOptions value="{!TypeOptions}"/>
</apex:selectList>-->
<apex:commandButton value="Search" action="{!login}"/>
</apex:pageBlockSection>
<apex:pageBlockSection >
<apex:pageBlockTable value="{!bank}" var="bnk">
<apex:column headerValue="Country" value="{!bnk.Country__c}"/>
<apex:column headerValue="Qualification" value="{!bnk.Qualification__c}"/>
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
///////////////Controller
public class searchres {
public string country{get;set;}
public string name{get;set;}
public string Qualification{get;set;}
public string quali{get;set;}
public list<SOV_Database__c> bank{get;set;}
Public SOV_Database__c ban{get;set;}
//this.stdAcctController = (SOV_Database__c)stdcontroller.getRecord();
public id sh;
public void login()
{
bank = [select id,country__c,qualification__c from SOV_Database__c where country__c=:country];
}
public List<SelectOption> TypeOptions
{
get
{
List<SelectOption> options = new List<SelectOption>();
Schema.DescribeFieldResult fieldResult = SOV_Database__c.country__c.getDescribe();
List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues();
for( Schema.PicklistEntry f : ple)
options.add(new SelectOption(f.getLabel(), f.getValue()));
return options;
}
}
}
- Prad Nethas
- November 20, 2015
- Like
- 0
- Continue reading or reply
How to cover the code of Wrapper class
i am trying to make a test class but i am facing some issue can someone help me out
Class -------------
public with sharing class NewQuoteLineItemCont {
public Quote__c quote {get; set;}
public List<QuoteLineItemWrapper> qliwList { get; set; }
public Integer glbCounter = 0;
public Integer index {get;set;}
public String type {get;set;}
public NewQuoteLineItemCont(){
String quoteId = ApexPages.CurrentPage().getParameters().get('QuoteId');
quote = ([ SELECT Id,Name FROM Quote__c WHERE Id =: quoteId ] ).get(0);
Quote_Line_Item__c item1 = new Quote_Line_Item__c();
item1.Quote__c = quote.Id;
glbCounter = 0;
Slab__c sl = new Slab__c();
qliwList = new List<QuoteLineItemWrapper> ();
QuoteLineItemWrapper qw = new QuoteLineItemWrapper ( quote , item1 , sl, glbCounter );
qliwList.add ( qw );
glbCounter++;
}
public void setSlabTableMethod(){
system.debug('===========index=============>>' + index );
if ( index != null && index >= 0 ){
QuoteLineItemWrapper qw = qliwList.get ( index );
if ( type != null && type.equalsIgnorecase('Slab') )
qw.showSlab = true;
else
qw.showSlab = false;
}
}
public void addProduct(){
Quote_Line_Item__c item1 = new Quote_Line_Item__c();
item1.Quote__c = quote.Id;
item1.Service_Tax__c = 14;
item1.VAT_CST__c = 5;
Slab__c sl = new Slab__c();
QuoteLineItemWrapper qw = new QuoteLineItemWrapper ( quote , item1 , sl, glbCounter );
qliwList.add ( qw );
glbCounter++;
system.debug('===========qliwList==============>>'+ qliwList );
}
public PageReference saveQuoteLine(){
Quote_Line_Item__c item = new Quote_Line_Item__c ();
Map<Quote_Line_Item__c,List<Slab__c>> quoteSlabMap = new Map<Quote_Line_Item__c,List<Slab__c>>();
List<Quote_Line_Item__c> insQuLineListWihoutSlab = new List<Quote_Line_Item__c>();
for ( QuoteLineItemWrapper qw : qliwList ){
System.debug('==========qw===============>>'+ qw );
System.debug('==========qw.lineItem===============>>'+ qw.lineItem );
System.debug('==========qw.slabList===============>>'+ qw.slabList );
item = qw.lineItem;
System.debug('==========item===============>>'+ item );
System.debug('==========item.Product__c ===============>>'+ item.Product__c );
System.debug('==========item.Price_Type__c===============>>'+ item.Price_Type__c);
if ( item.Product__c != null ){
if ( (item.Price_Type__c).equalsIgnoreCase('Slab') ){
List<Slab__c> slbList = new List<Slab__c>();
for ( Slab__c sl : qw.slabList ){
if ( sl.To__c != null && sl.Till__c != null && sl.Price__c != null )
slbList.add ( sl );
}
System.debug('==========item===============>>'+ item );
System.debug('==========slbList===============>>'+ slbList );
quoteSlabMap.put ( item , slbList );
}else{
insQuLineListWihoutSlab.add ( item );
}
}
}
if ( insQuLineListWihoutSlab.size() > 0 )
INSERT insQuLineListWihoutSlab;
System.debug('==========quoteSlabMap========BEFORE=======>>'+ quoteSlabMap );
if ( quoteSlabMap.size() > 0 ){
List<Quote_Line_Item__c> insQuLineList = new List<Quote_Line_Item__c>();
System.debug('==========quoteSlabMap.keySet()===============>>'+ quoteSlabMap.keySet() );
for ( Quote_Line_Item__c qline : quoteSlabMap.keySet() ){
System.debug('==========qline===============>>'+ qline );
insQuLineList.add ( qline );
}
INSERT insQuLineList;
Integer ck = 0;
List<Slab__c> insSbList = new List<Slab__c>();
for ( List<Slab__c> sbList : quoteSlabMap.values() ){
System.debug('==========sbList================>>'+ sbList );
for ( Slab__c sl : sbList ){
System.debug('==========insQuLineList.get ( ck )================>>'+ insQuLineList.get ( ck ) );
sl.Quote_Line_Item__c = insQuLineList.get ( ck ).Id;
insSbList.add ( sl );
}
ck++;
}
System.debug('==========insSbList================>>'+ insSbList );
if ( insSbList.size() > 0 )
INSERT insSbList;
/*List<Slab__c> insSlabList = new List<Slab__c>();
for ( Quote_Line_Item__c line : quoteSlabMap.keySet() ){
System.debug('==========line===============>>'+ line );
System.debug('==========line.Id===============>>'+ line.Id );
List<Slab__c> sList = quoteSlabMap.get ( line );
System.debug('==========sList===============>>'+ sList );
}
System.debug('==========quoteSlabMap========AFTER=======>>'+ quoteSlabMap );*/
}
return ( new PageReference ('/'+quote.Id) );
}
public PageReference cancelQuoteLine(){
return ( new PageReference ('/'+quote.Id) );
}
public class QuoteLineItemWrapper {
public Integer counter {get;set;}
public Quote__c quote {get;set;}
public Quote_Line_Item__c lineItem {get;set;}
public List<Slab__c> slabList {get;set;}
public Boolean showSlab {get;set;}
public QuoteLineItemWrapper( Quote__c q, Quote_Line_Item__c li , Slab__c s, Integer cnt){
counter = cnt;
quote = q;
lineItem = li;
//Slab__c slab;
slabList = new List<Slab__c>();
showSlab = false;
for ( Integer i = 0 ; i < 5 ; i++ ){
Slab__c slab = new Slab__c(name = 'slab-'+String.valueOf(i+1));
slabList.add ( slab );
}
}
}
}
and my test class is follows
@istest
Private Class TestNewQuoteLineItemCont{
Static TestMethod void TestNewQuoteLineItemCont(){
Account acc = new account();
acc.Name = 'Test';
insert acc;
Opportunity__c opp=new Opportunity__c(Name='test12',Account__c=acc.id);
insert opp;
Quote__c lead = new Quote__c();
lead.Description__c= 'TestLeadTest';
lead.Opportunity_Name__c=opp.id;
insert lead;
Product__c p=new Product__c();
p.Name='test';
insert p;
Quote_Line_Item__c Eve = new Quote_Line_Item__c();
Eve.Quote__c= lead.id;
Eve.Product__c=p.id;
insert Eve;
Slab__c s=new Slab__c();
s.name='s-1';
s.Quote_Line_Item__c=Eve.id;
insert s;
Slab__c s1=new Slab__c();
s1.name='s-1';
s1.Quote_Line_Item__c=Eve.id;
insert s1;
NewQuoteLineItemCont cls = new NewQuoteLineItemCont();
cls.QuoteLineItemWrapper a = new cls.QuoteLineItemWrapper(lead,Eve,s,1);
cls.setSlabTableMethod();
cls.addProduct();
cls.saveQuoteLine();
cls.cancelQuoteLine();
cls.index =1;
cls.type = 'abc';
}
}
Error is---------- Invalid type: cls.QuoteLineItemWrapper at line 38 column 37
- shekhar kumar 5
- November 20, 2015
- Like
- 0
- Continue reading or reply
How to call apex function on div tag in Visualforce page
FYI:
<apex:page standardController="Contact">
<style>
#header {
/*line-height:30px; text-transform: uppercase;*/
background-color:#fff000;
height:20px;
width:50px;
float:left;
padding:5px;
color: red;
font-family: "Times New Roman", Times, serif;
text-align: center;
border-radius: 15px;
}
#header:hover{
cursor:pointer;
background-color:#ff9933;
opacity:0.5;
}
</style>
<apex:form id="fm">
<apex:pageBlock>
<apex:pageBlockButtons>
<div id="header">
save
<apex:actionSupport event="onclick" action="{!save}" rerender="fm"/>
</div>
</apex:pageBlockButtons>
<apex:pageBlockSection>
<apex:inlineEditSupport>
<apex:outputField value="{!Contact.lastName}"/>
<apex:outputField value="{!Contact.firstName}"/>
</apex:inlineEditSupport>
</apex:pageBlockSection>
</apex:pageBlock
</apex:form>
</apex:page>
- sampath kumar 3
- November 20, 2015
- Like
- 0
- Continue reading or reply
Dynamic sObject Lookup assignment
Schema.SObjectType quoType = Schema.getGlobalDescribe().get('quote'); sObject quo = quoType.newSObject(); //This works just fine quo.put('Email', 'generic@email.com'); //I've tried different variations of this, none seem to work quo.put('AccountId' , SOME_ID); quo.put('Account', SOME_ID);
Any help is greatly appreciated, thanks in advance!
- Antonio Manente
- November 19, 2015
- Like
- 0
- Continue reading or reply
Error when trying to implement toString method on a custom class
public String toString() { return csvCell; }
csvCell is defined as a private String.
- Doug Beltowski X
- November 19, 2015
- Like
- 0
- Continue reading or reply
VisualForce - Remove decimal from value pulled using !$User resource
<apex:outputText value="{!Math.Floor({!$User.Performance_Points_MTD_User__c})}"/><br/>
Any ideas?
- MattMet86
- November 17, 2015
- Like
- 0
- Continue reading or reply
Is it ok to call the action and onclick event on command button at a time in visualforce..?
<apex:commandbutton action="{!page2}" onclick="return conrimnew(event)" value="confirm"/>
but here i need to open one confirm box..if it is ok then i need to execute the apex method .please help me guys..for first time it's working good..but at first time if i cancel and then for next time if i ok..i am not able to call the apex method..please help me.guys..
Thanks
VamsiKrishna
- vamsi krishna 106
- November 16, 2015
- Like
- 0
- Continue reading or reply
email format not the same like template
i'm using email templates to receive mail but seems the format is not the same as in template when the mail is recievied:
<messaging:emailTemplate subject="Your campaign {!relatedTo.Name} is due to start" recipientType="User" relatedToType="Campaign"> <messaging:htmlEmailBody > <html> <head> <style> #header { position: relative; background-color:white; left: 100px; width:60%; float:left; margin-bottom:5px; padding:5px; } #body { position: relative; left: 100px; background-color:white; height:250px; width:60%; float:left; padding:5px; } </style> </head> <body bgcolor="#00A1C1"> <div> <div id ="header"> <img src="NEC_Logo" alt="logo"></img> </div> <div id ="body"> Dear {!recipient.name} <br></br> <br> Notification that "{!relatedTo.Name}" is due to start today. </br> </div> </div> </body> </html> </messaging:htmlEmailBody> </messaging:emailTemplate>
Any input on how to make it consistent with the template please?
- PS81
- November 16, 2015
- Like
- 0
- Continue reading or reply
Incompatible element type Set<String> for colection of System.SelectOption
Incompatible element type Set for collection of System.SelectOption.
public List<SelectOption> cpOptions { get { if (cpOptions== null) { cpOptions = new List<SelectOption>(); } return cpOptions ; } set; } public Set<String> cpOptions1{ get { if (cpOptions1== null) { cpOptions1= new Set<String>(); } return cpOptions1; } set; } cpOptions.add(cpOptions1); cpOptions1.add(cp1.Emp__c);
Regards
- ❤Code
- November 12, 2015
- Like
- 0
- Continue reading or reply
Trigger from Before Update to After Update
I have a trigger which is created for before update event I need a similar logic for after update please suggest me how to change the trigger
trigger auto_lead_assignment_update on Lead (Before update) { lead L; //Account A; String AID; Integer ledcnt; String rstate; String rdomain; String rcompany; //List<lead> led = [select Email_Domain__c,state,company from lead where id = :Trigger.newMap.keySet()]; L = [select Email_Domain__c,state,company from lead where id = :trigger.newmap.keyset() limit 1]; list<Account> A = new list<Account>(); rstate = L.state; rdomain = L.Email_Domain__c; rcompany = L.company; if ( L.state != NULL && L.Email_Domain__c != NULL) { A = [select Id,Email_Domain__c,OwnerId from account where BillingState = :L.state and Email_Domain__c = :L.Email_Domain__c limit 1 ]; if(!(A.isempty())) { AID = A[0].Id; for(lead ld : Trigger.new) { ld.Account__c = AID; ld.run_assn_rules_yn__c = true; } } } else if ( L.state != NULL && L.company != NULL) { A = [select Id,Email_Domain__c,OwnerId from account where BillingState = :L.state and name = :L.company limit 1 ]; if(!(A.isempty())) { AID = A[0].Id; for(lead ld : Trigger.new) { ld.Account__c = AID; ld.run_assn_rules_yn__c = true; } } } }
Thanks
Sudhir
- sudhirn@merunetworks.com
- November 12, 2015
- Like
- 0
- Continue reading or reply
lookup field in apex and report
I'm trying to create a report with some custom objects and I can't manage to do it, certainly because of an issue in my apex code...
To explain, I have created 3 custom objects : Quote, Items and Delivery.
The object « Quote » always has a record, and for 1 record in « Quote », there can be 0 to n records in Items and in Delivery.
So Quote is like a Parent with 2 children : Items ans Delivery.
I have added a lookup relation on Quote to Items and Delivery, and also created a Lookup on Items and Delivery to Quote.
Then I have created a new report, with Primary object : Quote, and in Edit layout, I have added fields of Items and Delivery thanks to « Add fields related via lookup ».
But now, when I run my report, it is empty… If I only display Quote fields I have some records, but when I add fields from Items or Delivery, I have no record in my report.
Maybe, I don’t insert data as it has to be done in Apex.
I do it like this :
Quote__c insertQuote = new Quote__c();
insertQuote.ECOM_CustomerId__c = ‘abcd’;
insert insertQuote;
Item__c insertQuoteItem = new Item__c();
insertQuoteItem.Quantity__c = 1;
insertQuoteItem.Quote__r = insertQuote;
insert insertQuoteItem;
But on different forums, I see as I need to use Quote__r, and sometimes Quote__c = Id…
Is there something wrong ? I completely lost, and can’t see what is wrong !!
I just begin with salesforce, and even with the help I found on forums, I didn't manage to fix my issue.
Don't hesitate to ask me if it is not clear !
Thank you very much for you help.
Regards,
- Arnaud Combes
- November 11, 2015
- Like
- 0
- Continue reading or reply
angular js basic page output not getting
I am new to Angular js.......i have been building new vf page with angular page ..Facing to not getting output
Here is my Page
<apex:page applyHtmlTag="false" sidebar="false" showHeader="false">
<apex:form>
<apex:includescript value= "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"/>
<body>
<script>
angular.module('app',[]);
.controller('Basic Controller', function()){
this.name ="siva";
}
this.Hello: = function Hello:(){
return this.name}
</script>
<div ng-app="app" ng-controller="Basic Controller">
<p>Type the Your Name: </p>
<p>Name: <input type="text" ng-model="name" placeholder="Enter your name"/></p>
Hello: {{name}}
</div>
</body>
</apex:form>
</apex:page>
Here am not getting my name as siva in Hello: siva
- VSK98
- October 20, 2015
- Like
- 1
- Continue reading or reply
Formula does not work in Lightning mode
"
HYPERLINK ("/apex/Test_Lead_Detail?objType=Lead&objId=" & Id, IMAGE("https://app.test.com/images/icons16/Test16.png","View in Test"))
"
,where Test_Lead_Detail is a visual force page bound to a Test_Lead_Detail controller. However this approach does not work for lightning mode.
If I inspect the element, in classic mode the html is
"<div id="00NB0000001GhlL_ileinner"><a href="/apex/Test_Lead_Detail?objType=Lead&objId=00QB0000001mI5q" target="_blank"><img src="https://app.Test.com/images/icons16/Test16.png" alt="View in Test" border="0"></a></div>"
But in lightning mode it's
"<div class="dataCol"><a href="javascript:void(0)" ontouchstart="javascript:{ var openEvent = $A.get('e.force:navigateToURL'); openEvent.setParams({'url':'/apex/Test_Lead_Detail?objType=Lead&objId=00QB0000001mI5q'});openEvent.fire();}" data-aura-rendered-by="196:3421;a"><img src="https://app.test.com/images/icons16/Test16.png" alt="View in Test" border="0"></a></div>"
which does not repond when clicked.
Anyone has similar experience please? Thank you in advance.
- yl
- September 25, 2015
- Like
- 0
- Continue reading or reply
BEST PRACTICE
When someone takes the time/effort to repspond to your question, you should take the time/effort to either mark the question as "Solved", or post a Follow-Up with addtional information.
That way people with a similar question can find the Solution without having to re-post the same question again and again. And the people who reply to your post know that the issue has been resolved and they can stop working on it.
- Steve :-/
- February 10, 2010
- Like
- 131
- Continue reading or reply