簡體   English   中英

在Salesforce中將標准對象設置為自定義對象的字段

[英]Set a standard object to a custom object's field in salesforce

我想將標准對象設置為自定義對象的字段。

Account a = new Account();

Customer__c sss = new Customer__c();

sss.Ref_Account__c --> this is a field that takes  an 'Account' object.
sss.Ref_Account__c = a; This gives me error.
Account a = new Account();

Customer__c sss = new Customer__c();

//sss.Ref_Account__c --> this is a field that takes  an 'Account' object.
sss.Ref_Account__c = a.Id;

您需要像這樣的代碼sss.Ref_Account__c = a.Ref_Account__c;

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM