• Nurav1982
  • NEWBIE
  • 40 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 9
    Replies
We currently have a set of 6 <apex:pageBlockSection> in our VF page.
All 6 of these pageblocksection render collapsed by default.
We want to find out whether it would be feasible to render these pageblocksections as "not collapsed" by default.
Hello,

We have two fields F1 and F2 in our VF page.
Both of them are picklists.
We would like to ensure that F2  is disabled (but visible) whenever F1's selected value is "X".

Can someone provide direction as to how this can be achieved ?
I have the following 3 custom objects

Parent
Child
GrandChild

GrandChild has a lookup relationship with Child.
Child has a MD relationship with Parent (Parent is Master)

Objective : I want to traverse from grandchild to parent.

select gc.name,c.name,p.name
from grandchild__c g,  g.child__r c,   c.parent__r p

I am getting sample output like below

Name                child__r.Name                      child__r.parent__r.Name
"Test GC"         "Test C"                                   [object Object]

Can anyone tell me why am I getting "[object Object]" instead of the parent's name ???

Hello,

I have two roll up summary fields F1 and F2.
Each of these fields can contain integer starting from 0.
I need to create another formula field F3  (a textbox btw) with the following logic.

If (F1+F2) > 0 THEN F3 should be checked
If (F1+F2) <=0 THEN F3 should be unchecked.

Can someone tell me how to do this ?
Hello All,

Newbie looking for some help.
I have two objects Object1 and Object2.
Both of them are Custom Objects.
Object1 is Master and Object2 is Child.

Object1 has a checkbox called "File Present".
This checkbox gets set to TRUE only when Object2 has an attachment.

In order to solve this, I decided to do the following

a)Create a before update trigger on Object2

b) Whenever there is a file added to the Object2 this before update trigger will fire and will set the checkbox on the parent Object1 to true


My code
----------

trigger SetCheckBox on Object2__c (before update) {
   
    List<Attachment> a = [SELECT Id,Name FROM Attachment WHERE ParentId = :Trigger.new[0].id];
   
    if(a.size() > 0)
    {
       List<Object2__c> l = [SELECT Id,Name,Object1__c FROM Object2__c WHERE Id = :Trigger.new[0].id];
       Object1__c s = [SELECT Id FROM Object1__c WHERE Id = :l[0].Object1__c];
       s.File_Present__c = true;
       update s;
       
    }
   
   

}


But the checkbox "File_Present__c" is not getting set whenever I add a file to the Object2.
Can someone help ?

PS :
Also I dont want to use WFR for this problem because I need to clear out the checkbox whenever there is an attached file deletion on object 2 and this cannot be achieved by WFR so I thought I might as well solve both the problems via triggers only
Hi All,

I am new to Salesforce.

We have this following requirement.

We have four fields in a custom object (F1,F2,F3,F4)

If F1's value is set to "Start", then F2 should hold that current time in GMT.

And when the F1's value is changed from "Start", then F3 should store that changed time in GMT.

Also F4 should now display the (F3-F2) in days (Lets say F2 is 10:00 AM and F3 is 11:00 AM..then F4 should store/display as 0.0417)

Is it possible to implement this without using Apex ?
I know using sforce.apex.execute we can call methods from a global class.

But I would like to know whether it is possible to call methods from a public class.?

Ex:
public  class myClass {
  webService static Id makeContact(String lastName, Account a) {
        Contact c = new Contact(LastName = lastName, AccountId = a.Id);
        return c.id;
    }
}



Hello All,

I have a custom object with the following fields F1,F2 and F3.

I have a requirement to ensure that F1,F2 does not get updated if F3's value is "Processing".

Without using Apex, can we achieve this via validation rules ?
Hello All,

Can someone please provide their inputs on these ?

a) Can we call a Apex Web service from a custom button's on click event via Javascript/AJAX toolkit  ?

b) Can we make a record read only using a custom button's click via Javascript/AJAX ?

Thanks for your time !!!

Nurav
Hello All,

I have this following requirement.


I need to expose a button on a non-VF page.
Upon clicking the button, I need to check values from two fields (which are exposed in the page layout) say F1 and F2.
If the fields' value combination do exist from an approved list of combinations then I need to call TIBCO else I need to pop up an error message.

We cannot change the page , in which the button will be placed,  as a VF page.
The fields F1 / F2 are hierarchial picklists.



Eg :

Say the approved List of combinations for F1,F2 are as follows {A,1} {A,2} {A,3}

F1 can have {A,B}

F2 can have {1,2,3,4,5}

Scenario #1 : User has chosen {A,1} and presses this custom button then TIBCO needs to be called

Scenario #2 : User has chosen {B,1} and presses this custom button then error message needs to be shown to the user.
(
***{B,1} is selectable while creating a record because it is supported in the hierarchial picklist combination. But for this ***specific*** functionality, the combination {B,1} is not supported
)


I thought of doing the below for this requirement

Approach #1 : Custom Object/AJAX/Javascript

a) Create a custom object that houses the valid list of combinations.
The custom object will have two custom fields F1,F2 containing only valid combinations.

b) Create a button in the page layout

c) When the user presses the button, use AJAX/Javascript to issue a SOQL SELECT to the custom object from step a).

  c-1 : If I find a record from the custom object then call TIBCO
  c-2 : If I dont find a record from the custom object then popup an error message

Approach #2 : Custom setting

My colleague has suggested me to try out with custom settings instead of the above route but I am not so sure about using that.
Also how different it would be from approach #1 even if I go with custom setting.

Can you guys provide your inputs ?.
Is approach #1 better or approach #2 better ?



Thanks in advance for your time !

Nurav
Hello All,

I have this following requirement


a) A custom button to be exposed

b) Upon clicking the button, I need to verify whether the current record is already present in a custom object

c) If the match is found I need to call TIBCO

d) If the match is not found, then I need to popup a message

Can someone point me in a direction as to how to proceed ?.

Thanks for your time !!!

Hello All,

 

I am new to Salesforce.

We have this requirement.

 

a) We have a custom object that has 10 fields + 1-2 file attachments.

b) Expose this custom object via a webservice.The sole purpose of this webservice is to retrieve records from this custom object.

c) Our partner then ,using this webservice, will consume the records and load it in his system.

 

Is this possible to do it in Salesforce ?

Hello All,

 

I am trying to complete this lab (8-1 Creating a Custom SOAP Web Service) from 501 Labs.

 

When I did this with the assigned org during our training, I did not have any issues.

 

When I tried doing the same exercise in my own developer edition I am seeing this error.

 

Objective of the exercise : To allow insertion of job candidate and application via webservice API.In this the webservice is called from a VF page.

 

webservice name =

CandidateKeyWebService

and it has a method called "submitEmployeeReferral"

 

This is the contents from the pop up window

 

=========

 

AJAX Toolkit Shell
Features: autocompletion of property names with Tab, multiline input with Shift+Enter, input history with Up/Down Values and functions: ans, print(string), props(object), blink(node), clear(), load(scriptURL), scope(object)


Request: server- /services/Soap/package/CandidateKeyWebService
<textarea cols=80 rows=5 wrap=hard>&lt;se:Envelope xmlns:se="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;se:Header xmlns:sfns="http://soap.sforce.com/schemas/package/CandidateKeyWebService"&gt;&lt;sfns:SessionHeader&gt;&lt;sessionId&gt;00D90000000qFRD!AREAQMLtrkAQzPhCsf_KMIB5rE5rnPPap0YFtJyDdsz_3GcQs_fom5q7dGXJyBdG1TGaMY83V7CI0.gU.93nw49Bdt5hDKnx&lt;/sessionId&gt;&lt;/sfns:SessionHeader&gt;&lt;/se:Header&gt;&lt;se:Body&gt;&lt;submitEmployeeReferral xmlns="http://soap.sforce.com/schemas/package/CandidateKeyWebService"&gt;&lt;a&gt;a009000000PLJx8AAH&lt;/a&gt;&lt;b&gt;&lt;type&gt;Candidate__c&lt;/type&gt;&lt;First_Name__c&gt;a&lt;/First_Name__c&gt;&lt;Last_Name__c&gt;b&lt;/Last_Name__c&gt;&lt;Phone__c&gt;&lt;/Phone__c&gt;&lt;Mobile__c&gt;&lt;/Mobile__c&gt;&lt;Email__c&gt;a@a.com&lt;/Email__c&gt;&lt;/b&gt;&lt;/submitEmployeeReferral&gt;&lt;/se:Body&gt;&lt;/se:Envelope&gt;</textarea>


Response : status - 500
<textarea cols=80 rows=5 wrap=hard>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;soapenv:Body&gt;&lt;soapenv:Fault&gt;&lt;faultcode&gt;soapenv:Client&lt;/faultcode&gt;&lt;faultstring&gt;No such parameter a defined for the operation, please check the WSDL for the service.&lt;/faultstring&gt;&lt;/soapenv:Fault&gt;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;</textarea>


faultcode    soapenv:Client
faultstring    No such parameter a defined for the operation, please check the WSDL for the service.

====================

 

Q : I am new to webservices debugging etc and since this error did not come during our training, I am at a loss to understand where and how to start debugging.

 

Can someone point me out in a right direction or give me a clue as to what could be wrong ?

Hello All,

 

This is the data setup in object Child__c

 

http://imgur.com/50arUIy,AO95lex#0

 

 

 

This is what I wanted to achieve :

 

http://imgur.com/50arUIy,AO95lex#1

 

 

As you can see I am able to achieve my desired output (Grouping based on parent__r.id) using the above query.

 

But I am not able to understand the role played  "id" inside count().

 

What did "id" inside the count() operator do ?.

 

The same setup in a traditional SQL is straightforward as below.

 

SELECT Parent__r.id,count(*)

FROM Child__c

GROUP BY Parent__r.id

ORDER BY count(*) DESC

 

So can someone explain the role played "id" inside the SOQL statement ?

 

 

We currently have a set of 6 <apex:pageBlockSection> in our VF page.
All 6 of these pageblocksection render collapsed by default.
We want to find out whether it would be feasible to render these pageblocksections as "not collapsed" by default.
I have the following 3 custom objects

Parent
Child
GrandChild

GrandChild has a lookup relationship with Child.
Child has a MD relationship with Parent (Parent is Master)

Objective : I want to traverse from grandchild to parent.

select gc.name,c.name,p.name
from grandchild__c g,  g.child__r c,   c.parent__r p

I am getting sample output like below

Name                child__r.Name                      child__r.parent__r.Name
"Test GC"         "Test C"                                   [object Object]

Can anyone tell me why am I getting "[object Object]" instead of the parent's name ???

Hello All,

Newbie looking for some help.
I have two objects Object1 and Object2.
Both of them are Custom Objects.
Object1 is Master and Object2 is Child.

Object1 has a checkbox called "File Present".
This checkbox gets set to TRUE only when Object2 has an attachment.

In order to solve this, I decided to do the following

a)Create a before update trigger on Object2

b) Whenever there is a file added to the Object2 this before update trigger will fire and will set the checkbox on the parent Object1 to true


My code
----------

trigger SetCheckBox on Object2__c (before update) {
   
    List<Attachment> a = [SELECT Id,Name FROM Attachment WHERE ParentId = :Trigger.new[0].id];
   
    if(a.size() > 0)
    {
       List<Object2__c> l = [SELECT Id,Name,Object1__c FROM Object2__c WHERE Id = :Trigger.new[0].id];
       Object1__c s = [SELECT Id FROM Object1__c WHERE Id = :l[0].Object1__c];
       s.File_Present__c = true;
       update s;
       
    }
   
   

}


But the checkbox "File_Present__c" is not getting set whenever I add a file to the Object2.
Can someone help ?

PS :
Also I dont want to use WFR for this problem because I need to clear out the checkbox whenever there is an attached file deletion on object 2 and this cannot be achieved by WFR so I thought I might as well solve both the problems via triggers only
Hello All,

I have a custom object with the following fields F1,F2 and F3.

I have a requirement to ensure that F1,F2 does not get updated if F3's value is "Processing".

Without using Apex, can we achieve this via validation rules ?
Hello All,

I have this following requirement.


I need to expose a button on a non-VF page.
Upon clicking the button, I need to check values from two fields (which are exposed in the page layout) say F1 and F2.
If the fields' value combination do exist from an approved list of combinations then I need to call TIBCO else I need to pop up an error message.

We cannot change the page , in which the button will be placed,  as a VF page.
The fields F1 / F2 are hierarchial picklists.



Eg :

Say the approved List of combinations for F1,F2 are as follows {A,1} {A,2} {A,3}

F1 can have {A,B}

F2 can have {1,2,3,4,5}

Scenario #1 : User has chosen {A,1} and presses this custom button then TIBCO needs to be called

Scenario #2 : User has chosen {B,1} and presses this custom button then error message needs to be shown to the user.
(
***{B,1} is selectable while creating a record because it is supported in the hierarchial picklist combination. But for this ***specific*** functionality, the combination {B,1} is not supported
)


I thought of doing the below for this requirement

Approach #1 : Custom Object/AJAX/Javascript

a) Create a custom object that houses the valid list of combinations.
The custom object will have two custom fields F1,F2 containing only valid combinations.

b) Create a button in the page layout

c) When the user presses the button, use AJAX/Javascript to issue a SOQL SELECT to the custom object from step a).

  c-1 : If I find a record from the custom object then call TIBCO
  c-2 : If I dont find a record from the custom object then popup an error message

Approach #2 : Custom setting

My colleague has suggested me to try out with custom settings instead of the above route but I am not so sure about using that.
Also how different it would be from approach #1 even if I go with custom setting.

Can you guys provide your inputs ?.
Is approach #1 better or approach #2 better ?



Thanks in advance for your time !

Nurav
Hello All,

I have this following requirement


a) A custom button to be exposed

b) Upon clicking the button, I need to verify whether the current record is already present in a custom object

c) If the match is found I need to call TIBCO

d) If the match is not found, then I need to popup a message

Can someone point me in a direction as to how to proceed ?.

Thanks for your time !!!

Hello All,

 

This is the data setup in object Child__c

 

http://imgur.com/50arUIy,AO95lex#0

 

 

 

This is what I wanted to achieve :

 

http://imgur.com/50arUIy,AO95lex#1

 

 

As you can see I am able to achieve my desired output (Grouping based on parent__r.id) using the above query.

 

But I am not able to understand the role played  "id" inside count().

 

What did "id" inside the count() operator do ?.

 

The same setup in a traditional SQL is straightforward as below.

 

SELECT Parent__r.id,count(*)

FROM Child__c

GROUP BY Parent__r.id

ORDER BY count(*) DESC

 

So can someone explain the role played "id" inside the SOQL statement ?