Activities of "Karunakar"

Actually I missed to verify the update there are two methods create and update in my vendor(caller) service both are calling the core accounting service SaveAllAsync method having [HttpPost] attribute. While creating there is no errors am able to call the core accounting service SaveAllAsync method from Vendor, but while updating again getting the Forbidden error.

Below screens showing calling same service SaveAllAsync in coreaccounting from vendor service create and update methods. From Create method it is success but from update is getting Forbidden

Eurekaa.. Success I am able to call the service from another service after giving the permissions to client. Thank you for your support

There are not much logs created.. We are logged in as admin user and granted all the permissions to admin

added in both module and service projects but getting same error

Hi LiangShiwei,

In which project I need to install this package Vendor or CoreAccounting? I am calling method from vendor to core accounting. Also we have module and service projects separate, should I need to install in service or module?

Hi Liangshiwei, I have tried with above code but the entire record is deleted instead softdelete(IsDelete=0).

 private readonly IVendorRepository _VendorRepository;
 public async Task DeleteAsync(Guid id)
 {
     await _VendorRepository.DeleteAsync(x=>x.VendorId == id);
 }

 public interface IVendorRepository : IRepository<Vendor, Guid>, ITransientDependency
 {
 }

I will try by applying the above changes but what about DeletorId to update in DB for delete.

public enum TypeOfVendors
{
    Standard,
    CreditCard,
    Pcard,
    Pc,
    TaxAgency,
    PayrollCompany,
    ShippingPartner,
    Pdecm,
    Director,
    SalesRep,
    Messenger,
    CarService,
    Phones,
    Bidder,
    ExecutiveProducer,
    DirectorOfPhotography,
    Producer

}

this is my Entity

[Table("Vendor")]
public class Vendor : AggregateRoot<Guid>, IHasCreationTime, IMustHaveCreator, IMultiTenant, ISoftDelete, IHasDeletionTime
{
    public Vendor()
    {
        Active = true;
        Is1099 = false;
        IsW9OnFile = false;
        IsDeleted = false;
    }
  
    [Key]
    public Guid VendorId { get; set; }
    [Required]
    [StringLength(VendorConsts.FirstNameLength, MinimumLength = VendorConsts.MinLength)]
    public string FirstName { get; set; }

    [Required]
    [StringLength(VendorConsts.LastNameLength, MinimumLength = VendorConsts.MinLength)]
    public string LastName { get; set; }

    [StringLength(VendorConsts.VendorNameLength, MinimumLength = VendorConsts.MinLength)]
    public virtual string? VendorName { get; set; }

   // public virtual int? TypeOfVendorId { get; set; }

    //Navigation Property to the VendorId entity
    [ForeignKey("TypeOfVendorId")]
    public virtual TypeOfVendors TypeOfVendorId { get; set; }  // Navigation property

    [StringLength(VendorConsts.DbaFsoNameLength, MinimumLength = VendorConsts.MinLength)]
    public virtual string? DbaFsoName { get; set; }

    [StringLength(VendorConsts.PayToNameLength, MinimumLength = VendorConsts.MinLength)]
    public virtual string? PayToName { get; set; }

    [StringLength(VendorConsts.VendorNumberLength, MinimumLength = VendorConsts.MinLength)]
    public virtual string? VendorNumber { get; set; }

    [StringLength(VendorConsts.SSN_FederalTaxIdLength, MinimumLength = VendorConsts.MinLength)]
    public virtual string? SSN_FederalTaxId { get; set; }

    [Required]
    public int TaxType { get; set; }

    [StringLength(VendorConsts.BillingAccountNumberLength, MinimumLength = VendorConsts.MinLength)]
    public virtual string? BillingAccountNumber { get; set; }

    public virtual Guid? PaymentTerm { get; set; }

    [Required]
    public bool Is1099 { get; set; }

    [Required]
    public bool IsW9OnFile { get; set; }

    public virtual int? TypeOf1099 { get; set; }

    public virtual Guid? ACHInfoId { get; set; }

    // Navigation Property to the VendorId entity
    [ForeignKey("ACHInfoId")]
    public virtual ACHInfo AchInformation { get; set; }  // Navigation property

    public bool Active { get; set; }

    public virtual Guid? DefaultJobIdProjectDivision { get; set; }

    public virtual Guid? DefaultGlAccount { get; set; }

    public virtual Guid? DefaultLineNumber { get; set; }

    public virtual Guid? DefaultSeries { get; set; }

    public virtual Guid? DefaultLocation { get; set; }

    public virtual Guid? DefaultSet { get; set; }

    public virtual Guid? DefaultInsRef { get; set; }

    public virtual Guid? DefaultFF1 { get; set; }

    public virtual Guid? DefaultFF2 { get; set; }

    public virtual Guid? DefaultFF3 { get; set; }

    public virtual Guid? DefaultFF4 { get; set; }

    public virtual Guid? Notes { get; set; }

    public virtual int? Currency { get; set; }

    public virtual Guid? AdvanceAccount { get; set; }

    public virtual Guid? PcardAdvanceAccount { get; set; }

    [StringLength(VendorConsts.StudioVendorNumberLength, MinimumLength = VendorConsts.MinLength)]
    public virtual string? StudioVendorNumber { get; set; }

    [StringLength(VendorConsts.CustomerNumberLength, MinimumLength = VendorConsts.MinLength)]
    public virtual string? CustomerNumber { get; set; }

    public virtual int? BusinessCategory { get; set; }

    [Required]
    public int Ethnicity { get; set; }
  
    [Required]
    public virtual bool IsThirdPartyVendor { get; set; }

    public virtual Guid? TenantId { get; set; }

    public virtual Guid CreatorId { get; set; }

    [Column(TypeName = "datetime")]
    public virtual DateTime CreationTime { get; set; }

    public bool IsDeleted { get; set; }

    public virtual Guid? DeletedByUser { get; set; }

    [Column(TypeName = "datetime")]
    public virtual DateTime? DeletionTime { get; set; }

    public Vendor(
        Guid vendorId, string firstName, string lastName, string? vendorName, TypeOfVendors typeOfVendorId,
        string? dbaFsoName, string? payToName, string? vendorNumber, string? sSN_FederalTaxId,
        int taxType, string? billingAccountNumber, Guid? paymentTerm,
        bool is1099, bool isW9OnFile, int? typeOf1099, Guid? aCHInfoId,
        bool active, Guid? defaultJobIdProjectDivision, Guid? defaultGlAccount,
        Guid? defaultLineNumber, Guid? defaultSeries, Guid? defaultLocation,
        Guid? defaultSet, Guid? defaultInsRef, Guid? defaultFF1, Guid? defaultFF2,
        Guid? defaultFF3, Guid? defaultFF4, Guid? notes, int? currency,
        Guid? advanceAccount, Guid? pcardAdvanceAccount, string? studioVendorNumber,
        string? customerNumber, int? businessCategory, int ethnicity,
        bool isThirdPartyVendor, Guid? tenantId, Guid creatorId,
        DateTime createDateTime, bool isDeleted, Guid? deletedByUser, DateTime? deletionTime)
    {
        VendorId = vendorId;
        FirstName = firstName;
        LastName = lastName;
        VendorName = vendorName;
        TypeOfVendorId = typeOfVendorId;
        DbaFsoName = dbaFsoName;
        PayToName = payToName;
        VendorNumber = vendorNumber;
        SSN_FederalTaxId = sSN_FederalTaxId;
        TaxType = taxType;
        BillingAccountNumber = billingAccountNumber;
        PaymentTerm = paymentTerm;
        Is1099 = is1099;
        IsW9OnFile = isW9OnFile;
        TypeOf1099 = typeOf1099;
        ACHInfoId = aCHInfoId;
        Active = active;
        DefaultJobIdProjectDivision = defaultJobIdProjectDivision;
        DefaultGlAccount = defaultGlAccount;
        DefaultLineNumber = defaultLineNumber;
        DefaultSeries = defaultSeries;
        DefaultLocation = defaultLocation;
        DefaultSet = defaultSet;
        DefaultInsRef = defaultInsRef;
        DefaultFF1 = defaultFF1;
        DefaultFF2 = defaultFF2;
        DefaultFF3 = defaultFF3;
        DefaultFF4 = defaultFF4;
        Notes = notes;
        Currency = currency;
        AdvanceAccount = advanceAccount;
        PcardAdvanceAccount = pcardAdvanceAccount;
        StudioVendorNumber = studioVendorNumber;
        CustomerNumber = customerNumber;
        BusinessCategory= businessCategory;
        Ethnicity = ethnicity;
        IsThirdPartyVendor = isThirdPartyVendor;
        TenantId = tenantId;
        CreatorId = creatorId;
        CreationTime = createDateTime;
        IsDeleted = isDeleted;
        DeletedByUser = deletedByUser;
        DeletionTime = deletionTime;
    }
}
Showing 1 to 10 of 19 entries
Made with ❤️ on ABP v9.2.0-preview. Updated on January 16, 2025, 11:47