• vagish
  • NEWBIE
  • 150 Points
  • Member since 2011

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 19
    Questions
  • 31
    Replies

Hi there, we have a custom object "Invoice Request" that has a lookup relationship with Opportunity. I want the standard currency picklist  field on the Inoice Request record set to whatever value is in the standard currency picklist field on the Opportunity record. This should only happen on creation of the Invoice Request record, users should be able to invoice in whatever currency they choose.

 

Thanks in advance

 

Paul

 

I want to use record Type to limit trigger action. 

 

Now I use querey to get it my code liks below

string Id = [SELECT id from RecordType where Name ='Someone'].Id;

 

I also found this page, we could use method to get the Record Type Id to avoid the query.

I still can't understand it.

 

Is there some simple and easy wayt to get the ID only by Record Type's Name?

Hi,

I have a custom button on opportunity details page. It's behavior is "Display In New Window" anc content source is "URL".
It works fine in Salesforce classinc UI, when user clicks on the button, it opens a new window.

However, when I use this button in Salesforce Lightning, it doesn't open new window or tab, it just renders the whole content in the same tab. So is there anyway we can open new tab/window in Lightning for same custom button as it happens in classic?

Thanks,
Vagish
Object: select in file: classes\OpportunitySync.cls
L 412: tempOpp = [select Id, AccountId, Name, Description, StageName from Opportunity where Id =: opportunityId];

Object: tempopp in file: classes\OpportunitySync.cls
L 412: tempOpp = [select Id, AccountId, Name, Description, StageName from Opportunity where Id =: opportunityId];

Object: opportunitysync in file: pages\Opportunity_Sync.page
L 77: <apex:outputText value="{!syncDS.syncError}" escape="false"/>

Object: opportunitysync____46 in file: pages\Opportunity_Sync.page
L 77: <apex:outputText value="{!syncDS.syncError}" escape="false"/>

Object: opportunitysync____46 in file: pages\Opportunity_Sync.page
L 77: <apex:outputText value="{!syncDS.syncError}" escape="false"/>

Object: getsyncdslist45 in file: pages\Opportunity_Sync.page
L 77: <apex:outputText value="{!syncDS.syncError}" escape="false"/>

Object: getsyncdslist45 in file: pages\Opportunity_Sync.page
L 77: <apex:outputText value="{!syncDS.syncError}" escape="false"/>

Object: syncdslist in file: classes\OpportunitySync.cls
L 483: return syncDSList;

First two made sense and i should change that to dynamic query. However, i am not sure what fix is expected for rest of them. Can anyone make point fix comment to figure out atleast any of them (except initial two) ?
  • March 16, 2016
  • Like
  • 0
Use case: I want to send Salesforce record's internal id to external system. It can be done in two ways-
1. Outbound message to a public service
2. Future call from apex trigger.

#1 will goto Outbound message queues, #2 will be routed from Apex job queues. Workwise, my experience is outbound messages are faster compared to apex job queues. Also I have seen apex jobs in queued state but outbound messages are sent immediately. There is no doc which compares these two queues, so can anyone throw more light in terms of performance comparision for both of these queues? 
  • September 16, 2015
  • Like
  • 0
Hi,
Use case: I have a JS button on opportunity detail page. It opens a visualforce page. On VF page load, it runs a check on OpportunitySplit object type (runs a SOQL on OpportunitySplit and checks for records). Problem is, I can't deploy this code into the SF account where Opportunity Split feature is not enabled, and I have to add this JS button, VF page and controller into package.
Any suggestion how I can achieve that? I don't want to do this validation (query) in js button.
I tried to make this post smaller, can provide more info if needed.
Thanks,
  • September 16, 2015
  • Like
  • 0
Hi,

I have been trying to access LastModifiedDate of Parent object of a Note record, but ended up with no luck. Here is what I am trying-

Select Id, Title, Parent.Type, Parent.LastModifiedDate from Note

It throws an error-
Select Id, Title, Parent.Type, Parent.LastModifiedDate from Note
                               ^
ERROR at Row:1:Column:32
No such column 'LastModifiedDate' on entity 'Name'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

Apart from System fields, I am able to access all the parent fields from the same query.
Can anyone suggest if we have any way for this purpose?

Thanks,
Vagish
  • September 02, 2014
  • Like
  • 0
Hi,

When we make future calls, a job gets enqueued in asyncapexjob record. Is there any way to get job id of future call which has been currently made?
For example, I have a button on case record, when I click that button, a future method runs and calls other web service. Now, multipe people can click on the button at the same time/or almost near by time so I want to display the status of their job.

Is it possible at all?

Thanks.

Hi all,

 

I am trying to shoot an soql on custom object, object has been deployed using managed package however I am getting following exception:

 

EXCEPTION_THROWN [1]|System.QueryException: sObject type 'pymt__PaymentX__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.

 

I am shooting soql from Developer console as below:

System.debug('---------'+[SELECT

Id,

pymt__Transaction_Type__c

    FROM

pymt__PaymentX__c

  ]);

Here pymt__ is a namespace prefix. I tried without prefix as well, that also didn't work.

 

Can anybody help me for this issue?

 

Thanks,

Vagish

Hi,

 

Is there any way to retrieve related contents of any opportunity via SOQL?

Scenario: I have attacted two contents to an Opportunity using related Content List on an Opportunity Object. I want to retrieve the ids of those two contents via SOQL for that Opportunity.

 

  • March 16, 2012
  • Like
  • 0

Hi,

 

I am invoking apex code and I am using AJEX toolkit to do so.

http://salesforcesource.blogspot.com/2009/06/triggering-apex-method-with-custom.html

 

If I am usingfollwing libraries with version 10.0 like:

{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}

 

all works fine.

 

But if I change version 10.0 to higher like:

{!REQUIRESCRIPT("/soap/ajax/22.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/22.0/apex.js")}, it doesn't work.

 

 

Can anybody help ??

  • September 20, 2011
  • Like
  • 0

Hi all,

 

Is there any way to show inline visualforce page in edit mode as well?

Like if I have an object "Recipe", now for recipe preperation steps,   I am using inline vf page. Once the steps are enterd, now if that recipe is in edit mode, then inline vf page is not showing.

 

Thanks in advance!

Hi All,

 

Can anybody tell me, how to translate custom object tabs using translation workbench.

 

Thanks in advance.

Hi,

 

I have enabled a partner portal account, a specific url is there in customize-> partners-> settings->myPartners (cloned profile) and username and password I hav received by mail. after loign, the default home page opening is of salesforce. Can I change it so that it gives complete look and feel like my own created site.

 

Thanks in advance.

  • March 10, 2011
  • Like
  • 0

Hi,

 

What is the maximum supported size of visualforce page??

 

Thankx in advance!

  • March 09, 2011
  • Like
  • 0

Hi,

 

can anyone tell me, how to open this file in our computer to see its content?

 It is an exported source file.

 

Thanks in advance!

  • March 08, 2011
  • Like
  • 0

Hi,

 

 

http://www.salesforce.com/us/developer/docs/pages/Content/pages_controller_std_actions.htm

 

In this link, delete method is there, but when I m using this method with custome object, it is not working.

Is there any replacement for this functionality over there?

  • March 07, 2011
  • Like
  • 0

hi,

    public List<SelectOption> getItems() {
        List<SelectOption> op=new List<SelectOption>();
        for(List<Student__c>student:[select name from Student__c])
        {
        op.add(new SelectOption(student.name));
        }
        return null;
    }

 

In this code, I want to add student names into selectOption, but it is giving error:

Error: nameController Compile Error: Initial term of field expression must be a concrete SObject: LIST<Student__c> at line 7 column 33.

 

Thanks in advance!!

  • March 04, 2011
  • Like
  • 0

Hi,

        Is there any standard method to delete any record.

 

like {!save} (used fof save), it saves any record, I need same functionality for deletion.

  • March 03, 2011
  • Like
  • 0

This query giving invalid token count error.

 

what is the problem here??

  • February 24, 2011
  • Like
  • 0

hi,

 

Can we write SOQL query in formula field such as

 

if(foo__c>500, [select if from Request]], "invalid score!!")

 

Thnx in advance!

  • February 18, 2011
  • Like
  • 0
Hi,

I have been trying to access LastModifiedDate of Parent object of a Note record, but ended up with no luck. Here is what I am trying-

Select Id, Title, Parent.Type, Parent.LastModifiedDate from Note

It throws an error-
Select Id, Title, Parent.Type, Parent.LastModifiedDate from Note
                               ^
ERROR at Row:1:Column:32
No such column 'LastModifiedDate' on entity 'Name'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

Apart from System fields, I am able to access all the parent fields from the same query.
Can anyone suggest if we have any way for this purpose?

Thanks,
Vagish
  • September 02, 2014
  • Like
  • 0
Hi,

When we make future calls, a job gets enqueued in asyncapexjob record. Is there any way to get job id of future call which has been currently made?
For example, I have a button on case record, when I click that button, a future method runs and calls other web service. Now, multipe people can click on the button at the same time/or almost near by time so I want to display the status of their job.

Is it possible at all?

Thanks.

Hello,

I am having a problem in the code. The Contact object con is defined in code below, it is recieving all the values from the visualforce page. but before inserting this con object i want to change its owner field to the Account it is recieving in line #5. as this con object takes bydefault owner.

 

public with sharing class newContact {
    public Contact con {get;set;}
    public newContact(ApexPages.StandardController c) {
            con = (Contact)c.getRecord();
            con.AccountId = ApexPages.currentPage().getParameters().get('pid');
    }
     public PageReference save(){
       insert con;
       return new PageReference('/index/index?id='+con.AccountId); 
    }
    
    

 Kindly Guide me if possible

Hi there, we have a custom object "Invoice Request" that has a lookup relationship with Opportunity. I want the standard currency picklist  field on the Inoice Request record set to whatever value is in the standard currency picklist field on the Opportunity record. This should only happen on creation of the Invoice Request record, users should be able to invoice in whatever currency they choose.

 

Thanks in advance

 

Paul

 

I want to use record Type to limit trigger action. 

 

Now I use querey to get it my code liks below

string Id = [SELECT id from RecordType where Name ='Someone'].Id;

 

I also found this page, we could use method to get the Record Type Id to avoid the query.

I still can't understand it.

 

Is there some simple and easy wayt to get the ID only by Record Type's Name?

Looking to create a simple trigger that will sync a check box on Opportunity Object with a similar check box on each line of Opportunity Product Object.  Then, if any of those becomes unchecked, the main Opp Object check box is unchecked.   

 

Anyone have a simple code they can share?

  • April 29, 2013
  • Like
  • 0

Hi all,

 

I am trying to shoot an soql on custom object, object has been deployed using managed package however I am getting following exception:

 

EXCEPTION_THROWN [1]|System.QueryException: sObject type 'pymt__PaymentX__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.

 

I am shooting soql from Developer console as below:

System.debug('---------'+[SELECT

Id,

pymt__Transaction_Type__c

    FROM

pymt__PaymentX__c

  ]);

Here pymt__ is a namespace prefix. I tried without prefix as well, that also didn't work.

 

Can anybody help me for this issue?

 

Thanks,

Vagish

Hi,

 

Is there any way to retrieve related contents of any opportunity via SOQL?

Scenario: I have attacted two contents to an Opportunity using related Content List on an Opportunity Object. I want to retrieve the ids of those two contents via SOQL for that Opportunity.

 

  • March 16, 2012
  • Like
  • 0

Hi all,

     I want to find out the end point url of salesforce.for connecting salesforce with dss database.How to give end point url and its login username,password,security token using http callouts.Any one can you help me this.Its Urgent.

Hi all,

 

Could anyone help me in providing the workflow for alerting a mail when we enter the User Contact Email field of agreements.

 

Thanks in advance,

Shruthika.

Hi,

 

I am invoking apex code and I am using AJEX toolkit to do so.

http://salesforcesource.blogspot.com/2009/06/triggering-apex-method-with-custom.html

 

If I am usingfollwing libraries with version 10.0 like:

{!REQUIRESCRIPT("/soap/ajax/10.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/10.0/apex.js")}

 

all works fine.

 

But if I change version 10.0 to higher like:

{!REQUIRESCRIPT("/soap/ajax/22.0/connection.js")}
{!REQUIRESCRIPT("/soap/ajax/22.0/apex.js")}, it doesn't work.

 

 

Can anybody help ??

  • September 20, 2011
  • Like
  • 0

Hi,

 

I have two unrelated objects where a specific column might have the same value in another object. I'm trying to find out if a value in an object, already exist in another object. I was reading up on a wrapper classes, but I couldn't get my head around it. Any idea how this is possible? 

 

For example I have the following two objects with the following fields

 

Object_1__c (id, Name, Status)

Object_2__c(id, Name, Area)

 

In SQL, it would be written something like below. Please NOTE that there are fields that need to be displayed from both objects.

 

SELECT o1.id, o1.Name, o1.Status, o2.Area FROM Object_1__c o1, Object_2__c o2 WHERE o1.Name = o2.Name

 

Can a command button call two actions at the same time?

 

I am in a situation where I have two methods Save and Update. I want to either invoke the two methods in one command button action or instantiate method1 in method2 so that the command button will first call method1 and then method2.

 

Thanks

  • August 17, 2011
  • Like
  • 0

Folks,

I got my DEV 401 few months back. I am now planning to take up the DEV 501 exam. Though I've been working in Visualforce & apex for quite sometime, I don't have a clue on what is being tested in DEV 501. Couple of people to whom I have spoken recently are also in the same state. 

 

Hence, I am starting this thread so that people who have taken 501 atleast once, can share with us their experience and guide/hint us on the reference materials/topics that matter.

 

Lets help each other !!!

 

P.S: I also wanted to declare that this thread is not meant to post the exam questions as it will violate salesforce.com certification rights. This thread is solely meant to share the certification exam experiences and references.