• hk7965
  • NEWBIE
  • 35 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 7
    Replies
Hi ,

I have a requirement to hide a button on pageload based on the value of the field on the samepage which get value from a controller. I have written JS on window load but it is not executing. Any thoughts on how to achieve this? 


Regards
Mohan Krishna
Hi ,

Few of my test claases throwing error - Error: FOR VIEW/REFERENCE can only be used on an object where viewing is tracked ,  and this is causing my deployment fail. Could someone help to solve this issue?

Regards
Mohan
Hi ,

I have created 2 cutom objects Project,Assignment. We configure Project request Assignment details in Assignment Object .  Based on Queue selected on Project Object, trigger should lookup user in Assignment object and get user ID in a user lookup field in Project object. 

But I am not getting value as expected, Please help me to correct this issue.




trigger Mapping on Project__c (before insert,before update) {
     try{
   
    set<ID> SGPID = new set <ID>();
         For (Project__C PA :Trigger.new){
             if (PA.Group != null)
            SGPID.add( PA.Group);
         }
             
               
          Map<Id,Assignment> KR = new Map<Id,Assignment> ([select user from Assignment where group =:SGPID]);
        
 
        For (Project__C PA :Trigger.new)
              PA.user =KR.get(KA.group).Assignment;
      
    }
    catch(Exception e)
    {}
   
}

Regards
Krishna

Hi ,

I have embeded a JS function in VF to validate mandatory fields. But its not working as expected and getting JS error-  document.getElementById(...) is null when i click Submit button.  please help me to fix this issue.




function commentsrequired(csc,csr)
    {

    var x=document.getElementById(csc).value;

         var y=document.getElementById(csr).value;

    if(x==null&y==null)

        alert("please fill mandatory fields");

        else
         return true;
        acsave();
    }
          if({!surveyreceived} || {!stateopen})
          {
             window.location = "../apex/NoFeedBackRequired";
          }
      </script>
     <apex:pageBlock id="survey">
    
          <apex:pageBlockSection title="Survey Details" columns="2" >

          <apex:inputField label="Rating<br></br><h0>(5-Excellent; 4-Good;
3-Average; 2-Poor; 1-Very Poor)</h0>"
value="{!Survey__c.Service_Ratings__c}" id="csr"/>
          <apex:tabPanel ></apex:tabPanel>
          <apex:inputField label="Please provide your overall comments
about the service provided." value="{!Survey__c.Comments__c}"
required="true" id="csc"/>

          </apex:pageBlockSection>
          <br></br><br></br>
          <apex:actionFunction name="acsave" action="{!save}"
oncomplete="alert('Done');" />
          <apex:actionFunction name="acreopen" action="{!reopen}"
oncomplete="alert('Incident has been reopened successfully'); " />


              <input type="button"
onclick="commentsrequired('{!$Component.csc}','{!$Component.csr}')" name="Submit"
value="Submit"/>
              <input id="acreopen1" type="button"
onclick="disablebutton();acreopen();" name="Reopen" value="Reopen"/>

         </apex:pageBlock>

    </apex:form>
    <script>
    function disablebutton()
    {
        //alert(document.getElementById('acreopen1'));
        document.getElementById('acreopen1').disabled = true;
    }
    </script>

Regards
Mohan Krishna
Hello,

I have built an Approval process on a custom Object and defined a queue as an approver. When the record mets Approval Criteria It is showing Queue name in Approval history not Individual approvers. Is there any way to display approver names in the queue in approval history or users to know with whom in the queue the request is waiting for approval.

Regards
Krishna
  • April 28, 2014
  • Like
  • 1
Hello,

I have built an Approval process on a custom Object and defined a queue as an approver. When the record mets Approval Criteria It is showing Queue name in Approval history not Individual approvers. Is there any way to display approver names in the queue in approval history or users to know with whom in the queue the request is waiting for approval.

Regards
Krishna
  • April 28, 2014
  • Like
  • 1
Hi ,

I have a requirement to hide a button on pageload based on the value of the field on the samepage which get value from a controller. I have written JS on window load but it is not executing. Any thoughts on how to achieve this? 


Regards
Mohan Krishna
Hi ,

Few of my test claases throwing error - Error: FOR VIEW/REFERENCE can only be used on an object where viewing is tracked ,  and this is causing my deployment fail. Could someone help to solve this issue?

Regards
Mohan

Hi ,

I have embeded a JS function in VF to validate mandatory fields. But its not working as expected and getting JS error-  document.getElementById(...) is null when i click Submit button.  please help me to fix this issue.




function commentsrequired(csc,csr)
    {

    var x=document.getElementById(csc).value;

         var y=document.getElementById(csr).value;

    if(x==null&y==null)

        alert("please fill mandatory fields");

        else
         return true;
        acsave();
    }
          if({!surveyreceived} || {!stateopen})
          {
             window.location = "../apex/NoFeedBackRequired";
          }
      </script>
     <apex:pageBlock id="survey">
    
          <apex:pageBlockSection title="Survey Details" columns="2" >

          <apex:inputField label="Rating<br></br><h0>(5-Excellent; 4-Good;
3-Average; 2-Poor; 1-Very Poor)</h0>"
value="{!Survey__c.Service_Ratings__c}" id="csr"/>
          <apex:tabPanel ></apex:tabPanel>
          <apex:inputField label="Please provide your overall comments
about the service provided." value="{!Survey__c.Comments__c}"
required="true" id="csc"/>

          </apex:pageBlockSection>
          <br></br><br></br>
          <apex:actionFunction name="acsave" action="{!save}"
oncomplete="alert('Done');" />
          <apex:actionFunction name="acreopen" action="{!reopen}"
oncomplete="alert('Incident has been reopened successfully'); " />


              <input type="button"
onclick="commentsrequired('{!$Component.csc}','{!$Component.csr}')" name="Submit"
value="Submit"/>
              <input id="acreopen1" type="button"
onclick="disablebutton();acreopen();" name="Reopen" value="Reopen"/>

         </apex:pageBlock>

    </apex:form>
    <script>
    function disablebutton()
    {
        //alert(document.getElementById('acreopen1'));
        document.getElementById('acreopen1').disabled = true;
    }
    </script>

Regards
Mohan Krishna
Hello,

I have built an Approval process on a custom Object and defined a queue as an approver. When the record mets Approval Criteria It is showing Queue name in Approval history not Individual approvers. Is there any way to display approver names in the queue in approval history or users to know with whom in the queue the request is waiting for approval.

Regards
Krishna
  • April 28, 2014
  • Like
  • 1