• varun singh 22
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 1
    Likes Given
  • 1
    Questions
  • 2
    Replies
Hi All,
I have done with metadata api and access id,name and  object  (on which they are active or inactive) of workflow  and  validation rule

but i am unbale to access active field (means workflow is active or not )

this  is my  code

   public void showvaidation() {
        display=true;
        inputtyp=ApexPages.currentPage().getParameters().get('input');
        system.debug('result **************************'+inputtyp);
        
        MetadataService.MetadataPort service = new MetadataService.MetadataPort();
        service.SessionHeader = new MetadataService.SessionHeader_element();
        service.SessionHeader.sessionId = UserInfo.getSessionId();
        List
        <MetadataService.ListMetadataQuery>
        queries = new List
        <MetadataService.ListMetadataQuery>
        ();    
        MetadataService.ListMetadataQuery queryLayout = new MetadataService.ListMetadataQuery();
        queryLayout.folder = '';

        queryLayout.type_x = inputtyp;
        queries.add(queryLayout);    
        MetadataService.FileProperties[] fileProperties = service.listMetadata(queries, 25);
        if(fileProperties!=null)
            {
            siteurl=Url.getSalesforceBaseUrl().toExternalForm() ;
            vdata=new  list
            <metawrapper>
            ();
            for(MetadataService.FileProperties fileProperty : fileProperties)
            {
                System.debug(fileProperty.active); 
                System.debug('file name **********'+fileProperty.ID); 
                if(fileProperty.FullName.contains(listvalue)){
                vdata.add(new metawrapper(fileProperty.id,fileProperty.fullname));
                }
                }
            }
        }

thanks in advance
Getting the error "Challenge Not yet complete... here's what's wrong:  The 'Opportunities Updates' report was not an Opportunities report type"

In the sample video there is acutally report called "Opportunities" but in my Developer.Demo account there is no report called "Opportunites", see pics below for more clarity. What are my next steps?




User-added imageUser-added image
Hi All,
I have done with metadata api and access id,name and  object  (on which they are active or inactive) of workflow  and  validation rule

but i am unbale to access active field (means workflow is active or not )

this  is my  code

   public void showvaidation() {
        display=true;
        inputtyp=ApexPages.currentPage().getParameters().get('input');
        system.debug('result **************************'+inputtyp);
        
        MetadataService.MetadataPort service = new MetadataService.MetadataPort();
        service.SessionHeader = new MetadataService.SessionHeader_element();
        service.SessionHeader.sessionId = UserInfo.getSessionId();
        List
        <MetadataService.ListMetadataQuery>
        queries = new List
        <MetadataService.ListMetadataQuery>
        ();    
        MetadataService.ListMetadataQuery queryLayout = new MetadataService.ListMetadataQuery();
        queryLayout.folder = '';

        queryLayout.type_x = inputtyp;
        queries.add(queryLayout);    
        MetadataService.FileProperties[] fileProperties = service.listMetadata(queries, 25);
        if(fileProperties!=null)
            {
            siteurl=Url.getSalesforceBaseUrl().toExternalForm() ;
            vdata=new  list
            <metawrapper>
            ();
            for(MetadataService.FileProperties fileProperty : fileProperties)
            {
                System.debug(fileProperty.active); 
                System.debug('file name **********'+fileProperty.ID); 
                if(fileProperty.FullName.contains(listvalue)){
                vdata.add(new metawrapper(fileProperty.id,fileProperty.fullname));
                }
                }
            }
        }

thanks in advance
Hi All,

I have Questions like below screen short.
If i select Agra or Jaipur that section should be hide for another user

can you help me controllerUser-added image