• Abilash Kosigi 8
  • NEWBIE
  • 75 Points
  • Member since 2014

  • Chatter
    Feed
  • 2
    Best Answers
  • 2
    Likes Received
  • 1
    Likes Given
  • 18
    Questions
  • 38
    Replies
Hi all,
Hoping I can beg some help again with another trigger.  I need to update a list of custom objects (Contract Lines) when a contract is activated.
Appreciate any help I can get.
Keri-An
Can we create a new list view from Salesforce console? I am able to create the view for Case object in my app in DEV edition. However, the sfdc documentation say as  below.
List View - A list display of records based on specific criteria. The list views you can select to display in the console are the same list views defined on the selected object’s tab. You cannot create a list view from the console.
Pleast let me know the correct answer.

Thanks,
Abilash K.
Hi,

First of all, Wish you a very happy new year. :)

I have an issue in assigning Session id while I am trying to login to another salesforce org using SOAP API. Here is the code.

partnerSoapSforceCom.Soap sp = new partnerSoapSforceCom.Soap();

String username = 'username';
String password = 'password';

partnerSoapSforceCom.LoginResult loginResult = sp.login(username, password);

soapSforceCom200608Apex.Apex apexWebSvc = new soapSforceCom200608Apex.Apex();
soapSforceCom200608Apex.SessionHeader_element ses = new soapSforceCom200608Apex.SessionHeader_element();
ses.SessionId = loginResult.sessionId;

apexWebSvc.timeout_x = 120000;
apexWebSvc.SessionHeader = sessionHeader;


I see no error in the code. But dev console throws unexpected token '=' error for every statement from ses.SessionId = loginResult.sessionId; statement.

Can anyone please let me know where I am missing the point.

Note. All WSDLs and apex soap api related classes are successfully generated without any compilation erros.

 
Is it possible to query the field level securities associated with a profile?

Please let me know
In a pageblock table, I have this column which passes the value entered in the inputField to controller for rerendering
as outputtext. However, the following code is returning the null value in counting field. Can anyone help in this regard.


<apex:column headerValue="Capacity" id="CapacityColumn">
         <apex:inputField id="cap" value="{!fest.Capacity__c}"  rendered="{!isEditable}" />
         <apex:actionSupport event="onclick"                               
                                rerender="counting" status="counterStatus">
          <apex:param assignTo="{!counting}" value="this.value" />
          </apex:actionSupport>
         </apex:column>
  ------ --------
output2: <apex:outputtext id="counting"  value="{!Counting}"/>
 

Controller:
String Counting;
public String getCounting() {      
      
        return counting;
    }
I would like to fetch the value of count which is written below  in a visualforce page into javascript and modify it. Thereafter I would like to rerender it into another field.
<apex:outputtext id= "count" value ="{!50}" />

Javascript:
 a = document.getElementById('{!$Component.count}').value;
alert('a is' + a);
The above statement is used to fetch the value. When I displaying through alert, it is showing as 'a is undefined'. Can anyone please help on how to fetch the correct value.
 
Hi Guys,

I would like to call a javascript method  on 'Onblur' event from every row of a pageblock table. (How the ids in pageblock table can be accessed in Javascript). My requirement is that I will pass some count to the javascript method of every row and at the end of the table, the overall count should be displayed.
All this logic has to happen at page level without involving any database.

It would be of great help if anyone provides inputs.
 
When I was practising Managed/Unmanaged packages, I created a managed package and deleted it. Currently I dont have any packages created in my Developer org. I would like to delete the namespace now completely from the org in all the componnets. Can you please let me now about it.

 
I would like to submit a developer blog to Salesforce. Could anyone help with the email id or the link to which we can submit this?
Hi,

When I am trying to run this code, I am getting null pointer exception saying attempt to de-reference a null object at the line highlighted in the code. 
This is because the highlighted field is the lookup field. Can anyone please help how to assign values to the lookup fields like this in apex trigger.

trigger setListView on Account(after insert) {
if(CheckRecursiveTrigger.runOnce())
{
for (Account act: Trigger.new)
{
Account acct = [select Id,  Name from Account where Id IN : trigger.new];
String oppname = acct.name;
Opportunity[] oppSave = new Opportunity[] {};
Opportunity opp= new Opportunity();
opp.Name= oppname + '-opp' ;
opp.stagename= 'Prospecting';
opp.CloseDate = date.today();

Account ack = [Select Id from Account where name = :oppname limit 1];

opp.Account.name= ack.id;
oppSave.add(opp);
insert oppSave;
}
}
}
Hi,

I am new to REST API. I would like to send Http Requests from Curl software that I installed on my desktop.
How to request OAuth token from command prompt using Curl.(I have done extensive search on google - could not find any reliable answer). 

What is the callback URL that I should give in Salesforce dev edition.

Please help
Hi,

I would like to learn REST & BULK API Concepts. Is there any sample demo or project for the same?
Please let me know.
Hi,

Can anyone give the  fundamental difference between Standard List Controller & Std Set Controller?
<This post is in continuation to older posts>

Hi,

I have tried a bit sophisticated trigger with a dyanamic DML Query and Clone method of SObject class. I am almost there except this error which comes when a new account is added. Can anyone of you dig out and let me know.

The error is

Review all error messages below to correct your data.
Apex trigger accountClone caused an unexpected exception, contact your administrator: accountClone: execution of AfterInsert caused by: System.QueryException: Variable does not exist: Trigger.new:


Trigger:

trigger accountClone on Account (after insert) {
Account[] accSave = new Account[] {};

if(CheckRecursiveTrigger.runOnce())
{
Account theClone= new Account();

Account A=new Account();

String DMLQuery;
        DMLQuery = 'Select ';
Map<String, Schema.SObjectField> fieldsMap = Schema.SObjectType.Account.fields.getMap();
for (Schema.SObjectField field : fieldsMap.values())
     {
      DMLQuery += field.getDescribe().getName() + ',';
      System.debug(field.getDescribe().getName());
     }
        DMLQuery = DMLQuery.substring(0, DMLQuery.length() -1);
DMLQuery += ' from Account where Id IN : Trigger.new';
          
      
    A = Database.query(DMLQuery);


  theClone =  A.clone(false,true,false,true);

accSave.add(theClone);
}

insert accSave; 


}
Hello,

I would like to practice Site.com Workbook for which site.com studio has to be downloaded. I followed the link given in the workbook which is leading nowhere.
Can any one please let me know how exactily I can download the site.com studio
querystring = select <all fields> of Car__C

List<Car__c> L = Database.query(querystring);
    Map<Id, Car__c> m = new Map<Id, Car__c>(L);

for (Car__c field : m.values())
{
    <Car_NO> (Here it should display car no of each car.
     Similaryly, any field value of each record needs to be diplayed.
}

Please help with this.
A question on a lighter note. I am new to Salesforce and to this forum. What is the criteria that is followed to award points in the forum. Are there any benefits for the peole who accrue more? :)
I have two csv files with the following dummy data. Whenever, I upload it to the vf page, the apex class should read the first line
(which always contains the custom field names) and store the values in the next lines accordingly in the Account object. The number of of fields in the csv file can change time to time.
We can say that the template of the csv file is dynamic.


CSV File 1:

Account_no, Account_name, Account_branch, Account_City
100,Robert,Karlbagh,Delhi
200,Sam,Downtown,SanFransisco

CSV File 2:

Account_no,Accont_name,Account_city
400,Julie,London
500,Alia,Kolkata

Could anyone please help.
Can any one please share the code on how to retrieve all the field values of Account Object with Field names as Map Keys. This has to be done in apex class.
In a pageblock table, I have this column which passes the value entered in the inputField to controller for rerendering
as outputtext. However, the following code is returning the null value in counting field. Can anyone help in this regard.


<apex:column headerValue="Capacity" id="CapacityColumn">
         <apex:inputField id="cap" value="{!fest.Capacity__c}"  rendered="{!isEditable}" />
         <apex:actionSupport event="onclick"                               
                                rerender="counting" status="counterStatus">
          <apex:param assignTo="{!counting}" value="this.value" />
          </apex:actionSupport>
         </apex:column>
  ------ --------
output2: <apex:outputtext id="counting"  value="{!Counting}"/>
 

Controller:
String Counting;
public String getCounting() {      
      
        return counting;
    }
A question on a lighter note. I am new to Salesforce and to this forum. What is the criteria that is followed to award points in the forum. Are there any benefits for the peole who accrue more? :)
Hi all,

Each Account record on our system is allocated a "Range" type - this lists the products they carry in stock. eg On the Accounts Object we have a field called "Range__c" and for each relevant Range record we have many Products listed.

I would like to display on the Accounts page a list of the products that apply for that particular Accounts "Range__c" .. I guess a VF page added will do the job but no real idea how to create a vf page for the accounts detail page that will list the products filtered by that Accounts "Range__c"

Can anyone help me alter the code below (I do have the vf code for the range page) to allow it to be used on the Account page and filter for the field Range__c  .. appreciate any help at all :)

<apex:page standardcontroller="Range__c">
<apex:messages />
    <apex:sectionheader title="{!$ObjectType.Range__c.label} Detail" subtitle="{!Range__c.Name}"/>   
    <apex:form >
        <apex:pageblock mode="maindetail" title="{!$ObjectType.Range__c.label} Detail">
         
            <apex:outputpanel >
                <apex:pageblocksection title="Information" showheader="false" collapsible="false" columns="2">
                    <apex:outputfield value="{!Range__c.Name}"/>
                    <apex:pageblocksectionitem />
                </apex:pageblocksection>
            </apex:outputpanel>
        </apex:pageblock>
    </apex:form>
    <!-- **********   [Related Lists for Record Type : Master ]   **********  -->
    <apex:outputpanel >
        <apex:relatedlist list="Products__r" title="Products"/>
    </apex:outputpanel>
  
</apex:page>










 
Hi Guys,

    Hope so many peoples integrated google map in visualforce page using the javascript. From Salesforce Spring'15 onwards, Map components are released. Some of the people may not aware about this.

Please find the below link it will helpful who don't know about this component..!

http://salesforcekings.blogspot.in/2015/03/of-us-already-known-about-thegoogle-map.html
WHAT IS GOOGLE TICKER? HOW TO USE IT IN VISUALFORCE PAGES??

I got a task from my company.. they are asking google ticker in one of vf page. am unable to understand their requirement!! pls someone help me!! Thanks in ADv...
I an a newbie to salesforce, and was following workbook on apex classes.
This is what i did:
Debug-> Open Exceture Anonymous Window.
System.debug('Hello');

Unchecked "open log". Execute

Alas, i couldnt see any log entries, while the workbook says that log entries will appear.
Do i need to make changes somewhere? or
Am i doing it wrong way?
 
Is it possible to query the field level securities associated with a profile?

Please let me know
I need to display the search results of a SOQL query in a Visualforce page. The results should be displayed in a list (e.g. 7 Contacts are returned in the search results - the list would have 7 rows). Can I do this without a controller class? I already have the search results. I do not need to run another query. I simply need a Visualforce page to display the results. If I have to use a controller class is there a way to pass the search results (i.e. list of objects) into the controller via the ApexPages.currentPage().getParameters() method or by some other means? Or is there another way to display the results without even using the Visualforce page?

Thanks!
Hi folks,
         Can anyone tell me what are the hottest topics in salesforce?
I need atleast 20 topic names.

 
In a pageblock table, I have this column which passes the value entered in the inputField to controller for rerendering
as outputtext. However, the following code is returning the null value in counting field. Can anyone help in this regard.


<apex:column headerValue="Capacity" id="CapacityColumn">
         <apex:inputField id="cap" value="{!fest.Capacity__c}"  rendered="{!isEditable}" />
         <apex:actionSupport event="onclick"                               
                                rerender="counting" status="counterStatus">
          <apex:param assignTo="{!counting}" value="this.value" />
          </apex:actionSupport>
         </apex:column>
  ------ --------
output2: <apex:outputtext id="counting"  value="{!Counting}"/>
 

Controller:
String Counting;
public String getCounting() {      
      
        return counting;
    }
I would like to fetch the value of count which is written below  in a visualforce page into javascript and modify it. Thereafter I would like to rerender it into another field.
<apex:outputtext id= "count" value ="{!50}" />

Javascript:
 a = document.getElementById('{!$Component.count}').value;
alert('a is' + a);
The above statement is used to fetch the value. When I displaying through alert, it is showing as 'a is undefined'. Can anyone please help on how to fetch the correct value.
 
Hi,
           I have one checkbox field in my object when that checkbox is cchecked automatically update discount field to 30% How?

help me..
Hey All,

I am receiving the following error when attempting to insert a contact on an account through an API call.

insufficient access rights on cross-reference id: 001S000000m96Jq

If it helps, I am using the Enterprise Edition and am currently testing this out on my sandbox account.

The account ID is valid and I am pointing to the profile of the System Administrator, which has access to "modify all data", is API Enabled, owns the account I'm trying to update, and has access to all record types of Accounts & Contacts.

What am I missing?
Dear All,

I am new to Salesforce Apex coding, please provide me sample code for updating related entity details. While updating an Oppurtunity, I need to update the Account details of that Oppurtunity.

Thanks In Advance
Suresh N