• R_Shri
  • NEWBIE
  • 25 Points
  • Member since 2012

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 17
    Replies
Hi,

My company wants to deploy "My Domain" for SSO.

But I'm afraid that any functionality (like APEX, Visualforce page, Workflow rule or any other ) which contains (has reference to) any hardcoded URL will get affected. So is it true that deployment of "My Domain" will hamper any functionality? Do we have to change hardcoded URLs (if any).

Also what are the other best practices we have to keep in mind while deploying my domain?

Please reply soon!

Thanks
R_Shri
  • February 12, 2014
  • Like
  • 0
Hi,

Can we hide record type in the link  '/setup/ui/recordtypeselect.jsp?ent=Account'

It is a standard page while creating a new Account, and in drop down I am getting all my record types.
In all I have 5 record types out of which I have to display only 3 to everybody while 2 record types are used only if the record is created with the help of another application (while integration)

Please help me regarding this and let me know the probable solution of it.

Thanks and regards,

R_Shri
  • January 31, 2014
  • Like
  • 0
Hi,

I am trying to replace/override Standard Opportunity detail page with a visualforce page.
I am sucessfull in displaying allmost all the fields properly but I am having problem with some.

Scenerio of problem.
      1. On change of Stage field I want to show some fields and hide some.
             If Stage = "Closed Lost"  Custom_Fld1, Custom_Fld2, Custom_Fld3 should be displayed
             and if Stage = "Closed Won" Custom_Fld3, Custom_Fld4 should be displayed

I have used following code:

apex:page standardController="Opportunity" docType="html-5.0" id="TheOppPage" tabStyle="Opportunity" extensions="Opporunitycntrlr">
  
    <apex:form >
        <apex:pageBlock mode="maindetail" title="Opportunity Detail" id="thePageBlockDetail1"> <!--mode="inlineEdit"-->
            <!-- All Buttons are defined here-->
            <apex:pageBlockButtons >
                <apex:commandButton action="{!edit}" id="editButton" value="Edit"/>
                <apex:commandButton action="{!save}" id="saveButton" value="Save"/>
                <apex:commandButton action="{!delete}" id="deleteButton" value="Delete"/>
                <apex:commandButton action="{!cancel}" id="cancelButton" value="Cancel" style="display:none" />
            </apex:pageBlockButtons>
          
            <apex:pageBlockSection title="Opportunity Information1111111" id="thePageBlockSectionDetail11">
                <apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton, deleteButton" event="ondblclick"
                    changedStyleClass="myBoldClass" resetFunction="resetInlineEdit" />
              
                <apex:actionRegion >
                    <apex:outputField value="{!opportunity.StageName}">
                        <apex:actionSupport event="onchange" reRender="otptpnl1"/>
                    </apex:outputField>
                  
                </apex:actionRegion>
                    <apex:outputPanel id="otptpnl1">
                        <apex:outputField value="{!opportunity.Probability}" id="Prbblty"/>                  
                        <apex:outputField value="{!opportunity.Custom_Fld1__c}" rendered="{!opportunity.StageName = 'Closed Lost'}"/>
                        <apex:outputField value="{!opportunity.Custom_Fld2__c}" rendered="{!opportunity.StageName = 'Closed Lost'}"/>
                        <apex:outputField value="{!opportunity.Custom_Fld3__c}" rendered="{!opportunity.StageName = 'Closed Won' || opportunity.StageName = 'Closed Lost'}"/>
                        <apex:outputField value="{!opportunity.Custom_Fld4__c}" rendered="{!opportunity.StageName = 'Closed Won'}"/>
                    </apex:outputPanel>
              
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
    <apex:relatedList list="OpportunityLineItems"/>
    <apex:relatedList list="OpenActivities"/>
    <apex:relatedList list="ActivityHistories"/>
    <apex:relatedList list="CombinedAttachments"/>
    <apex:relatedList list="OpportunityContactRoles"/>
    <apex:relatedList list="OpportunityPartnersFrom"/>
    <apex:relatedList list="OpportunityCompetitors"/>
    <apex:relatedList list="OpportunityHistories"/>
</apex:page>

The main problem I am facing is that in inline edit I'm not getting all the fields displayed (I have validation rules on these custom fields). So when I try to edit any field (say stage) I'm not getting other fields on display and hence I'm not able to change them therefore I'm getting error while saving. Also probablity is not getting refreshed automatically.

Note: Custom_Fld1, Custom_Fld2, Custom_Fld4 are dependent picklist (dependet Stage) and Custom_Fld3 is a text field.

Thanks,
R_Shri
  • January 08, 2014
  • Like
  • 0
I am trying to hide Stage field of opportunity from visualforce page but I am not able to achieve the task.
If I am using style="display:none" nothing is happening and if I am using rendered="false” I am getting error as “The inline edit-enabled dependent picklist 'Lost Reasons' requires its controlling field 'Stage' to be present on the page.” Please help me regarding this ASAP.

I have used the below code. Please let me know if I am missing out something.


<apex:page standardController="Opportunity" docType="html-5.0" id="TheOppPage" tabStyle="Opportunity" showChat="false">
    <apex:form >
        <apex:pageBlock mode="maindetail"  id="thePageBlockDetail1" rendered="{!opportunity.StageName = 'Closed Won' || opportunity.StageName = 'Closed Lost'}">
          
            <!-- All Buttons are defined here-->
            <apex:pageBlockButtons >
                <apex:commandButton action="{!edit}" id="editButton" value="Edit" style="display:none"/>
                <apex:commandButton action="{!save}" id="saveButton" value="Save" style="display:none"/>
                <apex:commandButton action="{!delete}" id="deleteButton" value="Delete" style="display:none"/>
                <apex:commandButton action="{!cancel}" id="cancelButton" value="Cancel" style="display:none" />
            </apex:pageBlockButtons>
          
            <!--Main details of this opportunity are defined here. -->
          
            <apex:pageBlockSection id="thePageBlockSectionDetail1">
                <apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton, deleteButton" event="ondblclick"
                    changedStyleClass="myBoldClass" resetFunction="resetInlineEdit" />
                  
                <apex:outputField value="{!opportunity.StageName}" style="display:none"/>
                <apex:outputField value="{!opportunity.Won_Reasons__c}" rendered="{!opportunity.StageName = 'Closed Won'}"/>
                <apex:outputField value="{!opportunity.Lost_Reasons__c}" rendered="{!opportunity.StageName = 'Closed Lost'}"/>
                <apex:outputField value="{!opportunity.customfield1__c}" rendered="{!opportunity.StageName = 'Closed Lost'}"/><br/>
                <apex:outputField value="{!opportunity.customfield2__c}" rendered="{!opportunity.StageName = 'Closed Lost'}"/>    
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>


Thanks in advance!
:)

Regards,
R_Shri
  • December 30, 2014
  • Like
  • 0

I have 1 custom button on a detail page's  (standard layout ) of a custom object. It is already having a functionality of redirecting to a URL(lets say functionality 1). Now I have to add 1 additional functionality that if a user clicks this button, the record type(hence page layout) should change and functionality 1 should also work.

 

Currently content source is URL.

 

(I thought of adding some JavaScript to this button but I am confused how to add JavaScript along with the URL, or will both the functionality will work simultaneously or not.) 

 

Any help would be highly appreciated.

 

Thanks 

R_Shri

  • November 18, 2013
  • Like
  • 0

I have a scenario wherein :

               1. If any field gets updated in Opportunity (master) a workflow (outbound message) has to be fired from custom_object__c (detail). This custom_object__c has some formula fields which takes value from Opportunity and some other fields. So with the help of this workflow I send(to another system) all fields of custom_object__c via outbound message.

    For this I have created:

                     A. a custom_field__c (of dataType checkbox) in custom_object__c,

                     B. a trigger (it has a functionality that if any field gets updated in Opportunity the value of custom_field__c  becomes true ). 

  trigger tgrAfterUpdateOpportunity on Opportunity (After update) {

  }

                    C. And on the basis of status of custom_field__c (if true)  a workflow is fired and hence the outbound message. 

 

                2. Now the problem arises is that once the value of custom_field__c  becomes true my workflow becomes useless as it is not sending the new updated values of opportunity (it sending the same values as when the custom_object__c becomes true for the first time)

          

              For this I have created a time dependent workflow which toggles the value of custom_field__c  after defined time, and hence my functionality again starts working fine.

 

          But the main issue is Time-Dependent Workflow Actions has minimum time limit of 1 hour . So is there any method by which I can set a  Time-Dependent Workflow's limit to few seconds or a sew minute at max? (so that my functionality keeps on working fine continuously.) or else please suggest some idea wherein the value of custom_field__c gets toggled after the outbound message (of first workflow ) has been fired.

 

Any help would be highly appriciated.

 

Thanks

R_Shri

  • November 13, 2013
  • Like
  • 0

Hi,

I have an issue which is given below. Please help me regarding it.

 

Scenario: URL to be given in a custom button is in the format "notes://server/db/view/document?Command&params=values"

 

Error in the browser after clicking the button: The address wasn't understood, because the protocol (notes) isn't associated with any program.

 

Please let me know if anybody has any appropriate solution related to it? Is there any method available wherein I can redirect the URL to Notes:// (Used in IBM lotus Notes) protocol.

 

Thanks in advance!

:)

 

 

  • October 03, 2013
  • Like
  • 0

Hi,

 

I was just watching a an APEX webinar @ http://wiki.developerforce.com/page/Webinar:_Intro_to_Apex_Code_(2012-July)

 

There I came accross a code (@ time approx. 48min. of video)

 

 String query String = 'SELECT name, celebrity__c, celebrity_r.name, destination__c,city__c,status__c' + 
                                        'FROM reservation__c';
 
         if(reservationNum != null && reservationNum != ' '){
            reservationNum = string.escapeSingleQuotes(reservationNum); // To Avoid SOQL Injection
            reservationNum = reservationNum.startswith('%') ? reservationNum : '%' + reservationNum ;
            reservationNum = reservationNum.endswith('%') ? reservationNum : reservationNum +  '%' ;
            queryString += whereOrAndClause() + 'Name like\'' + reservationNum + \'';
         }
 
Here I couldn't understand what does whereOrAndClause()  do ? What would be its return type (I think it should be String) ?
Can anybody please suggest what should be written in this method?
 
Thanks in advance.:)
I am quite new to APEX programming.
  • December 31, 2013
  • Like
  • 0

There is governor limit of 50 workflow per object and I am about to reach the limit for the Account object.

Atleast 30 workflow are similar in nature and in them only one condition changes which is value of country field (and hence E-mail alerts to the users/groups).

Please suggest any solution by which I can club most of these workflow(if not all).

Please let me know if any further information is required.

 

Thanks,

Rumit

 

 

 

 

  • December 11, 2012
  • Like
  • 0
Hi,

Can we hide record type in the link  '/setup/ui/recordtypeselect.jsp?ent=Account'

It is a standard page while creating a new Account, and in drop down I am getting all my record types.
In all I have 5 record types out of which I have to display only 3 to everybody while 2 record types are used only if the record is created with the help of another application (while integration)

Please help me regarding this and let me know the probable solution of it.

Thanks and regards,

R_Shri
  • January 31, 2014
  • Like
  • 0
Hi,

I am trying to replace/override Standard Opportunity detail page with a visualforce page.
I am sucessfull in displaying allmost all the fields properly but I am having problem with some.

Scenerio of problem.
      1. On change of Stage field I want to show some fields and hide some.
             If Stage = "Closed Lost"  Custom_Fld1, Custom_Fld2, Custom_Fld3 should be displayed
             and if Stage = "Closed Won" Custom_Fld3, Custom_Fld4 should be displayed

I have used following code:

apex:page standardController="Opportunity" docType="html-5.0" id="TheOppPage" tabStyle="Opportunity" extensions="Opporunitycntrlr">
  
    <apex:form >
        <apex:pageBlock mode="maindetail" title="Opportunity Detail" id="thePageBlockDetail1"> <!--mode="inlineEdit"-->
            <!-- All Buttons are defined here-->
            <apex:pageBlockButtons >
                <apex:commandButton action="{!edit}" id="editButton" value="Edit"/>
                <apex:commandButton action="{!save}" id="saveButton" value="Save"/>
                <apex:commandButton action="{!delete}" id="deleteButton" value="Delete"/>
                <apex:commandButton action="{!cancel}" id="cancelButton" value="Cancel" style="display:none" />
            </apex:pageBlockButtons>
          
            <apex:pageBlockSection title="Opportunity Information1111111" id="thePageBlockSectionDetail11">
                <apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton, deleteButton" event="ondblclick"
                    changedStyleClass="myBoldClass" resetFunction="resetInlineEdit" />
              
                <apex:actionRegion >
                    <apex:outputField value="{!opportunity.StageName}">
                        <apex:actionSupport event="onchange" reRender="otptpnl1"/>
                    </apex:outputField>
                  
                </apex:actionRegion>
                    <apex:outputPanel id="otptpnl1">
                        <apex:outputField value="{!opportunity.Probability}" id="Prbblty"/>                  
                        <apex:outputField value="{!opportunity.Custom_Fld1__c}" rendered="{!opportunity.StageName = 'Closed Lost'}"/>
                        <apex:outputField value="{!opportunity.Custom_Fld2__c}" rendered="{!opportunity.StageName = 'Closed Lost'}"/>
                        <apex:outputField value="{!opportunity.Custom_Fld3__c}" rendered="{!opportunity.StageName = 'Closed Won' || opportunity.StageName = 'Closed Lost'}"/>
                        <apex:outputField value="{!opportunity.Custom_Fld4__c}" rendered="{!opportunity.StageName = 'Closed Won'}"/>
                    </apex:outputPanel>
              
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
    <apex:relatedList list="OpportunityLineItems"/>
    <apex:relatedList list="OpenActivities"/>
    <apex:relatedList list="ActivityHistories"/>
    <apex:relatedList list="CombinedAttachments"/>
    <apex:relatedList list="OpportunityContactRoles"/>
    <apex:relatedList list="OpportunityPartnersFrom"/>
    <apex:relatedList list="OpportunityCompetitors"/>
    <apex:relatedList list="OpportunityHistories"/>
</apex:page>

The main problem I am facing is that in inline edit I'm not getting all the fields displayed (I have validation rules on these custom fields). So when I try to edit any field (say stage) I'm not getting other fields on display and hence I'm not able to change them therefore I'm getting error while saving. Also probablity is not getting refreshed automatically.

Note: Custom_Fld1, Custom_Fld2, Custom_Fld4 are dependent picklist (dependet Stage) and Custom_Fld3 is a text field.

Thanks,
R_Shri
  • January 08, 2014
  • Like
  • 0
I am trying to hide Stage field of opportunity from visualforce page but I am not able to achieve the task.
If I am using style="display:none" nothing is happening and if I am using rendered="false” I am getting error as “The inline edit-enabled dependent picklist 'Lost Reasons' requires its controlling field 'Stage' to be present on the page.” Please help me regarding this ASAP.

I have used the below code. Please let me know if I am missing out something.


<apex:page standardController="Opportunity" docType="html-5.0" id="TheOppPage" tabStyle="Opportunity" showChat="false">
    <apex:form >
        <apex:pageBlock mode="maindetail"  id="thePageBlockDetail1" rendered="{!opportunity.StageName = 'Closed Won' || opportunity.StageName = 'Closed Lost'}">
          
            <!-- All Buttons are defined here-->
            <apex:pageBlockButtons >
                <apex:commandButton action="{!edit}" id="editButton" value="Edit" style="display:none"/>
                <apex:commandButton action="{!save}" id="saveButton" value="Save" style="display:none"/>
                <apex:commandButton action="{!delete}" id="deleteButton" value="Delete" style="display:none"/>
                <apex:commandButton action="{!cancel}" id="cancelButton" value="Cancel" style="display:none" />
            </apex:pageBlockButtons>
          
            <!--Main details of this opportunity are defined here. -->
          
            <apex:pageBlockSection id="thePageBlockSectionDetail1">
                <apex:inlineEditSupport showOnEdit="saveButton, cancelButton" hideOnEdit="editButton, deleteButton" event="ondblclick"
                    changedStyleClass="myBoldClass" resetFunction="resetInlineEdit" />
                  
                <apex:outputField value="{!opportunity.StageName}" style="display:none"/>
                <apex:outputField value="{!opportunity.Won_Reasons__c}" rendered="{!opportunity.StageName = 'Closed Won'}"/>
                <apex:outputField value="{!opportunity.Lost_Reasons__c}" rendered="{!opportunity.StageName = 'Closed Lost'}"/>
                <apex:outputField value="{!opportunity.customfield1__c}" rendered="{!opportunity.StageName = 'Closed Lost'}"/><br/>
                <apex:outputField value="{!opportunity.customfield2__c}" rendered="{!opportunity.StageName = 'Closed Lost'}"/>    
            </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
</apex:page>


Thanks in advance!
:)

Regards,
R_Shri
  • December 30, 2014
  • Like
  • 0

I have 1 custom button on a detail page's  (standard layout ) of a custom object. It is already having a functionality of redirecting to a URL(lets say functionality 1). Now I have to add 1 additional functionality that if a user clicks this button, the record type(hence page layout) should change and functionality 1 should also work.

 

Currently content source is URL.

 

(I thought of adding some JavaScript to this button but I am confused how to add JavaScript along with the URL, or will both the functionality will work simultaneously or not.) 

 

Any help would be highly appreciated.

 

Thanks 

R_Shri

  • November 18, 2013
  • Like
  • 0

I have a scenario wherein :

               1. If any field gets updated in Opportunity (master) a workflow (outbound message) has to be fired from custom_object__c (detail). This custom_object__c has some formula fields which takes value from Opportunity and some other fields. So with the help of this workflow I send(to another system) all fields of custom_object__c via outbound message.

    For this I have created:

                     A. a custom_field__c (of dataType checkbox) in custom_object__c,

                     B. a trigger (it has a functionality that if any field gets updated in Opportunity the value of custom_field__c  becomes true ). 

  trigger tgrAfterUpdateOpportunity on Opportunity (After update) {

  }

                    C. And on the basis of status of custom_field__c (if true)  a workflow is fired and hence the outbound message. 

 

                2. Now the problem arises is that once the value of custom_field__c  becomes true my workflow becomes useless as it is not sending the new updated values of opportunity (it sending the same values as when the custom_object__c becomes true for the first time)

          

              For this I have created a time dependent workflow which toggles the value of custom_field__c  after defined time, and hence my functionality again starts working fine.

 

          But the main issue is Time-Dependent Workflow Actions has minimum time limit of 1 hour . So is there any method by which I can set a  Time-Dependent Workflow's limit to few seconds or a sew minute at max? (so that my functionality keeps on working fine continuously.) or else please suggest some idea wherein the value of custom_field__c gets toggled after the outbound message (of first workflow ) has been fired.

 

Any help would be highly appriciated.

 

Thanks

R_Shri

  • November 13, 2013
  • Like
  • 0

Hi,

I have an issue which is given below. Please help me regarding it.

 

Scenario: URL to be given in a custom button is in the format "notes://server/db/view/document?Command&params=values"

 

Error in the browser after clicking the button: The address wasn't understood, because the protocol (notes) isn't associated with any program.

 

Please let me know if anybody has any appropriate solution related to it? Is there any method available wherein I can redirect the URL to Notes:// (Used in IBM lotus Notes) protocol.

 

Thanks in advance!

:)

 

 

  • October 03, 2013
  • Like
  • 0

Hi,

 

I was just watching a an APEX webinar @ http://wiki.developerforce.com/page/Webinar:_Intro_to_Apex_Code_(2012-July)

 

There I came accross a code (@ time approx. 48min. of video)

 

 String query String = 'SELECT name, celebrity__c, celebrity_r.name, destination__c,city__c,status__c' + 
                                        'FROM reservation__c';
 
         if(reservationNum != null && reservationNum != ' '){
            reservationNum = string.escapeSingleQuotes(reservationNum); // To Avoid SOQL Injection
            reservationNum = reservationNum.startswith('%') ? reservationNum : '%' + reservationNum ;
            reservationNum = reservationNum.endswith('%') ? reservationNum : reservationNum +  '%' ;
            queryString += whereOrAndClause() + 'Name like\'' + reservationNum + \'';
         }
 
Here I couldn't understand what does whereOrAndClause()  do ? What would be its return type (I think it should be String) ?
Can anybody please suggest what should be written in this method?
 
Thanks in advance.:)
I am quite new to APEX programming.
  • December 31, 2013
  • Like
  • 0

There is governor limit of 50 workflow per object and I am about to reach the limit for the Account object.

Atleast 30 workflow are similar in nature and in them only one condition changes which is value of country field (and hence E-mail alerts to the users/groups).

Please suggest any solution by which I can club most of these workflow(if not all).

Please let me know if any further information is required.

 

Thanks,

Rumit

 

 

 

 

  • December 11, 2012
  • Like
  • 0