You need to sign in to do that
Don't have an account?
Site guest user not able to access one specific field
Hi, We have a VF page hosted in public sites, where the site guest user will enter the details. Once he save the data, we are running a trigger in the backend to send this data to Zuora. Using Zuora managed package utility classes.
If System Admin or any other user logged in and execute this page, we are able to send the data successfully. When site guest user do the same, we are getting below error.
Error: SObject row was retrieved via SOQL without querying the requested field: zqu__Quote__c.zqu__Is_Parent_Quote__c
Steps:
1) Site Guest User clicks Save button in public VF page.
2) Trigger executed in the backend.
trigger Zuora_Quote_Trigger on zqu__Quote__c (after Update) {
if(Trigger.isUpdate){
system.debug('In Quote Trigger - after update '+trigger.new);
set<Id> setQuoteIds = new set<Id>();
map<String,String> mapQuoteAccountIds = new map<String,String>();
for(zqu__Quote__c zq : Trigger.new){
if(zq.zqu__ZuoraSubscriptionID__c == null && zq.zqu__ZuoraPaymentID__c != trigger.oldMap.get(zq.Id).zqu__ZuoraPaymentID__c ){
mapQuoteAccountIds.put(zq.Id,zq.zqu__Account__c);
}
}
if(mapQuoteAccountIds.keyset().size()>0) SendQuoteToZuora.sendQuote(mapQuoteAccountIds);
}
}
3) This trigger will call the SendQuoteToZuora class
@future(callout=true)
public static void sendQuote(map<string,string> Map_QuoteAccountID){
List<zqu.zQuoteUtil.ZBillingQuoteCollection> quotes = new List<zqu.zQuoteUtil.ZBillingQuoteCollection>();
for(string s: Map_QuoteAccountID.keyset()){
system.debug('Map_QuoteAccountID......Key:'+s+'..value: '+Map_QuoteAccountID.get(s));
zqu.zQuoteUtil.ZBillingQuoteCollection quote = new zqu.zQuoteUtil.ZBillingQuoteCollection();
quote.sfdcAccountId = Map_QuoteAccountID.get(s);
quote.zAccountId = 'new';
quote.quoteRequests = new List<zqu.zQuoteUtil.ZBillingQuoteRequest>();
zqu.zQuoteUtil.ZBillingQuoteRequest req = new zqu.zQuoteUtil.ZBillingQuoteRequest();
req.sfdcQuoteId = s;
quote.quoteRequests.add(req);
quotes.add(quote);
}
List<zqu.zQuoteUtil.zBillingResult> results = zqu.zQuoteUtil.sendToZBilling(quotes); // invoing managed package class
for ( zqu.zQuoteUtil.zBillingResult result : results ) {
System.debug('Result: QuoteId = ' + result.sfdcQuoteId + ', Success = ' + result.success + ', message = ' + result.message );
}
}
Any help is greatly appreciated.
I have similar issue and Event Guest site do have Create and view access on contact object. Contact records are created fine but there is a Primary campaign source field(Lookup field) and it is not writing that field alone. Primary campaign source field has View/Create permission and it's standard field.
Wonder Whether I have to give permission for lookup object too? Though It doesn't make any sense, as other lookup fields are written fine.
Appreciate any help.
thanks
Athi
[{"fieldErrors":{"Closing_ID__c":[{"message":"No access to field Closing_ID__c. Either the field was removed from the entity or access to this field was removed.","fieldApiName":"Closing_ID__c"}]},"pageErrors":[]}]
However, the field does exist, and it's permissions look just fine. I even added a new field, from scratch and attempted to write to that, but ran into the same issue.