• Clifford
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 8
    Questions
  • 7
    Replies

I have a VF page that calls a controller extension...when I place the VF page on a standard page and layout, it appears when the standard page is in view mode.  When the standard page goes to edit mode, the VF page section no longer renders.

 

I have tried exposing properties on the controller extension to set the "rendered" property of pageBlocks, but have not been successful.

 

Can someone explain the best way to show a VF page on a standard page when the standard page is in edit mode?

 

Thanks

Message Edited by Clifford on 03-28-2009 05:23 PM

Is there a way to get the "id" of a picklist value through the API?  We are using picklist values in an external system and when a picklist value is updated, would like to "push" this updated value to the external system via the id.

 

Looking at the edit page, it seems it may be possible to get at the id, but I do not see this available through the API.  Is there a way to get this id value?

 

Examples through the edit screen:
picklist_masteredit.jsp?id=01J400000088LJZ
picklist_masteredit.jsp?id=01J400000088LJa

 

Thanks!

I was using the below code to retrieve picklist values through the API.  We have now introduced RecordTypes and we need to limit the picklist values we retrieve (or filter out) to those for a particular RecordType.
 
Does anyone have sample code on how to do this?  We will know the RecordTypeId, just not sure how to use that to filter the picklist.  Should this be done with the describeLayout()?
 
//Following gets all picklist vlaues...does not filter based on RecordType
DescribeSObjectResult result = _binding.describeSObject("MyObject__c");
int numberOfPicklistItems = 0;
int fieldIndexOfPicklist = 0;
for (int i = 0; i < result.fields.Length; i++)
{
 if (result.fields[i].name == ConfigurationData.FieldName)
 {
  numberOfPicklistItems = result.fields[i].picklistValues.Length;
  fieldIndexOfPicklist = i;
  break;
 }
}
for (int i = 0; i < numberOfPicklistItems; i++)
{
 ActivityList.Add(new ActivityListItem()
 {
  Value = result.fields[fieldIndexOfPicklist].picklistValues[i].value,
  Label = result.fields[fieldIndexOfPicklist].picklistValues[i].label
 });
}
 
 
Thanks...
 
 
 
 
I am an experienced Salesforce and .NET developer with over 10 years of experience in the IT field.  I am currently available for part time and freelance work.  I would welcome the opportunity to discuss my experiences developing and integrating with the force.com platform and how I could help you on your next development project.
Message Edited by Clifford on 02-09-2009 01:45 PM

We have a custom object that has a corresponding history object to track changes.  I am trying to write a query to retrieve the history information, including username in as efficient a manner possible since I am going through the API.  I can write a query such as:

 

Select createdbyid, newvalue, oldvalue from My_Object_History__c

 

But what I really want is something like the following so I do not have to round trip back to the server to get the username:

 

Select (username from user where id = createdbyid), newvalue, oldvalue from My_Object_History__c

 

Can someone help and let me know if this is possible and if so, how?

We have a custom object "Orders" that is related to "Opportunities".  We want to create an outbound message workflow such that when a custom field on Orders is updated, we can send fields from Orders and Opportunities to an external system.  In setting up the workflow rule on the Orders object, we do not have access to fields on the related Opportunity object.

Is there a way to include fields for multiple objects into one outbound message?  If not, does anyone have suggestions as to workarounds?  We would like to use asynchronous messages using the workflows if possible.

Thanks!

I am wondering if it is possible to have a workflow run as a result of a user clicking a link on the page?  Essentially I want to send an outbound message from a workflow and would like to do so based on the user clicking a link/button.


Message Edited by Clifford on 05-13-2008 09:10 AM
I have a custom object.  When a Task is added to the custom object I need to do two things.  1. Check the subject of the Task.  If it is a certain value, I have to update the parent custom object status field.  2. I also need to call an external web service if the custom object status field has been updated to a particular value. 
 
I am not able to update the custom object status field using a work flow rule since the logic is dependent upon the Task object.  Because of this I have a trigger and Apex class that updates the custom object status based on the Task subject.  I then want to use a work flow to check the custom object status and if the status meets the criteria to send an asynchronous outbound message.  I would like to use a work flow to send messages asynchronously.
 
Problem - the work flow runs before the trigger, so even if the trigger updates the status to a value that would make the work flow rule evaluate to true, the work flow runs AFTER the trigger.
 
Questions:
1. Is there a way to change the order of execution for the trigger and work flow?
2. Can I call a work flow from a trigger or Apex class?
3. I know I can make a synchronous call to a web service from an Apex class, but aside from a work flow is there another way to make an asynchronous call?
 
Thanks in advance.
 
Cliff


Message Edited by Clifford on 05-13-2008 09:09 AM

OK, I have to create a special "control" that will be part of the page layout for one of the case record type's layout. I see that I can place an vf page as a 'field' in the page layout and I wanted to use this functionality. 

 

I created the vf page and simply put it has an apex:inputfield plus some of our own content in it. The extension class does get loaded and tied to case's controller and the field binds. The problems I have are:

 

1. I want to make it look like just another section item in the layout, since it now renders as an independent IFRAME. If I create a full vf layout from <apex: pageBlock> as I would for a full blown page then I get a block in a block which is utterly ugly. What am I missing?  

 

2. The vf page only shows in the VIEW mode, and with the field in edit mode, whilst when the whole page is in edit mode the vf page is not rendered at all? Again, how do I adjust that my control follow the layout's  mode (be a view when in view mode and show as editable when in edit mode)?

 

3. If #1 is impossible, can I at least embed a VF page as a pageBlock on its own. I tried dragging the page between two page blocks in page layout editor but it wont stick as a block, only as a section item.

 

 

Message Edited by mmix on 02-11-2009 11:22 AM
  • February 11, 2009
  • Like
  • 0

Is there a way to get the "id" of a picklist value through the API?  We are using picklist values in an external system and when a picklist value is updated, would like to "push" this updated value to the external system via the id.

 

Looking at the edit page, it seems it may be possible to get at the id, but I do not see this available through the API.  Is there a way to get this id value?

 

Examples through the edit screen:
picklist_masteredit.jsp?id=01J400000088LJZ
picklist_masteredit.jsp?id=01J400000088LJa

 

Thanks!

We have a custom object that has a corresponding history object to track changes.  I am trying to write a query to retrieve the history information, including username in as efficient a manner possible since I am going through the API.  I can write a query such as:

 

Select createdbyid, newvalue, oldvalue from My_Object_History__c

 

But what I really want is something like the following so I do not have to round trip back to the server to get the username:

 

Select (username from user where id = createdbyid), newvalue, oldvalue from My_Object_History__c

 

Can someone help and let me know if this is possible and if so, how?

We have a custom object "Orders" that is related to "Opportunities".  We want to create an outbound message workflow such that when a custom field on Orders is updated, we can send fields from Orders and Opportunities to an external system.  In setting up the workflow rule on the Orders object, we do not have access to fields on the related Opportunity object.

Is there a way to include fields for multiple objects into one outbound message?  If not, does anyone have suggestions as to workarounds?  We would like to use asynchronous messages using the workflows if possible.

Thanks!

I have a custom object.  When a Task is added to the custom object I need to do two things.  1. Check the subject of the Task.  If it is a certain value, I have to update the parent custom object status field.  2. I also need to call an external web service if the custom object status field has been updated to a particular value. 
 
I am not able to update the custom object status field using a work flow rule since the logic is dependent upon the Task object.  Because of this I have a trigger and Apex class that updates the custom object status based on the Task subject.  I then want to use a work flow to check the custom object status and if the status meets the criteria to send an asynchronous outbound message.  I would like to use a work flow to send messages asynchronously.
 
Problem - the work flow runs before the trigger, so even if the trigger updates the status to a value that would make the work flow rule evaluate to true, the work flow runs AFTER the trigger.
 
Questions:
1. Is there a way to change the order of execution for the trigger and work flow?
2. Can I call a work flow from a trigger or Apex class?
3. I know I can make a synchronous call to a web service from an Apex class, but aside from a work flow is there another way to make an asynchronous call?
 
Thanks in advance.
 
Cliff


Message Edited by Clifford on 05-13-2008 09:09 AM
I am trying to get picklist values through API for diffrent record type. Also I want to get RelatedPicklist values.How will i get these Filtered picklist values and its releted pick list values? Sample code !!!
 
Thanks
 
 
  • April 26, 2007
  • Like
  • 0