• Sri Krishnamurthy
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

Hi, Here is my scenario

 

1. I have a CFO PROFILE which announces the budget to buy some media (Stored in 'Media Finance' object). The STATUS field in this object is updated to 'BUDGET ALLOCATED' immediately.

2. The BUYER PROFILE buys the media one by one to create the line items. 

3. After creating the media line items, the buyer indicates that his purchases are DONE by clicking a 'PURCHASE DONE' CUSTOM button in the screen. This calls JAVASCRIPT function asking 'Are you sure?'. Now, if he presses 'Yes', then STATUS field in the 'Media Finance' object should go to 'MEDIA PURCHASED'. 

3. The 'Media Finance' object is the master for 'Media line items' object.

 

Constraints:

----------------

1. ORG DEFAULT for Media Finance object - PUBLIC READ ONLY

2. Media finance object has  START DATE, END DATE, BUDGET fields which are REQUIRED in the DB. I cannot make it to be 'required' only in the UI. These are absolutely required for the records in the DB.

3. I don't want to change the 'public read only' because all the fields on 'Media Finance' object should be absolutely read only for the BUYER profile.

 

What I tried:

----------------

1. I gave a 'MODIFY ALL' for BUYER PROFILE on 'Media Finance' object. This makes START DATE, END DATE, BUDGET also editable in the UI which is a chaos for BUYER.

2. I wrote a validation rule to make sure buyer is not updating START DATE, END DATE, BUDGET fields, but it does not solve the purpose. It still confuses the BUYER to do something other than pressing 'PURCHASE DONE' button.

3. Tried to update the record through JAVASCRIPT using sforce.connection method and it fails 'coz there is no permission.

4. My understanding is that, there is no way to give permission to edit only one field (while some other fields are 'required' in DB) in salesforce.

 

Is there any other better way to handle this situation? Your help is much appreciated.

 

I can't seem to create an Event Button that populates a VF Email Template with event details using Professional Edition.

 

.  Here is the button.

 

"/_ui/core/email/author/EmailAuthor?p2_lkid={!Event.Who}&p3_lkid=&p4=&p5=&p24=&cancelURL=/{!Event.Id }&retURL=/{!Event.Id}&template_id=00XA0000000eyxo&recipient_type_id={!Event.Who}&related_to_id={!Event.Id}"

 

Putting the p3_lkid={!Event.Id} produces an error "Invalid parameter" due to the EmailAuthor doesn't seem to allow Events as a valid p3_lkid.

 

Here is the VF Email Template.

<messaging:emailTemplate subject="Appointment Confirmation" recipientType="Contact" relatedToType="Event">

<messaging:htmlEmailBody >
<p>Dear {!recipient.Name},
<br/>
<br/>
This is a reminder of an appointment that is scheduled.  Details are:
<br/>
<br/>
Appoinment: {!relatedTo.Subject}
<br/>
<apex:outputText value="Date: {0,date}">
<apex:param value="{!relatedTo.StartDateTime}"/>
</apex:outputText>
<br/>
<apex:outputText value="Time: {0,time,short}">
<apex:param value="{!relatedTo.StartDateTime}"/>
</apex:outputText>
<br/>
Company: {!relatedTo.What.Name}
</p>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

 

The template populates fine when using the Send Test and Verify Merge Fields, but not using the button.  Any ideas?

Thanks.

  • June 08, 2010
  • Like
  • 0