• Nazrul Amin
  • NEWBIE
  • 50 Points
  • Member since 2014

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

I am developing automation to create SBQQ quotes and opportunities in order to eventually create contracts, etc... One step of the automation tries to contract the opportunity. When calling, I notice that I am getting the following error. The contract is produced but I am not getting a renewal opportunity created. Any help would be greatly appreciated.

Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, SBQQ.QuoteAfter: execution of AfterUpdate

caused by: System.CalloutException: Callout from triggers are currently not supported.

(SBQQ)

We see this error in the Apex Jobs status detail for the apex class SBQQ ContractService. Does anyone know what is failing and why?

Update, if we reduce the batch size to 1, this error doesn't occur.
I am getting this error when trying to do the "Lightning Experience Rollout Specialist"

The AccountTab Visualforce page does not include one or both of the following: the apex:slds tag in the page, or the slds-table value in the table.


My code is as follows:
 
<apex:page standardStylesheets="false" standardController="Account" recordSetVar="accounts" tabStyle="account" applyHtmlTag="false" applyBodyTag="false" showHeader="false">
   <head>
       <apex:slds />
    </head> 
	<body>
    <div class="slds-scope">     
        <table class="slds-table">
  			<thead>
    			<tr class="slds-text-title_caps">
      				<th scope="col">
        				<div class="slds-truncate" title="{!$ObjectType.Account.Fields.Name.Label}">{!$ObjectType.Account.Fields.Name.Label}</div>
      				</th>
    			</tr>
  			</thead>
  			<tbody>
    			<apex:repeat value="{!accounts}" var="a">
                <tr>
                  <td data-label="Account Name">
                    <div class="slds-truncate" ><apex:outputLink value="{!URLFOR($Action.Account.View, a.id)}">{!a.name}</apex:outputLink></div>
                  </td>
      
    			</tr>
                </apex:repeat>
            </tbody>
        </table>
     <!--   
     <div class="slds-scope">
        <apex:pageBlock >
            <apex:pageBlockTable value="{!accounts}" var="a" styleClass="slds">
                <apex:column headerValue="{!$ObjectType.Account.Fields.Name.Label}">
                    <apex:outputLink value="{!URLFOR($Action.Account.View, a.id)}">{!a.name}</apex:outputLink>
                </apex:column>
            </apex:pageBlockTable>
        </apex:pageBlock>-->
    </div>
        </body>
</apex:page>

 
It's the example in the Trail:
<apex:page standardController="Contact" recordSetVar="contacts">
02    <apex:pageBlock title="Contacts List">
03         
04        <!-- Contacts List -->
05        <apex:pageBlockTable value="{! contacts }" var="ct">
06            <apex:column value="{! ct.FirstName }"/>
07            <apex:column value="{! ct.LastName }"/>
08            <apex:column value="{! ct.Email }"/>
09            <apex:column value="{! ct.Account.Name }"/>
10        </apex:pageBlockTable>
11         
12    </apex:pageBlock>
13</apex:page>

First I entered it all by hand and it goes to a page with the title but no columns nor data. So I just copied their example and pasted it, still no data on the page, nor headlines, columns, etc. 
What is missing?
Thanks
Hi,

I currently have a Master - Child relationship as follows:

Payment Schedule
     Payment
            custom field of Due Date
            custom field of Balance Amount

I want to be able to have a custom Roll Up Summary field  on the Payment Schedule that only includes a Payment Balance Amount if the Payment Due Date is either today or before today, <= TODAY()

I've looked at using the Criteria filters, however this gives me a formating error when using TODAY

I've looked at using a seperate Payment Custom Formula Field that is Payment Due Date - TODAY(), but this custom filed, once set does not appear in the list of criteria that I am able to set on the RUS.

After some research, I know that you cannot seem to be able to use derived values within RUS' 

So what is the common work around? We want to be able to do some APEX coding on this new Balance To Date field as well as show it on the Payment Schedule object in real time. So I don't think Workflows is also the answer as we don't want to have to be saving all Payments on a daily basis to update if that Payment is overdue or not.

Thanks

Martin Vernon
Lead Developer - Select Property Group
 
Hi 
lets assume a time based workflow rule is set and activated on time based actions 
for Eg:sending an email containing birthday wishes to  3 users based on their birth dates 8/8/2015,8/9/2015 and 8/10/2015.
Now is it possible to go back,deactivate and delete one of them which is in the middle of the Que i.e the times based workflow action which was set for (8/9/2015).
I've installed the mobileSDK and successfully run the Contact Explorer VFConnector sample apps.  I'm testing if it is possible to use communties for a mobile  app.  I've setup a communitiy, which generates a community login URL.  Is there a way to change the mobile login for the Contact Explorer and/or VF Connector sample apps to point to the community login page?

When I run the sample apps, the default Salesforce login page comes up, which allows you to login to Salesforce and then it will navigate to your Start Page that is specified in the bootconfig.json file.  I'd like to change the login to point to the communities login page instead.  Is this possible?

Thanks.
Hello ,
           I am new to salesforce ,follwed steps describe in Mobile_SDK.pdf ,I stuck at this point ,gives me the following error...............

07-02 12:00:27.020: I/ClientManager:getRestClient(2842): No account of type com.my.mysmallapp.login found
07-02 12:00:27.020: D/AccountManagerService(332): bind attempt failed for Session: expectLaunch true, connected false, stats (0/0/0), lifetime 0.0, addAccount, accountType com.my.mysmallapp.login, requiredFeatures null
07-02 12:00:27.030: W/AccMgrCallback:run(2842): android.accounts.AuthenticatorException: bind failure
07-02 12:00:27.030: W/AccMgrCallback:run(2842):  at android.accounts.AccountManager.convertErrorToException(AccountManager.java:1563)
07-02 12:00:27.030: W/AccMgrCallback:run(2842):  at android.accounts.AccountManager.access$400(AccountManager.java:140)
07-02 12:00:27.030: W/AccMgrCallback:run(2842):  at android.accounts.AccountManager$AmsTask$Response.onError(AccountManager.java:1409)
07-02 12:00:27.030: W/AccMgrCallback:run(2842):  at android.accounts.IAccountManagerResponse$Stub.onTransact(IAccountManagerResponse.java:69)
07-02 12:00:27.030: W/AccMgrCallback:run(2842):  at android.os.Binder.execTransact(Binder.java:338)
07-02 12:00:27.030: W/AccMgrCallback:run(2842):  at dalvik.system.NativeStart.run(Native Method)
07-02 12:00:27.090: I/ActivityManager(332): START {flg=0x10000000 cmp=com.my.mysmallapp/.MainActivity} from pid 2842
07-02 12:00:27.150: I/WindowManager(332): SCREENLAYOUT_SIZE (1:small, 2:normal, 3:large, 4:xlarge) 2
07-02 12:00:27.180: I/ActivityManager(332): Displayed com.my.mysmallapp/.MainActivity: +323ms (total +32ms)
07-02 12:00:27.300: I/dun_service(203): received event(DUN_EVENT_USB_UNPLUG) in state(DUN_STATE_USB_UNPLUG)
07-02 12:00:27.310: D/WifiService(332): ACTION_BATTERY_CHANGED pluggedType: 0

...required some guidance ...thank u 

Hi,

Whenever I am going to run the folowing batch I get the error 'First error: unexpected token: '{''. The batch is :

global class ZmDmAttachmentCleanupBatch implements Database.Batchable<SObject>, Database.Stateful{

private List<Id> ZmDmAttachmentIds;

private String MarketCleanupId;

public ZmDmAttachmentCleanupBatch() {
        //do nothing   
    }

   
public ZmDmAttachmentCleanupBatch(List<Id> ZmDmAttachmentIds) {
        this.ZmDmAttachmentIds = ZmDmAttachmentIds;
    }
   
public ZmDmAttachmentCleanupBatch(String MarketId) {
        this.MarketCleanupId = MarketId;
    }  

    global Database.QueryLocator start(Database.BatchableContext bc){
        return Database.getQueryLocator(prepareSOQL());
    }

    global void execute(Database.BatchableContext bc, List<Attachment> rows){
            delete rows;
           DataBase.emptyRecycleBin(rows);    
    }
   
    global void finish(Database.BatchableContext bc){
     String CleanupLastRun;
     datetime myDateTime = datetime.now();
     String myDateStr = String.ValueOf(myDateTime);
     Market__c mkt = [select Id,Cleanup_Last_Run__c from market__c
                                                        where Market_Id__c=:MarketCleanupId];

         String CleanupLastRun1 = mkt.Cleanup_Last_Run__c;
         String CleanupLastRun2 = CleanupLastRun1+'Attachment:'+myDateStr;             
        // mkt.Cleanup_Last_Run__c = 'Attachment:'+myDateStr;
              
           update mkt;
          
           Database.executeBatch(new SlAttachmentCleanupBatch('73'),2000);
        System.debug('job finished.');
     
    }
   
    public static void startJob() {
        scheduleJob(2);
    }
   
   
    private String prepareSOQL() {
     
       Market__c mrkt = [select PREV_1_CMPGN_NR__c,X90_Day_Camp_CNT__c from market__c
                                                     where Market_Id__c=:MarketCleanupId];
       List<CDW_Market_Report__c> Parent_id = [select id from CDW_Market_Report__c
                                                      where Market__r.Market_Id__c=:MarketCleanupId];
             system.debug('parent id'+Parent_id);
      
      // List<SObject> results = Database.query(someSOQL);
       Set<Id> resultIds = (new Map<Id,CDW_Market_Report__c>(Parent_id)).keySet();
      // Set<Id> resultIds = new Set<Id> (new Map<Id,CDW_Market_Report__c>(Parent_id).keySet());
      // Set<String> resultIds = (new Map<String,CDW_Market_Report__c>(Parent_id)).keySet();      
       List<Calendar__c> camp = [select CMPGN_NR__c,CMPGN_STRT_DT__c from Calendar__c
                                                    where MRKT_ID__c = :MarketCleanupId order by CMPGN_NR__c desc];

          Integer index = -1;
         
          Integer CampaignIndex=6;

       List<String> Camps=new List<String>();
      
          for(Calendar__c ca: camp){
            Camps.add(String.valueOf(ca.CMPGN_NR__c));
          }

          for(Integer m = 0; m<Camps.size();m++){
             IF(Camps[m].equalsignorecase(mrkt.PREV_1_CMPGN_NR__c)){
             index = m;
             System.debug('index='+ index);
             break;       
             }
          }
       Calendar__c PrevCmpgnStr1=camp[index+CampaignIndex];
              system.debug('final campaign'+ PrevCmpgnStr1);
  
               date startdate= PrevCmpgnStr1.CMPGN_STRT_DT__c;
               Datetime dt = datetime.newInstance(startdate.year(), startdate.month(),startdate.day(),00,00,00);

     // List<Attachment> atc = [select Id from Attachment where ParentId In :resultIds and LastModifiedDate<:dt];
     
     // system.debug('attachmentis'+ atc);

      // String PrevCmpgnStr=Camps[index+CampaignIndex];
      
      String sql = 'SELECT Id FROM Attachment ';
                
           // sql += ' where ParentId In :\''+resultIds+'\' and LastModifiedDate<:\''+dt+'\'';
            sql += ' where ParentId In :'+resultIds+' and LastModifiedDate<:'+dt+'';
           
       system.debug('queryis'+ sql);           
      return sql;
     
    }
   
   
    private Set<String> fetchEligibleMarketCodes() {
        Set<String> marketCodes = new Set<String>();
        for (Market__c market : [Select Market_Id__c from Market__c where Is_ALMPLUS_Enabled__c=true]) {
            marketCodes.add(market.Market_Id__c);
        }
        System.debug('eligible market codes: ' + marketCodes);
        return marketCodes;
    }
   
    private static void scheduleJob(Integer minutesOffset) {
        DateTime currentTime = System.now();
        String scheduleTime = ALMPlusUtils.prepareJobsSchTime(currentTime, minutesOffset); 
        String uniqueJobName = ALMPlusUtils.getUniqueJobName('ZmDmAttachmentCleanupBatch');
        String cronID = System.schedule(uniqueJobName, scheduleTime, new BatchJobScheduler(new ZmDmAttachmentCleanupBatch(), 1000));  //use 10 as the batch size         
    }
   
    //ZmDmAttachmentCleanupBatch zda=new ZmDmAttachmentCleanupBatch('73');
    //zda.startJob();
   
   
}

Can anybody tell me where I am missing in the code.

Regards,
Dip

Hi folks,

 

I have a user lookup field on Case and on a custom object. I want to select a user with Gold Partner Portal License from that lookup field. But only the standard users show up in that list. Is this something that Salesforce does not allow? If it does not, is there any work around?

 

Thanks,

Nirav

 

 

Hi,

 

How to display fieldnames and data dynamically in visualforce page. please share the solution.

 

Regards,

Mask.

  • April 10, 2013
  • Like
  • 0

Im trying to figure out how i can i use customer portal user in my mobile appplication which uses salesforce mobile sdk. As of right now only salesforce standard users are able to use the app. Is there a way to redirect to customer portal login page instead of the standard login page?

 

Hello Board,

 

Can we write Trigger on UserRole object?

 

Thanks,

Devendra

Im trying to figure out how i can i use customer portal user in my mobile appplication which uses salesforce mobile sdk. As of right now only salesforce standard users are able to use the app. Is there a way to redirect to customer portal login page instead of the standard login page?