• Namita Upadhyaya1
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
I need to create a custom button for Account related list Event, as "Create New Event". so when this button clicks it opens a new event page with
prepopulated values of 2 custom fields of Account.
So for Salesforce Classic, I have a created a custom button and passing Account custom field values in URL parameters. And Voila it worked !
But now I need same functionality for Salesforce1. So I am trying to create a VF page and assigning it as publisher action.
But I dont know what I am doing wrong.


My VF page for publisher action is :

<apex:page action="{!URLFOR($Action.Event.Edit,null,['Event.what_id'='Account.ID',
                                                '00N23000000M5yK'='Account.Declining_Account__c',
                                                '00N23000000M5yU'='Account.Targeted_for_Recovery__c'],false
                                          )}">
</apex:page>

It gives me an error:

Visualforce Error
Invalid parameter for function URLFOR
Error is in expression '{!URLFOR($Action.Event.Edit,null,['Event.what_id'='Account', '00N23000000M5yK'='Account.Declining_Account__c', '00N23000000M5yU'='Account.Targeted_for_Recovery__c'],false )}' in component <apex:page> in page eventcreatenewaccountfields



Please guide me through.

Thanks in Advance !
Namita

 
I need to create a custom button for Account related list Event, as "Create New Event". so when this button clicks it opens a new event page with
prepopulated values of 2 custom fields of Account.
So for Salesforce Classic, I have a created a custom button and passing Account custom field values in URL parameters. And Voila it worked !
But now I need same functionality for Salesforce1. So I am trying to create a VF page and assigning it as publisher action.
But I dont know what I am doing wrong.


My VF page for publisher action is :

<apex:page action="{!URLFOR($Action.Event.Edit,null,['Event.what_id'='Account.ID',
                                                '00N23000000M5yK'='Account.Declining_Account__c',
                                                '00N23000000M5yU'='Account.Targeted_for_Recovery__c'],false
                                          )}">
</apex:page>

It gives me an error:

Visualforce Error
Invalid parameter for function URLFOR
Error is in expression '{!URLFOR($Action.Event.Edit,null,['Event.what_id'='Account', '00N23000000M5yK'='Account.Declining_Account__c', '00N23000000M5yU'='Account.Targeted_for_Recovery__c'],false )}' in component <apex:page> in page eventcreatenewaccountfields



Please guide me through.

Thanks in Advance !
Namita

 
Hi Every One,
Kindly provide  expected solution to below queries.

Declaratively create logic in your org that prevents two Opportunities from being created on a single Account in a single day.
Declaratively create logic in your org that prevents closed Opportunities from being updated by a non System Administrator profile.

Many Thansk in advance.